]> err.no Git - linux-2.6/commit
[SCSI] Prevent scsi_execute_async from guessing cdb length
authorbrking@us.ibm.com <brking@us.ibm.com>
Mon, 23 Jan 2006 21:03:22 +0000 (15:03 -0600)
committerJames Bottomley <jejb@mulgrave.(none)>
Thu, 26 Jan 2006 20:13:50 +0000 (15:13 -0500)
commitbb1d1073a10fdc8547e3eb821ee2488260094b39
tree139a30834cea40e0d967506cfdaea603cf56a192
parent15084a4a63bc300c18b28a8a9afac870c552abce
[SCSI] Prevent scsi_execute_async from guessing cdb length

When the scsi_execute_async interface was added it ended up reducing
the flexibility of userspace to send arbitrary scsi commands through
sg using SG_IO. The SG_IO interface allows userspace to specify the
CDB length. This is now ignored in scsi_execute_async and it is
guessed using the COMMAND_SIZE macro, which is not always correct,
particularly for vendor specific commands. This patch adds a cmd_len
parameter to the scsi_execute_async interface to allow the caller
to specify the length of the CDB.

Signed-off-by: Brian King <brking@us.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
drivers/scsi/scsi_error.c
drivers/scsi/scsi_lib.c
drivers/scsi/sg.c
drivers/scsi/st.c
include/scsi/scsi_device.h