diff options
author | Oliver Neukum <oneukum@suse.de> | 2015-02-10 03:27:59 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-02-24 11:38:46 -0500 |
commit | ec371326d47385dd3fc8e6c7e0d9e89118d94dd8 (patch) | |
tree | fe2c4f70187dae976af85d058732fd71f8c1e06a /drivers/usb | |
parent | 59e980efafd27df83a5c85c054f906d82bcbf752 (diff) |
usb-storage: support for more than 8 LUNs
This is necessary to make some storage arrays work.
Some storage devices have more than 8 LUNs. In addition
you can hook up a WideSCSI bus to USB. In these cases even
level 2 devices can have more than 8 LUNs. For them
it is necessary to simply believe the class specific
command and report its result back to the SCSI layer.
Off by one Alan noticed is fixed.
Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/storage/usb.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/usb/storage/usb.c b/drivers/usb/storage/usb.c index d468d02179f4..5600c33fcadb 100644 --- a/drivers/usb/storage/usb.c +++ b/drivers/usb/storage/usb.c | |||
@@ -889,6 +889,12 @@ static void usb_stor_scan_dwork(struct work_struct *work) | |||
889 | !(us->fflags & US_FL_SCM_MULT_TARG)) { | 889 | !(us->fflags & US_FL_SCM_MULT_TARG)) { |
890 | mutex_lock(&us->dev_mutex); | 890 | mutex_lock(&us->dev_mutex); |
891 | us->max_lun = usb_stor_Bulk_max_lun(us); | 891 | us->max_lun = usb_stor_Bulk_max_lun(us); |
892 | /* | ||
893 | * Allow proper scanning of devices that present more than 8 LUNs | ||
894 | * While not affecting other devices that may need the previous behavior | ||
895 | */ | ||
896 | if (us->max_lun >= 8) | ||
897 | us_to_host(us)->max_lun = us->max_lun+1; | ||
892 | mutex_unlock(&us->dev_mutex); | 898 | mutex_unlock(&us->dev_mutex); |
893 | } | 899 | } |
894 | scsi_scan_host(us_to_host(us)); | 900 | scsi_scan_host(us_to_host(us)); |