Преглед изворни кода

[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 <andi@rhlx01.fht-esslingen.de>.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
David Brownell пре 19 година
родитељ
комит
839ab1d4ce
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      drivers/usb/host/ohci-hcd.c

+ 1 - 1
drivers/usb/host/ohci-hcd.c

@@ -863,7 +863,7 @@ static int ohci_restart (struct ohci_hcd *ohci)
 		i = ohci->num_ports;
 		i = ohci->num_ports;
 		while (i--)
 		while (i--)
 			ohci_writel (ohci, RH_PS_PSS,
 			ohci_writel (ohci, RH_PS_PSS,
-				&ohci->regs->roothub.portstatus [temp]);
+				&ohci->regs->roothub.portstatus [i]);
 		ohci_dbg (ohci, "restart complete\n");
 		ohci_dbg (ohci, "restart complete\n");
 	}
 	}
 	return 0;
 	return 0;