summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorAlan Stern <stern@rowland.harvard.edu>2005-10-17 18:42:06 +0400
committerGreg Kroah-Hartman <gregkh@suse.de>2005-10-29 03:47:45 +0400
commitf37be9b9be3ebc02d2d075d7f53f7802f3e005db (patch)
tree5e1ece040e94e2453d828c7f203d4d23a7b84d5c /drivers
parentcb97c5c9d0789d65d7ec42a80946fa9eb2ec5182 (diff)
downloadlinux-f37be9b9be3ebc02d2d075d7f53f7802f3e005db.tar.xz
[PATCH] Fix hcd->state assignments in uhci-hcd
This patch (as581) changes the assignments to hcd->state in the uhci-hcd driver. It fixes part of bugzilla entry #5227. The problem was revealed by David's large suite of USB suspend/resume patches; this patch should go to Linus at the same time those do. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/usb/host/uhci-hcd.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/usb/host/uhci-hcd.c b/drivers/usb/host/uhci-hcd.c
index 72cd1576d20c..d33ce3982a5f 100644
--- a/drivers/usb/host/uhci-hcd.c
+++ b/drivers/usb/host/uhci-hcd.c
@@ -161,8 +161,8 @@ static void configure_hc(struct uhci_hcd *uhci)
/* Set the current frame number */
outw(uhci->frame_number, uhci->io_addr + USBFRNUM);
- /* Mark controller as running before we enable interrupts */
- uhci_to_hcd(uhci)->state = HC_STATE_RUNNING;
+ /* Mark controller as not halted before we enable interrupts */
+ uhci_to_hcd(uhci)->state = HC_STATE_SUSPENDED;
mb();
/* Enable PIRQ */
@@ -263,6 +263,7 @@ __acquires(uhci->lock)
static void start_rh(struct uhci_hcd *uhci)
{
+ uhci_to_hcd(uhci)->state = HC_STATE_RUNNING;
uhci->is_stopped = 0;
smp_wmb();
@@ -708,7 +709,6 @@ static int uhci_suspend(struct usb_hcd *hcd, pm_message_t message)
if (uhci->rh_state > UHCI_RH_SUSPENDED) {
dev_warn(uhci_dev(uhci), "Root hub isn't suspended!\n");
- hcd->state = HC_STATE_RUNNING;
rc = -EBUSY;
goto done;
};