diff options
Diffstat (limited to 'drivers/usb/musb/musb_core.c')
-rw-r--r-- | drivers/usb/musb/musb_core.c | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c index fc4d97e2bc3d..bd14fed44af1 100644 --- a/drivers/usb/musb/musb_core.c +++ b/drivers/usb/musb/musb_core.c | |||
@@ -483,7 +483,7 @@ static irqreturn_t musb_stage0_irq(struct musb *musb, u8 int_usb, | |||
483 | 483 | ||
484 | musb->xceiv->state = OTG_STATE_A_HOST; | 484 | musb->xceiv->state = OTG_STATE_A_HOST; |
485 | musb->is_active = 1; | 485 | musb->is_active = 1; |
486 | usb_hcd_resume_root_hub(musb_to_hcd(musb)); | 486 | musb_host_resume_root_hub(musb); |
487 | break; | 487 | break; |
488 | case OTG_STATE_B_WAIT_ACON: | 488 | case OTG_STATE_B_WAIT_ACON: |
489 | musb->xceiv->state = OTG_STATE_B_PERIPHERAL; | 489 | musb->xceiv->state = OTG_STATE_B_PERIPHERAL; |
@@ -500,7 +500,7 @@ static irqreturn_t musb_stage0_irq(struct musb *musb, u8 int_usb, | |||
500 | case OTG_STATE_A_SUSPEND: | 500 | case OTG_STATE_A_SUSPEND: |
501 | /* possibly DISCONNECT is upcoming */ | 501 | /* possibly DISCONNECT is upcoming */ |
502 | musb->xceiv->state = OTG_STATE_A_HOST; | 502 | musb->xceiv->state = OTG_STATE_A_HOST; |
503 | usb_hcd_resume_root_hub(musb_to_hcd(musb)); | 503 | musb_host_resume_root_hub(musb); |
504 | break; | 504 | break; |
505 | case OTG_STATE_B_WAIT_ACON: | 505 | case OTG_STATE_B_WAIT_ACON: |
506 | case OTG_STATE_B_PERIPHERAL: | 506 | case OTG_STATE_B_PERIPHERAL: |
@@ -642,7 +642,7 @@ static irqreturn_t musb_stage0_irq(struct musb *musb, u8 int_usb, | |||
642 | * undesired detour through A_WAIT_BCON. | 642 | * undesired detour through A_WAIT_BCON. |
643 | */ | 643 | */ |
644 | musb_hnp_stop(musb); | 644 | musb_hnp_stop(musb); |
645 | usb_hcd_resume_root_hub(musb_to_hcd(musb)); | 645 | musb_host_resume_root_hub(musb); |
646 | musb_root_disconnect(musb); | 646 | musb_root_disconnect(musb); |
647 | musb_platform_try_idle(musb, jiffies | 647 | musb_platform_try_idle(musb, jiffies |
648 | + msecs_to_jiffies(musb->a_wait_bcon | 648 | + msecs_to_jiffies(musb->a_wait_bcon |
@@ -732,17 +732,13 @@ b_host: | |||
732 | if ((devctl & MUSB_DEVCTL_VBUS) | 732 | if ((devctl & MUSB_DEVCTL_VBUS) |
733 | == (3 << MUSB_DEVCTL_VBUS_SHIFT)) { | 733 | == (3 << MUSB_DEVCTL_VBUS_SHIFT)) { |
734 | musb->xceiv->state = OTG_STATE_A_HOST; | 734 | musb->xceiv->state = OTG_STATE_A_HOST; |
735 | hcd->self.is_b_host = 0; | 735 | if (hcd) |
736 | hcd->self.is_b_host = 0; | ||
736 | } | 737 | } |
737 | break; | 738 | break; |
738 | } | 739 | } |
739 | 740 | ||
740 | /* poke the root hub */ | 741 | musb_host_poke_root_hub(musb); |
741 | MUSB_HST_MODE(musb); | ||
742 | if (hcd->status_urb) | ||
743 | usb_hcd_poll_rh_status(hcd); | ||
744 | else | ||
745 | usb_hcd_resume_root_hub(hcd); | ||
746 | 742 | ||
747 | dev_dbg(musb->controller, "CONNECT (%s) devctl %02x\n", | 743 | dev_dbg(musb->controller, "CONNECT (%s) devctl %02x\n", |
748 | usb_otg_state_string(musb->xceiv->state), devctl); | 744 | usb_otg_state_string(musb->xceiv->state), devctl); |
@@ -757,7 +753,7 @@ b_host: | |||
757 | switch (musb->xceiv->state) { | 753 | switch (musb->xceiv->state) { |
758 | case OTG_STATE_A_HOST: | 754 | case OTG_STATE_A_HOST: |
759 | case OTG_STATE_A_SUSPEND: | 755 | case OTG_STATE_A_SUSPEND: |
760 | usb_hcd_resume_root_hub(musb_to_hcd(musb)); | 756 | musb_host_resume_root_hub(musb); |
761 | musb_root_disconnect(musb); | 757 | musb_root_disconnect(musb); |
762 | if (musb->a_wait_bcon != 0) | 758 | if (musb->a_wait_bcon != 0) |
763 | musb_platform_try_idle(musb, jiffies | 759 | musb_platform_try_idle(musb, jiffies |