Skip to content

Commit 107f04b

Browse files
navin patidargregkh
authored andcommitted
staging: usbip: vhci_hcd: fixed suspend-resume loop
USB autosuspend suspends vhci_hcd. In this process hcd_bus_suspend gets executed which puts vhci_hcd in suspend state and calls vhci_hub_status. vhci_hub_status function checks hub state and if it is in suspend state, usb_hcd_resume_root_hub gets executed which resumes hub and if hub is idle, again autosuspend puts it in suspend state and this goes on. vhci_hub_status should resume hub only when hub port is in suspend state and hub port status has changed. Signed-off-by: navin patidar <navinp@cdac.in> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 236742d commit 107f04b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎drivers/staging/usbip/vhci_hcd.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ static int vhci_hub_status(struct usb_hcd *hcd, char *buf)
220220

221221
pr_info("changed %d\n", changed);
222222

223-
if (hcd->state == HC_STATE_SUSPENDED)
223+
if ((hcd->state == HC_STATE_SUSPENDED) && (changed == 1))
224224
usb_hcd_resume_root_hub(hcd);
225225

226226
done:

0 commit comments

Comments
 (0)