usbcore: fixes for hub_port_resume
From: | Alan Stern <stern@rowland.harvard.edu> | |
To: | Greg KH <greg@kroah.com> | |
Subject: | [PATCH 01/11] usbcore: fixes for hub_port_resume | |
Date: | Wed, 28 Jun 2006 11:20:41 -0400 (EDT) | |
Cc: | USB development list <linux-usb-devel@lists.sourceforge.net> |
Greg: This patch (as731) makes a couple of small fixes to the hub_port_resume routine: Don't return status >= 0 when an error occurs; Clear the port-change-suspend status indicator after resuming a device. Alan Stern Signed-off-by: Alan Stern <stern@rowland.harvard.edu> --- Index: usb-2.6/drivers/usb/core/hub.c =================================================================== --- usb-2.6.orig/drivers/usb/core/hub.c +++ usb-2.6/drivers/usb/core/hub.c @@ -1881,7 +1881,12 @@ hub_port_resume(struct usb_hub *hub, int dev_dbg(hub->intfdev, "port %d status %04x.%04x after resume, %d\n", port1, portchange, devstatus, status); + if (status >= 0) + status = -ENODEV; } else { + if (portchange & USB_PORT_STAT_C_SUSPEND) + clear_port_feature(hub->hdev, port1, + USB_PORT_FEAT_C_SUSPEND); /* TRSMRCY = 10 msec */ msleep(10); if (udev) Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&... _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel