diff options
| author | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-11-04 18:54:13 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-11-04 18:54:13 -0800 |
| commit | 52b266dde03d97ea213688c7c2a18282ded145cd (patch) | |
| tree | 552624466daf3cf7b00bb6d93712bb1046455b74 | |
| parent | 0d25e8dcd7b517d318f8f20de9e198aa3e8161ee (diff) | |
usb: don't "unsuspend" ports that aren't suspended
It apparently really confuses some things (Apple keyboard
internal hub for one, but possibly others).
| -rw-r--r-- | drivers/usb/core/hub.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c index 96fa991443f0..a8b184def032 100644 --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c @@ -2077,10 +2077,6 @@ hub_port_init (struct usb_device *hdev, struct usb_device *udev, int port, 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 */ /* be a bit pessimistic with those devices. RHbug #23670 */ if (oldspeed == USB_SPEED_LOW) @@ -2394,6 +2390,15 @@ static void hub_port_connect_change(struct usb_hub *hub, int port, 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++) { struct usb_device *udev; |
