-
Patrick Mansfield authored
This patch consolidates the setting of the LUN in byte 1 of the SCSI command block for SCSI-2 and lower devices. This is needed for multi-path IO (some devices can actually have differnt LUN values for each path), but is also a nice clean up of the code. sg.c was able to inhibit setting the value, this removes that capability - if it is really needed it can be black listed in the device_list[] flags, or sg could set a similiar flag. This is patched against the latest bk (as of some time on Oct 16), and patches clean against 2.5.43. Tests were run with different adapters and various disks and a tape drive, I have no SCSI-2 multi-lun devices, so the main verifcation was done using a modified scsi_debug.c driver to emulate a multi-lun SCSI-2 device. drivers/scsi/osst.c | 2 -- drivers/scsi/scsi.c | 6 ++++++ drivers/scsi/scsi_error.c | 12 +++++------- drivers/scsi/scsi_ioctl.c | 16 ++++------------ drivers/scsi/scsi_scan.c | 31 ++++--------------------------- drivers/scsi/sd.c | 22 +++++----------------- drivers/scsi/sg.c | 4 ---- drivers/scsi/sr.c | 17 ++--------------- drivers/scsi/sr_ioctl.c | 20 +------------------- drivers/scsi/sr_vendor.c | 18 +++--------------- drivers/scsi/st.c | 2 -- include/scsi/sg.h | 2 +- 12 files changed, 31 insertions(+), 121 deletions(-)
489f597d