usb: dwc2: regression during boot on Raspberry Pi

John Youn John.Youn at synopsys.com
Wed Nov 11 11:15:17 PST 2015


On 11/11/2015 9:57 AM, Alexander Aring wrote:
> Hi,
> 
> On Tue, Nov 10, 2015 at 11:21:56PM +0000, John Youn wrote:
>> On 11/9/2015 12:43 PM, Stefan Wahren wrote:
>>> Hi,
>>>
>>> Am 09.11.2015 um 12:53 schrieb Marek Szyprowski:
>>>> Hello,
>>>>
>>>>
>>>> This change looks reasonable, I remember the similar issue was in
>>>> s3c-hsotg driver
>>>> and it caused kernel ops on driver probe, when bootloader left dwc2
>>>> enabled.
>>>> The other way of solving it would be to add
>>>> irq_set_status_flags(irq, IRQ_NOAUTOEN);
>>>> before devm_request_irq() and then call enable_irq(irq) after
>>>> dwc2_lowlevel_hw_enable().
>>>>
>>>> Best regards
>>>
>>> unfortunately this fixes only the oops. I need to revert commit 
>>> 09a75e85779014 ("usb: dwc2: refactor common low-level hw code to 
>>> platform.c") to get USB working again.
>>>
>>> In dwc2_lowlevel_hw_init the following statement on Raspberry Pi seems 
>>> to never come true:
>>>
>>> if (!hsotg->phy && !hsotg->uphy && !hsotg->plat) {
>>> 	dev_err(hsotg->dev, "no platform data or transceiver defined\n");
>>> 	return -EPROBE_DEFER;
>>> }
>>>
>>> This looks wrong to me. According to dwc2 binding the PHY could be 
>>> optional, isn't it?
>>>
>>> Best regards
>>> Stefan
>>>
>>
>>
>> The gadget side required it but it looks like the host side
>> didn't.
>>
>> When Marek did the low-level hw refactor, some of the gadget
>> stuff was brought up to the common layer, including the returning
>> of -EPROBE_DEFER when no phys are defined.
>>
> 
> So the issue according [0] should be fixed? That's good to know, I was
> in the state that it isn't fixed and would reply with some "ping, what I
> should do now". But why I wasn't cc'ed for that fix.
> 
> Anyway..., is the issue [0] fixed now or not?
> 
> - Alex
> 
> [0] http://marc.info/?l=linux-usb&m=144585173030738&w=2
> 


Hi Alex,

I'll post a couple patches shortly, one of which should fix it.

Appreciate if you can review or test.

Regards,
John




More information about the linux-rpi-kernel mailing list