Hi,

Regarding the patch I posted to prevent the bus scan of SCM USB-SCSI
converters attempting to scan the converter itself, there is probably a
neater way.

In drivers/scsi/scsi_scan.c, function __scsi_scan_target(), there is:
        if (shost->this_id == id)
                /*
                 * Don't scan the host adapter
                 */
                return;

Since __scsi_scan_target() takes care to avoid scanning the host adapter, we
just need to set this_id to 7. Untested patch below.

Signed-off-by: Mark Knibbs <ma...@clara.co.uk>

---
diff -up linux-3.17-rc6/drivers/usb/storage/usb.c.orig 
linux-3.17-rc6/drivers/usb/storage/usb.c
--- linux-3.17-rc6/drivers/usb/storage/usb.c.orig       2014-09-21 
23:43:02.000000000 +0100
+++ linux-3.17-rc6/drivers/usb/storage/usb.c    2014-09-24 18:21:24.000000000 
+0100
@@ -980,8 +980,12 @@ int usb_stor_probe2(struct us_data *us)
        if (us->fflags & US_FL_SINGLE_LUN)
                us->max_lun = 0;
 
-       if (!(us->fflags & US_FL_SCM_MULT_TARG))
+       if (!(us->fflags & US_FL_SCM_MULT_TARG)) {
                us_to_host(us)->max_id = 1;
+       } else {
+               /* SCM USB-SCSI converter ID is 7 */
+               us_to_host(us)->this_id = 7;
+       }
 
        /* Find the endpoints and calculate pipe values */
        result = get_pipes(us);
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to