* [PATCH] net: mv88e6xxx: Fix ingress rate removal for mv6131 chips
@ 2016-08-22 21:47 Jamie Lentin
2016-08-22 23:09 ` Andrew Lunn
2016-08-23 23:58 ` David Miller
0 siblings, 2 replies; 3+ messages in thread
From: Jamie Lentin @ 2016-08-22 21:47 UTC (permalink / raw)
To: Andrew Lunn, Vivien Didelot; +Cc: netdev, Jamie Lentin
The PORT_RATE_CONTROL register works differently on 88e6095/6095f/6131
in comparison to 6123/61/65, and 0x0 disables. The distinction was lost
Linux 4.1 --> 4.2
Signed-off-by: Jamie Lentin <jm@lentin.co.uk>
---
Tested on a Netgear WNR854T With a mv88e6131 switch chip, on top of
Andrew Lunn's 6131 tagging work:
https://www.mail-archive.com/netdev@vger.kernel.org/msg124142.html
Also available at https://github.com/lentinj/linux 6131-ingress-rate-v1
---
drivers/net/dsa/mv88e6xxx/chip.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c
index 82d4516..22d02dd 100644
--- a/drivers/net/dsa/mv88e6xxx/chip.c
+++ b/drivers/net/dsa/mv88e6xxx/chip.c
@@ -2646,15 +2646,19 @@ static int mv88e6xxx_setup_port(struct mv88e6xxx_chip *chip, int port)
return ret;
}
+ /* Rate Control: disable ingress rate limiting. */
if (mv88e6xxx_6352_family(chip) || mv88e6xxx_6351_family(chip) ||
mv88e6xxx_6165_family(chip) || mv88e6xxx_6097_family(chip) ||
- mv88e6xxx_6185_family(chip) || mv88e6xxx_6095_family(chip) ||
mv88e6xxx_6320_family(chip)) {
- /* Rate Control: disable ingress rate limiting. */
ret = _mv88e6xxx_reg_write(chip, REG_PORT(port),
PORT_RATE_CONTROL, 0x0001);
if (ret)
return ret;
+ } else if (mv88e6xxx_6185_family(chip) || mv88e6xxx_6095_family(chip)) {
+ ret = _mv88e6xxx_reg_write(chip, REG_PORT(port),
+ PORT_RATE_CONTROL, 0x0000);
+ if (ret)
+ return ret;
}
/* Port Control 1: disable trunking, disable sending
--
2.8.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] net: mv88e6xxx: Fix ingress rate removal for mv6131 chips
2016-08-22 21:47 [PATCH] net: mv88e6xxx: Fix ingress rate removal for mv6131 chips Jamie Lentin
@ 2016-08-22 23:09 ` Andrew Lunn
2016-08-23 23:58 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: Andrew Lunn @ 2016-08-22 23:09 UTC (permalink / raw)
To: Jamie Lentin; +Cc: Vivien Didelot, netdev
On Mon, Aug 22, 2016 at 10:47:08PM +0100, Jamie Lentin wrote:
> The PORT_RATE_CONTROL register works differently on 88e6095/6095f/6131
> in comparison to 6123/61/65, and 0x0 disables. The distinction was lost
> Linux 4.1 --> 4.2
>
> Signed-off-by: Jamie Lentin <jm@lentin.co.uk>
Hi Jamie
Thanks for the patch.
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Andrew
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] net: mv88e6xxx: Fix ingress rate removal for mv6131 chips
2016-08-22 21:47 [PATCH] net: mv88e6xxx: Fix ingress rate removal for mv6131 chips Jamie Lentin
2016-08-22 23:09 ` Andrew Lunn
@ 2016-08-23 23:58 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2016-08-23 23:58 UTC (permalink / raw)
To: jm; +Cc: andrew, vivien.didelot, netdev
From: Jamie Lentin <jm@lentin.co.uk>
Date: Mon, 22 Aug 2016 22:47:08 +0100
> The PORT_RATE_CONTROL register works differently on 88e6095/6095f/6131
> in comparison to 6123/61/65, and 0x0 disables. The distinction was lost
> Linux 4.1 --> 4.2
>
> Signed-off-by: Jamie Lentin <jm@lentin.co.uk>
Applied.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-08-23 23:58 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-22 21:47 [PATCH] net: mv88e6xxx: Fix ingress rate removal for mv6131 chips Jamie Lentin
2016-08-22 23:09 ` Andrew Lunn
2016-08-23 23:58 ` 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.