Netdev Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] net: ethernet: cavium: octeon_mgmt: use phy_start and phy_stop
@ 2020-09-25 12:44 Ivan Khoronzhuk
2020-09-25 16:30 ` Andrew Lunn
2020-09-25 23:55 ` David Miller
0 siblings, 2 replies; 3+ messages in thread
From: Ivan Khoronzhuk @ 2020-09-25 12:44 UTC (permalink / raw)
To: netdev, davem, kuba; +Cc: alexander.sverdlin, linux-kernel, Ivan Khoronzhuk
To start also "phy state machine", with UP state as it should be,
the phy_start() has to be used, in another case machine even is not
triggered. After this change negotiation is supposed to be triggered
by SM workqueue.
It's not correct usage, but it appears after the following patch,
so add it as a fix.
Fixes: 74a992b3598a ("net: phy: add phy_check_link_status")
Signed-off-by: Ivan Khoronzhuk <ikhoronz@cisco.com>
---
Based on net/master
drivers/net/ethernet/cavium/octeon/octeon_mgmt.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/cavium/octeon/octeon_mgmt.c b/drivers/net/ethernet/cavium/octeon/octeon_mgmt.c
index 3e17ce0d2314..6cb2162a75d4 100644
--- a/drivers/net/ethernet/cavium/octeon/octeon_mgmt.c
+++ b/drivers/net/ethernet/cavium/octeon/octeon_mgmt.c
@@ -1219,7 +1219,7 @@ static int octeon_mgmt_open(struct net_device *netdev)
*/
if (netdev->phydev) {
netif_carrier_off(netdev);
- phy_start_aneg(netdev->phydev);
+ phy_start(netdev->phydev);
}
netif_wake_queue(netdev);
@@ -1247,8 +1247,10 @@ static int octeon_mgmt_stop(struct net_device *netdev)
napi_disable(&p->napi);
netif_stop_queue(netdev);
- if (netdev->phydev)
+ if (netdev->phydev) {
+ phy_stop(netdev->phydev);
phy_disconnect(netdev->phydev);
+ }
netif_carrier_off(netdev);
--
2.20.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] net: ethernet: cavium: octeon_mgmt: use phy_start and phy_stop
2020-09-25 12:44 [PATCH] net: ethernet: cavium: octeon_mgmt: use phy_start and phy_stop Ivan Khoronzhuk
@ 2020-09-25 16:30 ` Andrew Lunn
2020-09-25 23:55 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: Andrew Lunn @ 2020-09-25 16:30 UTC (permalink / raw)
To: Ivan Khoronzhuk
Cc: netdev, davem, kuba, alexander.sverdlin, linux-kernel, Ivan Khoronzhuk
On Fri, Sep 25, 2020 at 03:44:39PM +0300, Ivan Khoronzhuk wrote:
> To start also "phy state machine", with UP state as it should be,
> the phy_start() has to be used, in another case machine even is not
> triggered. After this change negotiation is supposed to be triggered
> by SM workqueue.
>
> It's not correct usage, but it appears after the following patch,
> so add it as a fix.
>
> Fixes: 74a992b3598a ("net: phy: add phy_check_link_status")
> Signed-off-by: Ivan Khoronzhuk <ikhoronz@cisco.com>
> ---
>
> Based on net/master
Hi Ivan
In the future, please make the patch subject [PATCH net] to make it
clear which tree it is for.
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Andrew
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] net: ethernet: cavium: octeon_mgmt: use phy_start and phy_stop
2020-09-25 12:44 [PATCH] net: ethernet: cavium: octeon_mgmt: use phy_start and phy_stop Ivan Khoronzhuk
2020-09-25 16:30 ` Andrew Lunn
@ 2020-09-25 23:55 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2020-09-25 23:55 UTC (permalink / raw)
To: ivan.khoronzhuk; +Cc: netdev, kuba, alexander.sverdlin, linux-kernel, ikhoronz
From: Ivan Khoronzhuk <ivan.khoronzhuk@gmail.com>
Date: Fri, 25 Sep 2020 15:44:39 +0300
> To start also "phy state machine", with UP state as it should be,
> the phy_start() has to be used, in another case machine even is not
> triggered. After this change negotiation is supposed to be triggered
> by SM workqueue.
>
> It's not correct usage, but it appears after the following patch,
> so add it as a fix.
>
> Fixes: 74a992b3598a ("net: phy: add phy_check_link_status")
> Signed-off-by: Ivan Khoronzhuk <ikhoronz@cisco.com>
Applied and queued up for -stable, thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-09-25 23:55 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-25 12:44 [PATCH] net: ethernet: cavium: octeon_mgmt: use phy_start and phy_stop Ivan Khoronzhuk
2020-09-25 16:30 ` Andrew Lunn
2020-09-25 23:55 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).