From: Gregory CLEMENT <gregory.clement@free-electrons.com>
To: "David S. Miller" <davem@davemloft.net>,
linux-kernel@vger.kernel.org, netdev@vger.kernel.org
Cc: "Jason Cooper" <jason@lakedaemon.net>,
"Andrew Lunn" <andrew@lunn.ch>,
"Sebastian Hesselbarth" <sebastian.hesselbarth@gmail.com>,
"Gregory CLEMENT" <gregory.clement@free-electrons.com>,
"Thomas Petazzoni" <thomas.petazzoni@free-electrons.com>,
linux-arm-kernel@lists.infradead.org,
"Antoine Tenart" <antoine.tenart@free-electrons.com>,
"Miquèl Raynal" <miquel.raynal@free-electrons.com>,
"Nadav Haklai" <nadavh@marvell.com>,
"Marcin Wojtas" <mw@semihalf.com>,
"Lior Amsalem" <alior@marvell.com>,
"Dmitri Epshtein" <dima@marvell.com>,
"Yelena Krivosheev" <yelena@marvell.com>,
stable@vger.kernel.org
Subject: [PATCH net 1/3] net: mvneta: clear interface link status on port disable
Date: Tue, 19 Dec 2017 17:59:45 +0100 [thread overview]
Message-ID: <20171219165947.28516-2-gregory.clement@free-electrons.com> (raw)
In-Reply-To: <20171219165947.28516-1-gregory.clement@free-electrons.com>
From: Yelena Krivosheev <yelena@marvell.com>
When port connect to PHY in polling mode (with poll interval 1 sec),
port and phy link status must be synchronize in order don't loss link
change event.
[gregory.clement@free-electrons.com: add fixes tag]
Cc: <stable@vger.kernel.org>
Fixes: c5aff18204da ("net: mvneta: driver for Marvell Armada 370/XP network unit")
Signed-off-by: Yelena Krivosheev <yelena@marvell.com>
Tested-by: Dmitri Epshtein <dima@marvell.com>
Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
---
drivers/net/ethernet/marvell/mvneta.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/net/ethernet/marvell/mvneta.c b/drivers/net/ethernet/marvell/mvneta.c
index bc93b69cfd1e..16b2bfb2cf51 100644
--- a/drivers/net/ethernet/marvell/mvneta.c
+++ b/drivers/net/ethernet/marvell/mvneta.c
@@ -1214,6 +1214,10 @@ static void mvneta_port_disable(struct mvneta_port *pp)
val &= ~MVNETA_GMAC0_PORT_ENABLE;
mvreg_write(pp, MVNETA_GMAC_CTRL_0, val);
+ pp->link = 0;
+ pp->duplex = -1;
+ pp->speed = 0;
+
udelay(200);
}
--
2.15.1
next prev parent reply other threads:[~2017-12-19 17:00 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-19 16:59 [PATCH net 0/3] Few mvneta fixes Gregory CLEMENT
2017-12-19 16:59 ` Gregory CLEMENT [this message]
2017-12-19 16:59 ` [PATCH net 2/3] net: mvneta: use proper rxq_number in loop on rx queues Gregory CLEMENT
2017-12-19 16:59 ` [PATCH net 3/3] net: mvneta: eliminate wrong call to handle rx descriptor error Gregory CLEMENT
2017-12-19 20:18 ` [PATCH net 0/3] Few mvneta fixes Arnd Bergmann
2017-12-20 5:19 ` Willy Tarreau
2017-12-20 17:26 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171219165947.28516-2-gregory.clement@free-electrons.com \
--to=gregory.clement@free-electrons.com \
--cc=alior@marvell.com \
--cc=andrew@lunn.ch \
--cc=antoine.tenart@free-electrons.com \
--cc=davem@davemloft.net \
--cc=dima@marvell.com \
--cc=jason@lakedaemon.net \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=miquel.raynal@free-electrons.com \
--cc=mw@semihalf.com \
--cc=nadavh@marvell.com \
--cc=netdev@vger.kernel.org \
--cc=sebastian.hesselbarth@gmail.com \
--cc=stable@vger.kernel.org \
--cc=thomas.petazzoni@free-electrons.com \
--cc=yelena@marvell.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®