Re: [Issue report] drivers/ftgmac100: DHCP occasionally fails during boot up or link down/up

From: Andrew Lunn
Date: Sat Feb 19 2022 - 13:28:45 EST


On Sat, Feb 19, 2022 at 06:08:35PM +0800, Heyi Guo wrote:
> Hi Andrew,
>
> The DHCP issue is gone after applying below patch. I put the lock statements
> outside of the pure reset function, for the phydev lock has been acquired
> before calling adjust_link. The lock order in ftgmac100_reset_task() was
> also changed, to make it the same as the lock procedure in adjust_link, in
> which the phydev is locked first and then rtnl_lock. I'm not quite sure
> whether it will bring in any potential dead lock. Any advice?

Did you run the code with CONFIG_PROVE_LOCKING enabled. That will help
detect possible deadlock situations.

Andrew