]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
musb_hdrc: Make CONNECT irqs work again
authorDavid Brownell <dbrownell@users.sourceforge.net>
Mon, 22 Jan 2007 22:38:18 +0000 (14:38 -0800)
committerTony Lindgren <tony@atomide.com>
Mon, 22 Jan 2007 22:38:18 +0000 (14:38 -0800)
Recent usbcore "autosuspend" changes redefined the interface for root hubs
in an incompatible way.  This patch makes CONNECT irqs work again.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
drivers/usb/musb/plat_uds.c

index d98c4bcd85b45a85eef1303a0ae5530c455a1a17..152c9797d0897412dabbb16f8dca09411bd0a4e2 100644 (file)
@@ -472,9 +472,11 @@ static irqreturn_t musb_stage0_irq(struct musb * pThis, u8 bIntrUSB,
        }
 
        if (bIntrUSB & MGC_M_INTR_CONNECT) {
+               struct usb_hcd *hcd = musb_to_hcd(pThis);
+
                handled = IRQ_HANDLED;
                pThis->is_active = 1;
-               set_bit(HCD_FLAG_SAW_IRQ, &musb_to_hcd(pThis)->flags);
+               set_bit(HCD_FLAG_SAW_IRQ, &hcd->flags);
 
                pThis->bEnd0Stage = MGC_END0_START;
 
@@ -496,7 +498,10 @@ static irqreturn_t musb_stage0_irq(struct musb * pThis, u8 bIntrUSB,
                if (devctl & MGC_M_DEVCTL_LSDEV)
                        pThis->port1_status |= USB_PORT_STAT_LOW_SPEED;
 
-               usb_hcd_poll_rh_status(musb_to_hcd(pThis));
+               if (hcd->status_urb)
+                       usb_hcd_poll_rh_status(hcd);
+               else
+                       usb_hcd_resume_root_hub(hcd);
 
                MUSB_HST_MODE(pThis);