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>
This commit is contained in:
parent
de85422b94
commit
1236edf1c7
1 changed files with 4 additions and 11 deletions
|
@ -713,18 +713,11 @@ static void hub_restart(struct usb_hub *hub, int type)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Was the power session lost while we were suspended? */
|
/* Was the power session lost while we were suspended? */
|
||||||
switch (type) {
|
status = hub_port_status(hub, port1, &portstatus, &portchange);
|
||||||
case HUB_RESET_RESUME:
|
|
||||||
portstatus = 0;
|
|
||||||
portchange = USB_PORT_STAT_C_CONNECTION;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case HUB_RESET:
|
/* If the device is gone, khubd will handle it later */
|
||||||
case HUB_RESUME:
|
if (status == 0 && !(portstatus & USB_PORT_STAT_CONNECTION))
|
||||||
status = hub_port_status(hub, port1,
|
continue;
|
||||||
&portstatus, &portchange);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* For "USB_PERSIST"-enabled children we must
|
/* For "USB_PERSIST"-enabled children we must
|
||||||
* mark the child device for reset-resume and
|
* mark the child device for reset-resume and
|
||||||
|
|
Loading…
Reference in a new issue