ChangeSet 1.1722.97.45, 2004/06/07 16:54:49-07:00, [EMAIL PROTECTED]
[PATCH] USB: Check port reset return code
This patch adds checking for the SET-FEATURE request that actually does a
port reset. Without the check, the hub driver just assumes that the port
reset command actually was transferred okay.
Signed-off-by: Alan Stern <[EMAIL PROTECTED]>
Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>
drivers/usb/core/hub.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff -Nru a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
--- a/drivers/usb/core/hub.c Fri Jun 18 11:00:45 2004
+++ b/drivers/usb/core/hub.c Fri Jun 18 11:00:45 2004
@@ -1150,10 +1150,14 @@
/* Reset the port */
for (i = 0; i < PORT_RESET_TRIES; i++) {
- set_port_feature(hdev, port + 1, USB_PORT_FEAT_RESET);
+ status = set_port_feature(hdev, port + 1, USB_PORT_FEAT_RESET);
+ if (status)
+ dev_err(hub_dev, "cannot reset port %d (err = %d)\n",
+ port + 1, status);
+ else
+ status = hub_port_wait_reset(hdev, port, udev, delay);
/* return on disconnect or reset */
- status = hub_port_wait_reset(hdev, port, udev, delay);
if (status == -ENOTCONN || status == 0) {
clear_port_feature(hdev,
port + 1, USB_PORT_FEAT_C_RESET);
-------------------------------------------------------
This SF.Net email is sponsored by The 2004 JavaOne(SM) Conference
Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer
Conference, June 28 - July 1 at the Moscone Center in San Francisco, CA
REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code NWMGYKND
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel