public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: b-liu@ti.com (Bin Liu)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] usb: musb: Check for host-mode using is_host_active() on reset interrupt
Date: Mon, 9 Oct 2017 11:03:43 -0500	[thread overview]
Message-ID: <20171009160343.GC32614@uda0271908> (raw)
In-Reply-To: <20170927103522.30202-1-net147@gmail.com>

Hi,

On Wed, Sep 27, 2017 at 08:35:22PM +1000, Jonathan Liu wrote:
> The sunxi musb has a bug where sometimes it will generate a babble
> error on device disconnect instead of a disconnect IRQ. When this
> happens the musb controller switches from host mode to device mode
> (it clears MUSB_DEVCTL_HM/MUSB_DEVCTL_SESSION and sets
> MUSB_DEVCTL_BDEVICE) and gets stuck in this state.
> 
> The babble error is misdetected as a bus reset because MUSB_DEVCTL_HM
> was cleared.
> 
> To fix this, use is_host_active() rather than (devctl & MUSB_DEVCTL_HM)
> to detect babble error so that sunxi musb babble recovery can handle it
> by restoring the mode. This information is provided by the driver logic
> and does not rely on register contents.
> 
> Cc: stable at vger.kernel.org # v4.1+
> Signed-off-by: Jonathan Liu <net147@gmail.com>

Applied. Thanks.
-Bin.

      reply	other threads:[~2017-10-09 16:03 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-27 10:35 [PATCH] usb: musb: Check for host-mode using is_host_active() on reset interrupt Jonathan Liu
2017-10-09 16:03 ` Bin Liu [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171009160343.GC32614@uda0271908 \
    --to=b-liu@ti.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox