* [PATCH v1 net] lan743x: Remove phy_read from link status change function
@ 2019-01-07 19:00 Bryan Whitehead
2019-01-07 20:30 ` Andrew Lunn
2019-01-08 21:27 ` David Miller
0 siblings, 2 replies; 3+ messages in thread
From: Bryan Whitehead @ 2019-01-07 19:00 UTC (permalink / raw)
To: davem; +Cc: netdev, UNGLinuxDriver
It has been noticed that some phys do not have the registers
required by the previous implementation.
To fix this, instead of using phy_read, the required information
is extracted from the phy_device structure.
fixes: 23f0703c125b ("lan743x: Add main source files for new lan743x driver")
Signed-off-by: Bryan Whitehead <Bryan.Whitehead@microchip.com>
---
drivers/net/ethernet/microchip/lan743x_main.c | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
diff --git a/drivers/net/ethernet/microchip/lan743x_main.c b/drivers/net/ethernet/microchip/lan743x_main.c
index 20c9377..310807e 100644
--- a/drivers/net/ethernet/microchip/lan743x_main.c
+++ b/drivers/net/ethernet/microchip/lan743x_main.c
@@ -962,13 +962,10 @@ static void lan743x_phy_link_status_change(struct net_device *netdev)
memset(&ksettings, 0, sizeof(ksettings));
phy_ethtool_get_link_ksettings(netdev, &ksettings);
- local_advertisement = phy_read(phydev, MII_ADVERTISE);
- if (local_advertisement < 0)
- return;
-
- remote_advertisement = phy_read(phydev, MII_LPA);
- if (remote_advertisement < 0)
- return;
+ local_advertisement =
+ linkmode_adv_to_mii_adv_t(phydev->advertising);
+ remote_advertisement =
+ linkmode_adv_to_mii_adv_t(phydev->lp_advertising);
lan743x_phy_update_flowcontrol(adapter,
ksettings.base.duplex,
--
2.7.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v1 net] lan743x: Remove phy_read from link status change function
2019-01-07 19:00 [PATCH v1 net] lan743x: Remove phy_read from link status change function Bryan Whitehead
@ 2019-01-07 20:30 ` Andrew Lunn
2019-01-08 21:27 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: Andrew Lunn @ 2019-01-07 20:30 UTC (permalink / raw)
To: Bryan Whitehead; +Cc: davem, netdev, UNGLinuxDriver
On Mon, Jan 07, 2019 at 02:00:09PM -0500, Bryan Whitehead wrote:
> It has been noticed that some phys do not have the registers
> required by the previous implementation.
>
> To fix this, instead of using phy_read, the required information
> is extracted from the phy_device structure.
>
> fixes: 23f0703c125b ("lan743x: Add main source files for new lan743x driver")
> Signed-off-by: Bryan Whitehead <Bryan.Whitehead@microchip.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Andrew
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v1 net] lan743x: Remove phy_read from link status change function
2019-01-07 19:00 [PATCH v1 net] lan743x: Remove phy_read from link status change function Bryan Whitehead
2019-01-07 20:30 ` Andrew Lunn
@ 2019-01-08 21:27 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2019-01-08 21:27 UTC (permalink / raw)
To: Bryan.Whitehead; +Cc: netdev, UNGLinuxDriver
From: Bryan Whitehead <Bryan.Whitehead@microchip.com>
Date: Mon, 7 Jan 2019 14:00:09 -0500
> It has been noticed that some phys do not have the registers
> required by the previous implementation.
>
> To fix this, instead of using phy_read, the required information
> is extracted from the phy_device structure.
>
> fixes: 23f0703c125b ("lan743x: Add main source files for new lan743x driver")
> Signed-off-by: Bryan Whitehead <Bryan.Whitehead@microchip.com>
Applied, thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-01-08 21:27 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-07 19:00 [PATCH v1 net] lan743x: Remove phy_read from link status change function Bryan Whitehead
2019-01-07 20:30 ` Andrew Lunn
2019-01-08 21:27 ` David Miller
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.