Commit 52b266dd authored by Linus Torvalds's avatar Linus Torvalds

usb: don't "unsuspend" ports that aren't suspended

It apparently really confuses some things (Apple keyboard
internal hub for one, but possibly others).
parent 0d25e8dc
...@@ -2077,10 +2077,6 @@ hub_port_init (struct usb_device *hdev, struct usb_device *udev, int port, ...@@ -2077,10 +2077,6 @@ hub_port_init (struct usb_device *hdev, struct usb_device *udev, int port,
hdev->bus->b_hnp_enable = 0; hdev->bus->b_hnp_enable = 0;
} }
retval = clear_port_feature(hdev, port + 1, USB_PORT_FEAT_SUSPEND);
if (retval < 0 && retval != -EPIPE)
dev_dbg(&udev->dev, "can't clear suspend; %d\n", retval);
/* Some low speed devices have problems with the quick delay, so */ /* Some low speed devices have problems with the quick delay, so */
/* be a bit pessimistic with those devices. RHbug #23670 */ /* be a bit pessimistic with those devices. RHbug #23670 */
if (oldspeed == USB_SPEED_LOW) if (oldspeed == USB_SPEED_LOW)
...@@ -2394,6 +2390,15 @@ static void hub_port_connect_change(struct usb_hub *hub, int port, ...@@ -2394,6 +2390,15 @@ static void hub_port_connect_change(struct usb_hub *hub, int port,
return; return;
} }
#ifdef CONFIG_USB_SUSPEND
/* If something is connected, but the port is suspended, wake it up.. */
if (portstatus & USB_PORT_STAT_SUSPEND) {
status = hub_port_resume(hdev, port);
if (status < 0)
dev_dbg(hub_dev, "can't clear suspend on port %d; %d\n", port+1, retval);
}
#endif
for (i = 0; i < SET_CONFIG_TRIES; i++) { for (i = 0; i < SET_CONFIG_TRIES; i++) {
struct usb_device *udev; struct usb_device *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