提交 631fe9d9 编写于 作者: A Alan Stern 提交者: Greg Kroah-Hartman

USB: EHCI: initialize data before resetting hardware

Currently, EHCI initialization turns off the controller (in case it
was left running by the firmware) before setting up the ehci_hcd data
structure.  This patch (as1565) reverses that order.

Although it doesn't matter now, it will matter later on when future
additions to ehci_halt() will want to acquire a spinlock that gets
initialized by ehci_init().
Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 1f9be64a
......@@ -823,12 +823,12 @@ static int ehci_setup(struct usb_hcd *hcd)
ehci->sbrn = HCD_USB2;
retval = ehci_halt(ehci);
/* data structure init */
retval = ehci_init(hcd);
if (retval)
return retval;
/* data structure init */
retval = ehci_init(hcd);
retval = ehci_halt(ehci);
if (retval)
return retval;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册