* [PATCH net v3 0/2] net: mvpp2: phylink validate fixes
@ 2018-12-17 14:56 Antoine Tenart
2018-12-17 14:56 ` [PATCH net v3 1/2] net: mvpp2: 10G modes aren't supported on all ports Antoine Tenart
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Antoine Tenart @ 2018-12-17 14:56 UTC (permalink / raw)
To: davem, linux
Cc: Antoine Tenart, netdev, linux-kernel, thomas.petazzoni,
maxime.chevallier, gregory.clement, miquel.raynal, nadavh,
stefanc, ymarkman, mw
Hi,
This small series introduces 2 fixes for the phylink validate function
of the Marvell PPv2 Ethernet driver.
Since v2:
- Added an additional patch (2/2) as suggested by Russell.
- Rebased on top of net/master.
Since v1:
- Rebased on top of net/master.
Antoine Tenart (2):
net: mvpp2: 10G modes aren't supported on all ports
net: mvpp2: fix the phylink mode validation
drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | 16 +++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)
--
2.19.2
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH net v3 1/2] net: mvpp2: 10G modes aren't supported on all ports
2018-12-17 14:56 [PATCH net v3 0/2] net: mvpp2: phylink validate fixes Antoine Tenart
@ 2018-12-17 14:56 ` Antoine Tenart
2018-12-17 14:56 ` [PATCH net v3 2/2] net: mvpp2: fix the phylink mode validation Antoine Tenart
2018-12-19 0:42 ` [PATCH net v3 0/2] net: mvpp2: phylink validate fixes David Miller
2 siblings, 0 replies; 7+ messages in thread
From: Antoine Tenart @ 2018-12-17 14:56 UTC (permalink / raw)
To: davem, linux
Cc: Antoine Tenart, netdev, linux-kernel, thomas.petazzoni,
maxime.chevallier, gregory.clement, miquel.raynal, nadavh,
stefanc, ymarkman, mw, Baruch Siach
The mvpp2_phylink_validate() function sets all modes that are
supported by a given PPv2 port. A recent change made all ports to
advertise they support 10G modes in certain cases. This is not true,
as only the port #0 can do so. This patch fixes it.
Fixes: 01b3fd5ac97c ("net: mvpp2: fix detection of 10G SFP modules")
Cc: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Antoine Tenart <antoine.tenart@bootlin.com>
---
drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c b/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
index 125ea99418df..88aa488054a8 100644
--- a/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
+++ b/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
@@ -4405,12 +4405,14 @@ static void mvpp2_phylink_validate(struct net_device *dev,
case PHY_INTERFACE_MODE_10GKR:
case PHY_INTERFACE_MODE_XAUI:
case PHY_INTERFACE_MODE_NA:
- phylink_set(mask, 10000baseCR_Full);
- phylink_set(mask, 10000baseSR_Full);
- phylink_set(mask, 10000baseLR_Full);
- phylink_set(mask, 10000baseLRM_Full);
- phylink_set(mask, 10000baseER_Full);
- phylink_set(mask, 10000baseKR_Full);
+ if (port->gop_id == 0) {
+ phylink_set(mask, 10000baseCR_Full);
+ phylink_set(mask, 10000baseSR_Full);
+ phylink_set(mask, 10000baseLR_Full);
+ phylink_set(mask, 10000baseLRM_Full);
+ phylink_set(mask, 10000baseER_Full);
+ phylink_set(mask, 10000baseKR_Full);
+ }
/* Fall-through */
case PHY_INTERFACE_MODE_RGMII:
case PHY_INTERFACE_MODE_RGMII_ID:
--
2.19.2
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH net v3 2/2] net: mvpp2: fix the phylink mode validation
2018-12-17 14:56 [PATCH net v3 0/2] net: mvpp2: phylink validate fixes Antoine Tenart
2018-12-17 14:56 ` [PATCH net v3 1/2] net: mvpp2: 10G modes aren't supported on all ports Antoine Tenart
@ 2018-12-17 14:56 ` Antoine Tenart
2018-12-19 0:42 ` [PATCH net v3 0/2] net: mvpp2: phylink validate fixes David Miller
2 siblings, 0 replies; 7+ messages in thread
From: Antoine Tenart @ 2018-12-17 14:56 UTC (permalink / raw)
To: davem, linux
Cc: Antoine Tenart, netdev, linux-kernel, thomas.petazzoni,
maxime.chevallier, gregory.clement, miquel.raynal, nadavh,
stefanc, ymarkman, mw
The mvpp2_phylink_validate() sets all modes that are supported by a
given PPv2 port. An mistake made the 10000baseT_Full mode being
advertised in some cases when a port wasn't configured to perform at
10G. This patch fixes this.
Fixes: d97c9f4ab000 ("net: mvpp2: 1000baseX support")
Reported-by: Russell King <linux@armlinux.org.uk>
Signed-off-by: Antoine Tenart <antoine.tenart@bootlin.com>
---
drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c b/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
index 88aa488054a8..f1dab0b55769 100644
--- a/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
+++ b/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
@@ -4406,6 +4406,7 @@ static void mvpp2_phylink_validate(struct net_device *dev,
case PHY_INTERFACE_MODE_XAUI:
case PHY_INTERFACE_MODE_NA:
if (port->gop_id == 0) {
+ phylink_set(mask, 10000baseT_Full);
phylink_set(mask, 10000baseCR_Full);
phylink_set(mask, 10000baseSR_Full);
phylink_set(mask, 10000baseLR_Full);
@@ -4423,7 +4424,6 @@ static void mvpp2_phylink_validate(struct net_device *dev,
phylink_set(mask, 10baseT_Full);
phylink_set(mask, 100baseT_Half);
phylink_set(mask, 100baseT_Full);
- phylink_set(mask, 10000baseT_Full);
/* Fall-through */
case PHY_INTERFACE_MODE_1000BASEX:
case PHY_INTERFACE_MODE_2500BASEX:
--
2.19.2
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH net v3 0/2] net: mvpp2: phylink validate fixes
2018-12-17 14:56 [PATCH net v3 0/2] net: mvpp2: phylink validate fixes Antoine Tenart
2018-12-17 14:56 ` [PATCH net v3 1/2] net: mvpp2: 10G modes aren't supported on all ports Antoine Tenart
2018-12-17 14:56 ` [PATCH net v3 2/2] net: mvpp2: fix the phylink mode validation Antoine Tenart
@ 2018-12-19 0:42 ` David Miller
2018-12-19 8:26 ` Antoine Tenart
2 siblings, 1 reply; 7+ messages in thread
From: David Miller @ 2018-12-19 0:42 UTC (permalink / raw)
To: antoine.tenart
Cc: linux, netdev, linux-kernel, thomas.petazzoni, maxime.chevallier,
gregory.clement, miquel.raynal, nadavh, stefanc, ymarkman, mw
From: Antoine Tenart <antoine.tenart@bootlin.com>
Date: Mon, 17 Dec 2018 15:56:04 +0100
> This small series introduces 2 fixes for the phylink validate function
> of the Marvell PPv2 Ethernet driver.
>
> Since v2:
> - Added an additional patch (2/2) as suggested by Russell.
> - Rebased on top of net/master.
>
> Since v1:
> - Rebased on top of net/master.
Because, in the end, I applied:
006791772084 ("net: mvpp2: 10G modes aren't supported on all ports")
I am assuming this series is not relevant.
Thank you.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH net v3 0/2] net: mvpp2: phylink validate fixes
2018-12-19 0:42 ` [PATCH net v3 0/2] net: mvpp2: phylink validate fixes David Miller
@ 2018-12-19 8:26 ` Antoine Tenart
2018-12-19 16:34 ` David Miller
0 siblings, 1 reply; 7+ messages in thread
From: Antoine Tenart @ 2018-12-19 8:26 UTC (permalink / raw)
To: David Miller
Cc: antoine.tenart, linux, netdev, linux-kernel, thomas.petazzoni,
maxime.chevallier, gregory.clement, miquel.raynal, nadavh,
stefanc, ymarkman, mw
Hi David,
On Tue, Dec 18, 2018 at 04:42:52PM -0800, David Miller wrote:
> From: Antoine Tenart <antoine.tenart@bootlin.com>
> Date: Mon, 17 Dec 2018 15:56:04 +0100
>
> > This small series introduces 2 fixes for the phylink validate function
> > of the Marvell PPv2 Ethernet driver.
> >
> > Since v2:
> > - Added an additional patch (2/2) as suggested by Russell.
> > - Rebased on top of net/master.
> >
> > Since v1:
> > - Rebased on top of net/master.
>
> Because, in the end, I applied:
>
> 006791772084 ("net: mvpp2: 10G modes aren't supported on all ports")
>
> I am assuming this series is not relevant.
The patch 2/2 ("net: mvpp2: fix the phylink mode validation") is still
relevant, in addition to the patch you applied. It was added in v3, and
is an (unrelated) addition to the first patch.
Thanks!
Antoine
--
Antoine Ténart, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH net v3 0/2] net: mvpp2: phylink validate fixes
2018-12-19 8:26 ` Antoine Tenart
@ 2018-12-19 16:34 ` David Miller
2018-12-19 16:48 ` Antoine Tenart
0 siblings, 1 reply; 7+ messages in thread
From: David Miller @ 2018-12-19 16:34 UTC (permalink / raw)
To: antoine.tenart
Cc: linux, netdev, linux-kernel, thomas.petazzoni, maxime.chevallier,
gregory.clement, miquel.raynal, nadavh, stefanc, ymarkman, mw
From: Antoine Tenart <antoine.tenart@bootlin.com>
Date: Wed, 19 Dec 2018 09:26:09 +0100
> Hi David,
>
> On Tue, Dec 18, 2018 at 04:42:52PM -0800, David Miller wrote:
>> From: Antoine Tenart <antoine.tenart@bootlin.com>
>> Date: Mon, 17 Dec 2018 15:56:04 +0100
>>
>> > This small series introduces 2 fixes for the phylink validate function
>> > of the Marvell PPv2 Ethernet driver.
>> >
>> > Since v2:
>> > - Added an additional patch (2/2) as suggested by Russell.
>> > - Rebased on top of net/master.
>> >
>> > Since v1:
>> > - Rebased on top of net/master.
>>
>> Because, in the end, I applied:
>>
>> 006791772084 ("net: mvpp2: 10G modes aren't supported on all ports")
>>
>> I am assuming this series is not relevant.
>
> The patch 2/2 ("net: mvpp2: fix the phylink mode validation") is still
> relevant, in addition to the patch you applied. It was added in v3, and
> is an (unrelated) addition to the first patch.
Sorry about that!
Please resubmit patch #2 separately and I'll apply it.
Thank you!
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH net v3 0/2] net: mvpp2: phylink validate fixes
2018-12-19 16:34 ` David Miller
@ 2018-12-19 16:48 ` Antoine Tenart
0 siblings, 0 replies; 7+ messages in thread
From: Antoine Tenart @ 2018-12-19 16:48 UTC (permalink / raw)
To: David Miller
Cc: antoine.tenart, linux, netdev, linux-kernel, thomas.petazzoni,
maxime.chevallier, gregory.clement, miquel.raynal, nadavh,
stefanc, ymarkman, mw
Hi David,
On Wed, Dec 19, 2018 at 08:34:18AM -0800, David Miller wrote:
> From: Antoine Tenart <antoine.tenart@bootlin.com>
> Date: Wed, 19 Dec 2018 09:26:09 +0100
> >
> > The patch 2/2 ("net: mvpp2: fix the phylink mode validation") is still
> > relevant, in addition to the patch you applied. It was added in v3, and
> > is an (unrelated) addition to the first patch.
>
> Sorry about that!
>
> Please resubmit patch #2 separately and I'll apply it.
No worries! I'll re-send it as a separate patch.
Thanks!
Antoine
--
Antoine Ténart, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2018-12-19 16:48 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-12-17 14:56 [PATCH net v3 0/2] net: mvpp2: phylink validate fixes Antoine Tenart
2018-12-17 14:56 ` [PATCH net v3 1/2] net: mvpp2: 10G modes aren't supported on all ports Antoine Tenart
2018-12-17 14:56 ` [PATCH net v3 2/2] net: mvpp2: fix the phylink mode validation Antoine Tenart
2018-12-19 0:42 ` [PATCH net v3 0/2] net: mvpp2: phylink validate fixes David Miller
2018-12-19 8:26 ` Antoine Tenart
2018-12-19 16:34 ` David Miller
2018-12-19 16:48 ` Antoine Tenart
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).