Re: [PATCH] usb: dwc3: core: Don't try to get PHYs during suspend/resume

From: Felipe Balbi
Date: Thu Jan 11 2018 - 03:25:56 EST



Hi,

Roger Quadros <rogerq@xxxxxx> writes:
>>>> - ret = dwc3_core_soft_reset(dwc);
>>>> + ret = dwc3_core_get_phy(dwc);
>>>
>>> we can get_phy in dwc3_core_init() as it will get called on resume().
>>> This was the $subject of this patch.
>>
>> indeed. thanks :-)
>>
>
> oops sorry. I meant we can't call dwc3_core_get_phy() in dwc3_core_init(). :P

bit of a chicken-and-egg problem. We need to setup the PHY interface
before getting the PHYs, but can't get PHY during resume. Maybe the best
way here would be to check for the pointers being valid. Something like:

if (!phy)
get_phy();

--
balbi

Attachment: signature.asc
Description: PGP signature