# This is a BitKeeper generated patch for the following project: # Project Name: Linux kernel tree # This patch format is intended for GNU patch command version 2.5 or higher. # This patch includes the following deltas: # ChangeSet 1.685 -> 1.686 # drivers/usb/host/uhci-hcd.c 1.8 -> 1.9 # # The following is the BitKeeper ChangeSet Log # -------------------------------------------- # 02/07/22 jaharkes@cs.cmu.edu 1.686 # [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. # -------------------------------------------- # diff -Nru a/drivers/usb/host/uhci-hcd.c b/drivers/usb/host/uhci-hcd.c --- a/drivers/usb/host/uhci-hcd.c Mon Jul 22 17:11:18 2002 +++ b/drivers/usb/host/uhci-hcd.c Mon Jul 22 17:11:18 2002 @@ -2053,6 +2053,8 @@ /* 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 @@ -2343,8 +2345,6 @@ /* 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;