aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/scsi_ioctl.c
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2007-11-03 14:30:39 -0400
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2008-01-11 19:22:40 -0500
commiteb44820c28bc9a042e1157b41c677018a8fdfc74 (patch)
treede027b3cd40533488805ef7ee8156f077cd2b7e5 /drivers/scsi/scsi_ioctl.c
parent3f48985823001c89c9bd5c5e57cc07530578dfcc (diff)
[SCSI] Add Documentation and integrate into docbook build
Add Documentation/DocBook/scsi_midlayer.tmpl, add to Makefile, and update lots of kerneldoc comments in drivers/scsi/*. Updated with comments from Stefan Richter, Stephen M. Cameron, James Bottomley and Randy Dunlap. Signed-off-by: Rob Landley <rob@landley.net> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/scsi/scsi_ioctl.c')
-rw-r--r--drivers/scsi/scsi_ioctl.c24
1 files changed, 16 insertions, 8 deletions
diff --git a/drivers/scsi/scsi_ioctl.c b/drivers/scsi/scsi_ioctl.c
index 32293f451669..83e144716901 100644
--- a/drivers/scsi/scsi_ioctl.c
+++ b/drivers/scsi/scsi_ioctl.c
@@ -174,10 +174,15 @@ static int scsi_ioctl_get_pci(struct scsi_device *sdev, void __user *arg)
174} 174}
175 175
176 176
177/* 177/**
178 * the scsi_ioctl() function differs from most ioctls in that it does 178 * scsi_ioctl - Dispatch ioctl to scsi device
179 * not take a major/minor number as the dev field. Rather, it takes 179 * @sdev: scsi device receiving ioctl
180 * a pointer to a scsi_devices[] element, a structure. 180 * @cmd: which ioctl is it
181 * @arg: data associated with ioctl
182 *
183 * Description: The scsi_ioctl() function differs from most ioctls in that it
184 * does not take a major/minor number as the dev field. Rather, it takes
185 * a pointer to a &struct scsi_device.
181 */ 186 */
182int scsi_ioctl(struct scsi_device *sdev, int cmd, void __user *arg) 187int scsi_ioctl(struct scsi_device *sdev, int cmd, void __user *arg)
183{ 188{
@@ -264,9 +269,12 @@ int scsi_ioctl(struct scsi_device *sdev, int cmd, void __user *arg)
264} 269}
265EXPORT_SYMBOL(scsi_ioctl); 270EXPORT_SYMBOL(scsi_ioctl);
266 271
267/* 272/**
268 * the scsi_nonblock_ioctl() function is designed for ioctls which may 273 * scsi_nonblock_ioctl() - Handle SG_SCSI_RESET
269 * be executed even if the device is in recovery. 274 * @sdev: scsi device receiving ioctl
275 * @cmd: Must be SC_SCSI_RESET
276 * @arg: pointer to int containing SG_SCSI_RESET_{DEVICE,BUS,HOST}
277 * @filp: either NULL or a &struct file which must have the O_NONBLOCK flag.
270 */ 278 */
271int scsi_nonblockable_ioctl(struct scsi_device *sdev, int cmd, 279int scsi_nonblockable_ioctl(struct scsi_device *sdev, int cmd,
272 void __user *arg, struct file *filp) 280 void __user *arg, struct file *filp)
@@ -276,7 +284,7 @@ int scsi_nonblockable_ioctl(struct scsi_device *sdev, int cmd,
276 /* The first set of iocts may be executed even if we're doing 284 /* The first set of iocts may be executed even if we're doing
277 * error processing, as long as the device was opened 285 * error processing, as long as the device was opened
278 * non-blocking */ 286 * non-blocking */
279 if (filp && filp->f_flags & O_NONBLOCK) { 287 if (filp && (filp->f_flags & O_NONBLOCK)) {
280 if (scsi_host_in_recovery(sdev->host)) 288 if (scsi_host_in_recovery(sdev->host))
281 return -ENODEV; 289 return -ENODEV;
282 } else if (!scsi_block_when_processing_errors(sdev)) 290 } else if (!scsi_block_when_processing_errors(sdev))