Commit 54d3494d authored by Jan Harkes's avatar Jan Harkes Committed by Greg Kroah-Hartman

[PATCH] uhci-hcd suspend fix

Problem:

When resuming after a suspend, the driver disconnects. Later on, (next
usb interrupt?) or suspend/resume, the kernel oopses.

Cause:

hcd.state is never set to 'USB_STATE_READY' when resuming. The following
patch fixes this. Maybe Johannes might want to do it differently, i.e.
by adding hcd.state = USB_STATE_READY to uhci_resume instead of moving
the state change into start_hc.
parent 2b4c148c
......@@ -2053,6 +2053,8 @@ static void start_hc(struct uhci_hcd *uhci)
/* Run and mark it configured with a 64-byte max packet */
outw(USBCMD_RS | USBCMD_CF | USBCMD_MAXP, io_addr + USBCMD);
uhci->hcd.state = USB_STATE_READY;
}
#ifdef CONFIG_PROC_FS
......@@ -2344,8 +2346,6 @@ static int __devinit uhci_start(struct usb_hcd *hcd)
/* disable legacy emulation */
pci_write_config_word(dev, USBLEGSUP, USBLEGSUP_DEFAULT);
hcd->state = USB_STATE_READY;
usb_connect(uhci->rh_dev);
uhci->rh_dev->speed = USB_SPEED_FULL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment