]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/usb/host/ehci-hub.c
[SCSI] transport_class: BUG if we can't release the attribute container
[linux-2.6-omap-h63xx.git] / drivers / usb / host / ehci-hub.c
index a165e0a0961c796083a7bd4a756c4c64b509f582..4e065e556e4b802c8c83a507973fb31a56931460 100644 (file)
@@ -123,6 +123,8 @@ static int ehci_bus_suspend (struct usb_hcd *hcd)
 
        if (time_before (jiffies, ehci->next_statechange))
                msleep(5);
+       del_timer_sync(&ehci->watchdog);
+       del_timer_sync(&ehci->iaa_watchdog);
 
        port = HCS_N_PORTS (ehci->hcs_params);
        spin_lock_irq (&ehci->lock);
@@ -133,8 +135,6 @@ static int ehci_bus_suspend (struct usb_hcd *hcd)
                hcd->state = HC_STATE_QUIESCING;
        }
        ehci->command = ehci_readl(ehci, &ehci->regs->command);
-       if (ehci->reclaim)
-               ehci->reclaim_ready = 1;
        ehci_work(ehci);
 
        /* Unlike other USB host controller types, EHCI doesn't have
@@ -170,11 +170,17 @@ static int ehci_bus_suspend (struct usb_hcd *hcd)
                }
        }
 
+       /* Apparently some devices need a >= 1-uframe delay here */
+       if (ehci->bus_suspended)
+               udelay(150);
+
        /* turn off now-idle HC */
-       del_timer_sync (&ehci->watchdog);
        ehci_halt (ehci);
        hcd->state = HC_STATE_SUSPENDED;
 
+       if (ehci->reclaim)
+               end_unlink_async(ehci);
+
        /* allow remote wakeup */
        mask = INTR_MASK;
        if (!device_may_wakeup(&hcd->self.root_hub->dev))
@@ -406,10 +412,8 @@ static int check_reset_complete (
        u32 __iomem     *status_reg,
        int             port_status
 ) {
-       if (!(port_status & PORT_CONNECT)) {
-               ehci->reset_done [index] = 0;
+       if (!(port_status & PORT_CONNECT))
                return port_status;
-       }
 
        /* if reset finished and it's still not enabled -- handoff */
        if (!(port_status & PORT_PE)) {
@@ -488,8 +492,6 @@ ehci_hub_status_data (struct usb_hcd *hcd, char *buf)
                 * controller by the user.
                 */
 
-               if (!(temp & PORT_CONNECT))
-                       ehci->reset_done [i] = 0;
                if ((temp & mask) != 0
                                || ((temp & PORT_RESUME) != 0
                                        && time_after_eq(jiffies,