diff options
author | Alan Stern <stern@rowland.harvard.edu> | 2008-07-01 10:45:51 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-07-03 21:20:37 -0400 |
commit | 1236edf1c70107a0d31b3fba0b2a8783615d0d24 (patch) | |
tree | de2ac86085d7040b1ad11642d4b26167bbf53c12 /drivers/usb/core | |
parent | de85422b94ddb23c021126815ea49414047c13dc (diff) |
USB: don't lose disconnections during suspend
This patch (as1111) fixes a bug in the hub driver. When a hub
resumes, disconnections that occurred while the hub was suspended are
lost.
A completely different fix for this problem has already been accepted
for 2.6.27; however the problem still needs to be handled in 2.6.26.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Tested-by: Lukas Hejtmanek <xhejtman@ics.muni.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/core')
-rw-r--r-- | drivers/usb/core/hub.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c index 94789be54ca3..512d2d57d41e 100644 --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c | |||
@@ -713,18 +713,11 @@ static void hub_restart(struct usb_hub *hub, int type) | |||
713 | } | 713 | } |
714 | 714 | ||
715 | /* Was the power session lost while we were suspended? */ | 715 | /* Was the power session lost while we were suspended? */ |
716 | switch (type) { | 716 | status = hub_port_status(hub, port1, &portstatus, &portchange); |
717 | case HUB_RESET_RESUME: | ||
718 | portstatus = 0; | ||
719 | portchange = USB_PORT_STAT_C_CONNECTION; | ||
720 | break; | ||
721 | 717 | ||
722 | case HUB_RESET: | 718 | /* If the device is gone, khubd will handle it later */ |
723 | case HUB_RESUME: | 719 | if (status == 0 && !(portstatus & USB_PORT_STAT_CONNECTION)) |
724 | status = hub_port_status(hub, port1, | 720 | continue; |
725 | &portstatus, &portchange); | ||
726 | break; | ||
727 | } | ||
728 | 721 | ||
729 | /* For "USB_PERSIST"-enabled children we must | 722 | /* For "USB_PERSIST"-enabled children we must |
730 | * mark the child device for reset-resume and | 723 | * mark the child device for reset-resume and |