Skip to content
Commit 1e73cfe8 authored by Pavithra Sathyanarayanan's avatar Pavithra Sathyanarayanan Committed by David S. Miller
Browse files

net: microchip: lan743x: add fixed phy unregister support



When operating in fixed phy mode and if there is repeated open/close
phy test cases, everytime the fixed phy is registered as a new phy
which leads to overrun after 32 iterations. It is solved by adding
fixed_phy_unregister() in the phy_close path.

In phy_close path, netdev->phydev cannot be used directly in
fixed_phy_unregister() due to two reasons,
    - netdev->phydev is set to NULL in phy_disconnect()
    - fixed_phy_unregister() can be called only after phy_disconnect()
So saving the netdev->phydev in local variable 'phydev' and
passing it to phy_disconnect().

Signed-off-by: default avatarPavithra Sathyanarayanan <Pavithra.Sathyanarayanan@microchip.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 037dbd12
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment