Re: [PATCH] usb: host: xhci-plat: add XHCI_MISSING_CAS quirk

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

 



On 20.02.20 07:31, Jun Li wrote:
>> -----Original Message-----
>> From: Martin Kepplinger <martin.kepplinger@xxxxxxx>
>> Sent: 2020年2月20日 1:37
>> To: Jun Li <jun.li@xxxxxxx>; Peter Chen <peter.chen@xxxxxxx>;
>> mathias.nyman@xxxxxxxxx
>> Cc: linux-usb@xxxxxxxxxxxxxxx; dl-linux-imx <linux-imx@xxxxxxx>; Anson Huang
>> <anson.huang@xxxxxxx>; shawnguo@xxxxxxxxxx; kernel@xxxxxxxxxxxxxx
>> Subject: [PATCH] usb: host: xhci-plat: add XHCI_MISSING_CAS quirk
>>
>> From: Li Jun <jun.li@xxxxxxx>
>>
>> i.MX8MQ USB3 host needs XHCI_MISSING_CAS quirk to warm reset the port to enum the
>> USB3 device plugged in while system sleep, as the port state is stuck in polling
>> mode after resume.
>>
>> Signed-off-by: Li Jun <jun.li@xxxxxxx>
>> Acked-by: Peter Chen <peter.chen@xxxxxxx>
>> ---
>>
>> Hi,
>>
>> Because resume from S3 suspend is broken for me on imx8mq, I stumbled upon this
>> patch in NXP's linux tree. (Please note that I'm not the author and I've not yet
>> put my SoB tag under it). This is just a
>> question:
>>
>> This patch (and the docs) clearly is missing in mainline Linux because the imx8mq
>> devicetree description includes it (which does nothing now).
>>
>> I've tested this and this particular addition doesn't fix my problem:
>>
>> [   84.257538] imx8mq-usb-phy 381f0040.usb-phy: bus resume
>> [   84.263195] imx8mq-usb-phy 382f0040.usb-phy: bus resume
>> [   84.268898] dwc3 38100000.usb: driver resume
>>
>> during resume from S3 suspend, here it still hangs.
> 
> Is your problem a system hang? If yes, this may another issue,
> where the hang happens? dwc3_resume_common()?

exactly! I followed to the point it hangs once again and it's

dwc3_core_init() called from dwc3_resume_common()'s "OTG" case.

Specifically, dwc3_writel() is what I don't get past:
https://elixir.bootlin.com/linux/v5.6-rc2/source/drivers/usb/dwc3/core.c#L934

do you have an idea why this writel() hangs?

> 
> The question patch is to give a warm reset for connected USB
> device if the link state is not connect/CAS after system resume,
> otherwise host will wait 2s for device appear:
> 
> [   44.834831] usb 2-1: Waited 2000ms for CONNECT
> ...
> [   45.055718] PM: resume devices took 3.132 seconds
> 
> I will post this patch and doc(to be updated) to upstream later.
> 

ok, good, thanks,

                                 martin




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux