lkml.org 
[lkml]   [2022]   [Feb]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH 3/3] drivers/net/ftgmac100: fix DHCP potential failure with systemd
From

在 2022/2/23 下午6:48, Andrew Lunn 写道:
>> diff --git a/drivers/net/ethernet/faraday/ftgmac100.c b/drivers/net/ethernet/faraday/ftgmac100.c
>> index c1deb6e5d26c5..d5356db7539a4 100644
>> --- a/drivers/net/ethernet/faraday/ftgmac100.c
>> +++ b/drivers/net/ethernet/faraday/ftgmac100.c
>> @@ -1402,8 +1402,17 @@ static void ftgmac100_adjust_link(struct net_device *netdev)
>> /* Disable all interrupts */
>> iowrite32(0, priv->base + FTGMAC100_OFFSET_IER);
>>
>> - /* Reset the adapter asynchronously */
>> - schedule_work(&priv->reset_task);
>> + /* Release phy lock to allow ftgmac100_reset to aquire it, keeping lock
>> + * order consistent to prevent dead lock.
>> + */
>> + if (netdev->phydev)
>> + mutex_unlock(&netdev->phydev->lock);
> No need to do this test. The fact that adjust_link is being called
> indicates there must be a PHY.

OK, will remove the check in v2.

Thanks,

Heyi

>
> Andrew

\
 
 \ /
  Last update: 2022-02-23 12:41    [W:0.084 / U:0.160 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site