Re: [PATCH] usb: musb: fix idling for suspend after disconnect interrupt

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

* Bin Liu <b-liu@xxxxxx> [191212 16:02]:
> Hi Tony,
> 
> Sorry for my late response.

No worries.

> On Mon, Nov 25, 2019 at 07:41:51PM -0800, Tony Lindgren wrote:
> > When disconnected as USB B-device, we sometimes get a suspend interrupt
> > after disconnect interrupt. In that case we have devctl set to 99 with
> > VBUS still valid and musb_pm_runtime_check_session() wrongly things we
> > have an active session. We have no other interrupts after disconnect
> > coming in this case at least with the omap2430 glue.
> 
> I don't have an omap2430 platform to test, but its musb doesn't generate
> DISCONNECT interrupt at all when disconnected from USB host in any case?
> It is a surprise, the musb core driver expects the DISCONNECT interrupt
> after VBUS is lost and relies on it to tear down the gadget driver and
> the state machine. I am wondering how its USB is functional without the
> DISCONNECT event...

We do get DISCONNECT, but we can then get a SUSPEND after DISCONNECT
has already happened..

That will wake up musb waiting for further interrupts thinking it's
connected. But after that there are no more interrupts as the cable
is disconnected so we need to poll the status again.

If we see SUSPEND before DISCONNECT, then things idle fine.

Regards,

Tony



[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux