Commit 6d349671 authored by Felipe Balbi's avatar Felipe Balbi

usb: musb: remove 'ignore_disconnect' flag

This was related to an old bug on early versions
of TUSB6010 which we don't support anymore.

It's known to cause issues on several other
situations with more recent devices so we
better remove this flag now and come up
with a better workaround should one be deemed
necessary.
Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
parent 09fc7d22
...@@ -380,7 +380,6 @@ static void musb_otg_timer_func(unsigned long data) ...@@ -380,7 +380,6 @@ static void musb_otg_timer_func(unsigned long data)
dev_dbg(musb->controller, "HNP: Unhandled mode %s\n", dev_dbg(musb->controller, "HNP: Unhandled mode %s\n",
usb_otg_state_string(musb->xceiv->state)); usb_otg_state_string(musb->xceiv->state));
} }
musb->ignore_disconnect = 0;
spin_unlock_irqrestore(&musb->lock, flags); spin_unlock_irqrestore(&musb->lock, flags);
} }
...@@ -727,7 +726,6 @@ static irqreturn_t musb_stage0_irq(struct musb *musb, u8 int_usb, ...@@ -727,7 +726,6 @@ static irqreturn_t musb_stage0_irq(struct musb *musb, u8 int_usb,
b_host: b_host:
musb->xceiv->state = OTG_STATE_B_HOST; musb->xceiv->state = OTG_STATE_B_HOST;
hcd->self.is_b_host = 1; hcd->self.is_b_host = 1;
musb->ignore_disconnect = 0;
del_timer(&musb->otg_timer); del_timer(&musb->otg_timer);
break; break;
default: default:
...@@ -750,7 +748,7 @@ static irqreturn_t musb_stage0_irq(struct musb *musb, u8 int_usb, ...@@ -750,7 +748,7 @@ static irqreturn_t musb_stage0_irq(struct musb *musb, u8 int_usb,
usb_otg_state_string(musb->xceiv->state), devctl); usb_otg_state_string(musb->xceiv->state), devctl);
} }
if ((int_usb & MUSB_INTR_DISCONNECT) && !musb->ignore_disconnect) { if (int_usb & MUSB_INTR_DISCONNECT) {
dev_dbg(musb->controller, "DISCONNECT (%s) as %s, devctl %02x\n", dev_dbg(musb->controller, "DISCONNECT (%s) as %s, devctl %02x\n",
usb_otg_state_string(musb->xceiv->state), usb_otg_state_string(musb->xceiv->state),
MUSB_MODE(musb), devctl); MUSB_MODE(musb), devctl);
...@@ -818,11 +816,6 @@ static irqreturn_t musb_stage0_irq(struct musb *musb, u8 int_usb, ...@@ -818,11 +816,6 @@ static irqreturn_t musb_stage0_irq(struct musb *musb, u8 int_usb,
usb_otg_state_string(musb->xceiv->state)); usb_otg_state_string(musb->xceiv->state));
switch (musb->xceiv->state) { switch (musb->xceiv->state) {
case OTG_STATE_A_SUSPEND: case OTG_STATE_A_SUSPEND:
/* We need to ignore disconnect on suspend
* otherwise tusb 2.0 won't reconnect after a
* power cycle, which breaks otg compliance.
*/
musb->ignore_disconnect = 1;
musb_g_reset(musb); musb_g_reset(musb);
/* FALLTHROUGH */ /* FALLTHROUGH */
case OTG_STATE_A_WAIT_BCON: /* OPT TD.4.7-900ms */ case OTG_STATE_A_WAIT_BCON: /* OPT TD.4.7-900ms */
...@@ -834,7 +827,6 @@ static irqreturn_t musb_stage0_irq(struct musb *musb, u8 int_usb, ...@@ -834,7 +827,6 @@ static irqreturn_t musb_stage0_irq(struct musb *musb, u8 int_usb,
+ msecs_to_jiffies(TA_WAIT_BCON(musb))); + msecs_to_jiffies(TA_WAIT_BCON(musb)));
break; break;
case OTG_STATE_A_PERIPHERAL: case OTG_STATE_A_PERIPHERAL:
musb->ignore_disconnect = 0;
del_timer(&musb->otg_timer); del_timer(&musb->otg_timer);
musb_g_reset(musb); musb_g_reset(musb);
break; break;
......
...@@ -382,7 +382,6 @@ struct musb { ...@@ -382,7 +382,6 @@ struct musb {
unsigned is_active:1; unsigned is_active:1;
unsigned is_multipoint:1; unsigned is_multipoint:1;
unsigned ignore_disconnect:1; /* during bus resets */
unsigned hb_iso_rx:1; /* high bandwidth iso rx? */ unsigned hb_iso_rx:1; /* high bandwidth iso rx? */
unsigned hb_iso_tx:1; /* high bandwidth iso tx? */ unsigned hb_iso_tx:1; /* high bandwidth iso tx? */
......
...@@ -145,7 +145,6 @@ static void musb_port_reset(struct musb *musb, bool do_reset) ...@@ -145,7 +145,6 @@ static void musb_port_reset(struct musb *musb, bool do_reset)
msleep(1); msleep(1);
} }
musb->ignore_disconnect = true;
power &= 0xf0; power &= 0xf0;
musb_writeb(mbase, MUSB_POWER, musb_writeb(mbase, MUSB_POWER,
power | MUSB_POWER_RESET); power | MUSB_POWER_RESET);
...@@ -158,8 +157,6 @@ static void musb_port_reset(struct musb *musb, bool do_reset) ...@@ -158,8 +157,6 @@ static void musb_port_reset(struct musb *musb, bool do_reset)
musb_writeb(mbase, MUSB_POWER, musb_writeb(mbase, MUSB_POWER,
power & ~MUSB_POWER_RESET); power & ~MUSB_POWER_RESET);
musb->ignore_disconnect = false;
power = musb_readb(mbase, MUSB_POWER); power = musb_readb(mbase, MUSB_POWER);
if (power & MUSB_POWER_HSMODE) { if (power & MUSB_POWER_HSMODE) {
dev_dbg(musb->controller, "high-speed device connected\n"); dev_dbg(musb->controller, "high-speed device connected\n");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment