scsi_sg.c (195534) | scsi_sg.c (198708) |
---|---|
1/*- 2 * Copyright (c) 2007 Scott Long 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 16 unchanged lines hidden (view full) --- 25 */ 26 27/* 28 * scsi_sg peripheral driver. This driver is meant to implement the Linux 29 * SG passthrough interface for SCSI. 30 */ 31 32#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2007 Scott Long 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 16 unchanged lines hidden (view full) --- 25 */ 26 27/* 28 * scsi_sg peripheral driver. This driver is meant to implement the Linux 29 * SG passthrough interface for SCSI. 30 */ 31 32#include <sys/cdefs.h> |
33__FBSDID("$FreeBSD: head/sys/cam/scsi/scsi_sg.c 195534 2009-07-10 08:18:08Z scottl $"); | 33__FBSDID("$FreeBSD: head/sys/cam/scsi/scsi_sg.c 198708 2009-10-31 10:43:38Z mav $"); |
34 35#include <sys/param.h> 36#include <sys/systm.h> 37#include <sys/kernel.h> 38#include <sys/types.h> 39#include <sys/bio.h> 40#include <sys/malloc.h> 41#include <sys/fcntl.h> --- 463 unchanged lines hidden (view full) --- 505 break; 506 } 507 508 if (req.iovec_count != 0) { 509 error = EOPNOTSUPP; 510 break; 511 } 512 | 34 35#include <sys/param.h> 36#include <sys/systm.h> 37#include <sys/kernel.h> 38#include <sys/types.h> 39#include <sys/bio.h> 40#include <sys/malloc.h> 41#include <sys/fcntl.h> --- 463 unchanged lines hidden (view full) --- 505 break; 506 } 507 508 if (req.iovec_count != 0) { 509 error = EOPNOTSUPP; 510 break; 511 } 512 |
513 ccb = cam_periph_getccb(periph, /*priority*/5); | 513 ccb = cam_periph_getccb(periph, CAM_PRIORITY_NORMAL); |
514 csio = &ccb->csio; 515 516 error = copyin(req.cmdp, &csio->cdb_io.cdb_bytes, 517 req.cmd_len); 518 if (error) { 519 xpt_release_ccb(ccb); 520 break; 521 } --- 202 unchanged lines hidden (view full) --- 724 } else { 725 buf = NULL; 726 buf_len = 0; 727 dir = CAM_DIR_NONE; 728 } 729 730 cam_periph_lock(periph); 731 sc = periph->softc; | 514 csio = &ccb->csio; 515 516 error = copyin(req.cmdp, &csio->cdb_io.cdb_bytes, 517 req.cmd_len); 518 if (error) { 519 xpt_release_ccb(ccb); 520 break; 521 } --- 202 unchanged lines hidden (view full) --- 724 } else { 725 buf = NULL; 726 buf_len = 0; 727 dir = CAM_DIR_NONE; 728 } 729 730 cam_periph_lock(periph); 731 sc = periph->softc; |
732 xpt_setup_ccb(&ccb->ccb_h, periph->path, /*priority*/5); | 732 xpt_setup_ccb(&ccb->ccb_h, periph->path, CAM_PRIORITY_NORMAL); |
733 cam_fill_csio(csio, 734 /*retries*/1, 735 sgdone, 736 dir|CAM_DEV_QFRZDIS, 737 MSG_SIMPLE_Q_TAG, 738 buf, 739 buf_len, 740 SG_MAX_SENSE, --- 250 unchanged lines hidden --- | 733 cam_fill_csio(csio, 734 /*retries*/1, 735 sgdone, 736 dir|CAM_DEV_QFRZDIS, 737 MSG_SIMPLE_Q_TAG, 738 buf, 739 buf_len, 740 SG_MAX_SENSE, --- 250 unchanged lines hidden --- |