Discussion:
[PATCH] storage: Enable multi-target mode as vendor driver does for SCM eUSCSI bridge
Mark Knibbs
2014-10-16 15:10:08 UTC
Permalink
Hi,

usb_stor_euscsi_init() enables multi-target mode for SCM eUSB SCSI bridge
devices. The control message it sends has wLength = 1 and the byte sent is
0x01. While that works, the SCM driver does it with wLength = 0. We may as
well match what the SCM driver does.

This also includes the change from
[PATCH] storage: Replace magic number with define in usb_stor_euscsi_init()


Signed-off-by: Mark Knibbs <markk-yYnZraf+/sb10XsdtD+***@public.gmane.org>

---
diff -up linux-3.17/drivers/usb/storage/initializers.c.orig linux-3.17/drivers/usb/storage/initializers.c
--- linux-3.17/drivers/usb/storage/initializers.c.orig 2014-10-05 20:23:04.000000000 +0100
+++ linux-3.17/drivers/usb/storage/initializers.c 2014-10-16 13:39:04.497910732 +0100
@@ -49,10 +49,9 @@ int usb_stor_euscsi_init(struct us_data
int result;

usb_stor_dbg(us, "Attempting to init eUSCSI bridge...\n");
- us->iobuf[0] = 0x1;
result = usb_stor_control_msg(us, us->send_ctrl_pipe,
0x0C, USB_RECIP_INTERFACE | USB_TYPE_VENDOR,
- 0x01, 0x0, us->iobuf, 0x1, 5000);
+ 0x01, 0x0, NULL, 0x0, USB_CTRL_SET_TIMEOUT);
usb_stor_dbg(us, "-- result is %d\n", result);

return 0;
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-***@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Loading...