From f69169f90c434088afd97a7099b47837d8e39865 Mon Sep 17 00:00:00 2001 From: David Brownell Date: Mon, 22 Jan 2007 14:38:18 -0800 Subject: [PATCH] musb_hdrc: Make CONNECT irqs work again 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 --- drivers/usb/musb/plat_uds.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/usb/musb/plat_uds.c b/drivers/usb/musb/plat_uds.c index d98c4bcd85b..152c9797d08 100644 --- a/drivers/usb/musb/plat_uds.c +++ b/drivers/usb/musb/plat_uds.c @@ -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); -- 2.41.1