[Letux-kernel] musb otg/y-cable regressions, OTG support removal
Andreas Kemnade
andreas at kemnade.info
Tue Feb 19 20:33:37 CET 2019
On Mon, 18 Feb 2019 09:07:27 +0100
"H. Nikolaus Schaller" <hns at goldelico.com> wrote:
> Hi,
>
> > Am 18.02.2019 um 07:58 schrieb Andreas Kemnade <andreas at kemnade.info>:
> >
> > Hi,
> >
> > after quite some searching why b_host mode only works very randomly, I found
> > out that
> > - musb: disable b_host wait timeout for y-cable usage
> > is missing in >= letux-4.18. Seems to be forgotten in a conflict resolution.
>
> I have checked and it did no longer apply. So yes, it was probably forgotten
> to convert into a correct fix.
>
> This one appears to apply:
>
> commit 1a27badcf1ce03cb8bc69bdb72d76fd27660cf49 (HEAD -> letux/musb-fixes)
> Author: Andreas Kemnade <andreas at kemnade.info>
> Date: Mon Feb 13 17:16:57 2017 +0100
>
> musb: disable b_host wait timeout for y-cable usage
>
> To be able to use Y-cables to power the device and use it as host at
> the same time, disable the b_waitacon timeout.
>
> Signed-off-by: Andreas Kemnade <andreas at kemnade.info>
>
> diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c
> index b7d56272f9d1..780787540b85 100644
> --- a/drivers/usb/musb/musb_core.c
> +++ b/drivers/usb/musb/musb_core.c
> @@ -718,9 +718,15 @@ static void musb_handle_intr_suspend(struct musb *musb, u8 devctl)
> if (musb->is_active) {
> musb->xceiv->otg->state = OTG_STATE_B_WAIT_ACON;
> musb_dbg(musb, "HNP: Setting timer for b_ase0_brst");
> + /* If trying to switch to b_host without a real
> + * hnp reset (y-cables and such) the timer might
> + * be disturbing
> + */
> +#if 0
> mod_timer(&musb->otg_timer, jiffies
> + msecs_to_jiffies(
> OTG_TIME_B_ASE0_BRST));
> +#endif
> }
> break;
> case OTG_STATE_A_WAIT_BCON:
>
>
> > - and them we have this one
> > commit 0a9134bd733bbb99bd18f5520a488960170271f2
> > Author: Bin Liu <b-liu at ti.com>
> > Date: Mon May 21 08:42:19 2018 -0500
> >
> > usb: musb: disable otg protocol support
> >
> > As decided in the discussion [1] we are deleting the otg protocol
> > support from the musb drivers.
> >
> > First this patch disables the flags for enabling the otg protocols. We
> > will later gradually delete the otg protocol code from the musb drivers.
> >
> > [1] https://www.spinics.net/lists/linux-usb/msg167003.html
> >
> > Signed-off-by: Bin Liu <b-liu at ti.com>
> > Signed-off-by: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
> >
> > that seems also to influence things.
> >
ok, played a bit around with it. Reverting it enables me to do
all the things I do with that otg usb.
Regards,
Andreas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.goldelico.com/pipermail/letux-kernel/attachments/20190219/ca8d0b7d/attachment.asc>
More information about the Letux-kernel
mailing list