From: David Brownell Date: Wed, 26 Apr 2006 21:39:11 +0000 (-0700) Subject: [PATCH] USB: fix bug in ohci-hcd.c ohci_restart() X-Git-Tag: v2.6.17-rc5~165^2~15 X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=839ab1d4ce4dfd7e6c189391a82c584292488b41;p=linux-2.6-omap-h63xx.git [PATCH] USB: fix bug in ohci-hcd.c ohci_restart() A loop on a power-lost resume path used the wrong index. I suspect khubd has been working around such bugs. Noticed by Andreas Mohr . Signed-off-by: David Brownell Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci-hcd.c index 544f7589912..73f5a379d9b 100644 --- a/drivers/usb/host/ohci-hcd.c +++ b/drivers/usb/host/ohci-hcd.c @@ -863,7 +863,7 @@ static int ohci_restart (struct ohci_hcd *ohci) i = ohci->num_ports; while (i--) ohci_writel (ohci, RH_PS_PSS, - &ohci->regs->roothub.portstatus [temp]); + &ohci->regs->roothub.portstatus [i]); ohci_dbg (ohci, "restart complete\n"); } return 0;