Skip to content

Commit

Permalink
USB: revert "don't lose disconnections during suspend"
Browse files Browse the repository at this point in the history
This reverts Alan's previous patch so that the recent Hub changes will
apply cleanly.  The above mentioned patch was needed for 2.6.26 to work
properly.

Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Lukas Hejtmanek <xhejtman@ics.muni.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Greg Kroah-Hartman committed Jul 21, 2008
1 parent 1b26da1 commit 36aa811
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions drivers/usb/core/hub.c
Original file line number Diff line number Diff line change
Expand Up @@ -713,11 +713,18 @@ static void hub_restart(struct usb_hub *hub, int type)
}

/* Was the power session lost while we were suspended? */
status = hub_port_status(hub, port1, &portstatus, &portchange);
switch (type) {
case HUB_RESET_RESUME:
portstatus = 0;
portchange = USB_PORT_STAT_C_CONNECTION;
break;

/* If the device is gone, khubd will handle it later */
if (status == 0 && !(portstatus & USB_PORT_STAT_CONNECTION))
continue;
case HUB_RESET:
case HUB_RESUME:
status = hub_port_status(hub, port1,
&portstatus, &portchange);
break;
}

/* For "USB_PERSIST"-enabled children we must
* mark the child device for reset-resume and
Expand Down

0 comments on commit 36aa811

Please sign in to comment.