Discussion:
[PATCH v2] storage: Enable multi-target mode as vendor driver does for SCM eUSCSI bridge
Mark Knibbs
2014-10-17 20:21:51 UTC
Permalink
Hi,

v2: Remove incorrect use of USB_CTRL_SET_TIMEOUT (=5000);
usb_stor_control_msg() timeout argument is actually specified in jiffies.


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 includes the change from
[PATCH] storage: Fix timeout in usb_stor_euscsi_init() and usb_stor_huawei_e220_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, 5*HZ);
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
Sergei Shtylyov
2014-10-18 16:32:22 UTC
Permalink
Post by Mark Knibbs
Hi,
v2: Remove incorrect use of USB_CTRL_SET_TIMEOUT (=5000);
usb_stor_control_msg() timeout argument is actually specified in jiffies.
Please put the patch version changes under the --- tear-line.
Post by Mark Knibbs
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 includes the change from
[PATCH] storage: Fix timeout in usb_stor_euscsi_init() and usb_stor_huawei_e220_init()
---
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, 5*HZ);
Again, please surround * with spaces.

[...]

WBR, Sergei

--
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...