/[packages]/cauldron/kernel/current/PATCHES/patches/0056-net-phy-phylink-ensure-the-carrier-is-off-when-start.patch
ViewVC logotype

Annotation of /cauldron/kernel/current/PATCHES/patches/0056-net-phy-phylink-ensure-the-carrier-is-off-when-start.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1329221 - (hide annotations) (download)
Fri Nov 9 22:05:45 2018 UTC (5 years, 11 months ago) by tmb
File size: 1524 byte(s)
add fixes from sashas autosel queue
1 tmb 1329221 From c1d0152023968af0a6cc2e423410e97bc22d4989 Mon Sep 17 00:00:00 2001
2     From: Antoine Tenart <antoine.tenart@bootlin.com>
3     Date: Wed, 19 Sep 2018 11:39:31 +0200
4     Subject: [PATCH 056/145] net: phy: phylink: ensure the carrier is off when
5     starting phylink
6    
7     [ Upstream commit aeeb2e8fdefdd5d257a1446351c70cb3df540199 ]
8    
9     Phylink made an assumption about the carrier state being down when
10     calling phylink_start(). If this assumption isn't satisfied, the
11     internal phylink state could misbehave and a net device could end up not
12     being functional.
13    
14     This patch fixes this by explicitly calling netif_carrier_off() in
15     phylink_start().
16    
17     Signed-off-by: Antoine Tenart <antoine.tenart@bootlin.com>
18     Acked-by: Russell King <rmk+kernel@armlinux.org.uk>
19     Signed-off-by: David S. Miller <davem@davemloft.net>
20     Signed-off-by: Sasha Levin <sashal@kernel.org>
21     ---
22     drivers/net/phy/phylink.c | 3 +++
23     1 file changed, 3 insertions(+)
24    
25     diff --git a/drivers/net/phy/phylink.c b/drivers/net/phy/phylink.c
26     index 7abca86c3aa9..70f3f90c2ed6 100644
27     --- a/drivers/net/phy/phylink.c
28     +++ b/drivers/net/phy/phylink.c
29     @@ -907,6 +907,9 @@ void phylink_start(struct phylink *pl)
30     phylink_an_mode_str(pl->link_an_mode),
31     phy_modes(pl->link_config.interface));
32    
33     + /* Always set the carrier off */
34     + netif_carrier_off(pl->netdev);
35     +
36     /* Apply the link configuration to the MAC when starting. This allows
37     * a fixed-link to start with the correct parameters, and also
38     * ensures that we set the appropriate advertisement for Serdes links.
39     --
40     2.19.1
41    

  ViewVC Help
Powered by ViewVC 1.1.30