Commit 20307949 authored by Alan Stern's avatar Alan Stern Committed by Greg Kroah-Hartman

[PATCH] usbcore: fixes for hub_port_resume

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.
Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent d8840d60
...@@ -1882,7 +1882,12 @@ hub_port_resume(struct usb_hub *hub, int port1, struct usb_device *udev) ...@@ -1882,7 +1882,12 @@ hub_port_resume(struct usb_hub *hub, int port1, struct usb_device *udev)
dev_dbg(hub->intfdev, dev_dbg(hub->intfdev,
"port %d status %04x.%04x after resume, %d\n", "port %d status %04x.%04x after resume, %d\n",
port1, portchange, devstatus, status); port1, portchange, devstatus, status);
if (status >= 0)
status = -ENODEV;
} else { } else {
if (portchange & USB_PORT_STAT_C_SUSPEND)
clear_port_feature(hub->hdev, port1,
USB_PORT_FEAT_C_SUSPEND);
/* TRSMRCY = 10 msec */ /* TRSMRCY = 10 msec */
msleep(10); msleep(10);
if (udev) if (udev)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment