On Fri, 25 Sep 2020 08:26:16 -0700 Florian Fainelli
wrote:
> Signed-off-by: Florian Fainelli
Acked-by: Vivien Didelot
b/MAINTAINERS
> @@ -12077,6 +12077,7 @@ NETWORKING [DSA]
> M: Andrew Lunn
> M: Vivien Didelot
> M: Florian Fainelli
> +M: Vladimir Oltean
> S: Maintained
> F: Documentation/devicetree/bindings/net/dsa/
> F: drivers/net/dsa/
Unfortunately I cannot be as
for instance.
>
> Signed-off-by: Florian Fainelli
Reviewed-by: Vivien Didelot
fc: e1a09000mov r9, r0
> u16 tx_vid = dsa_8021q_tx_vid(dp->ds, dp->index);
> 700: e1c001d8ldrdr0, [r0, #24]
> 704: ebfebl 0
> 704: R_ARM_CALL dsa_8021q_tx_vid
>
> Because we want to avoid possible performance regressions, introduce
> this new function which is designed to be public.
>
> Suggested-by: Vivien Didelot
> Signed-off-by: Vladimir Oltean
Reviewed-by: Vivien Didelot
release the master at that time,
> too.
>
> Fixes: 83c0afaec7b7 ("net: dsa: Add new binding implementation")
> Signed-off-by: Florian Fainelli
Reviewed-by: Vivien Didelot
Hi Vladimir,
On Mon, 4 May 2020 21:38:26 +0300, Vladimir Oltean wrote:
> Hi Vivien,
>
> On Mon, 4 May 2020 at 21:23, Vivien Didelot wrote:
> >
> > On Mon, 4 May 2020 14:19:13 -0400, Vivien Didelot
> > wrote:
> > > Hi Vladimir,
> > >
> > &g
On Mon, 4 May 2020 14:19:13 -0400, Vivien Didelot
wrote:
> Hi Vladimir,
>
> On Mon, 4 May 2020 00:10:33 +0300, Vladimir Oltean wrote:
> > + case FLOW_ACTION_REDIRECT: {
> > + struct dsa_port *to_dp;
> > +
> > +
Hi Vladimir,
On Mon, 4 May 2020 00:10:33 +0300, Vladimir Oltean wrote:
> + case FLOW_ACTION_REDIRECT: {
> + struct dsa_port *to_dp;
> +
> + if (!dsa_slave_dev_check(act->dev)) {
> + NL_SET_ERR_MSG_MOD(extack,
> +
ault hashing algorithm is not optimal. Allow the other
> algorithms to be selected via devlink.
>
> Signed-off-by: Andrew Lunn
Reviewed-by: Vivien Didelot
ture associated to the device.
>
> Signed-off-by: Andrew Lunn
Reviewed-by: Vivien Didelot
Hi Andrew,
On Thu, 17 Oct 2019 21:20:55 +0200, Andrew Lunn wrote:
> --- a/drivers/net/dsa/mv88e6xxx/global1.h
> +++ b/drivers/net/dsa/mv88e6xxx/global1.h
> @@ -109,6 +109,7 @@
> /* Offset 0x0A: ATU Control Register */
> #define MV88E6XXX_G1_ATU_CTL 0x0a
> #define MV88E6XXX_G1_ATU_CTL_L
If there are multiple switch trees on the device, only the last one
will be listed, because the arguments of list_add_tail are swapped.
Fixes: 83c0afaec7b7 ("net: dsa: Add new binding implementation")
Signed-off-by: Vivien Didelot
---
net/dsa/dsa2.c | 2 +-
1 file changed, 1 inser
Hi Andrew,
On Fri, 4 Oct 2019 23:09:34 +0200, Andrew Lunn wrote:
> Some of the marvell switches have bits controlling the hash algorithm
> the ATU uses for MAC addresses. In some industrial settings, where all
> the devices are from the same manufacture, and hence use the same OUI,
> the default
On Fri, 4 Oct 2019 23:09:33 +0200, Andrew Lunn wrote:
> Add plumbing to allow DSA drivers to register parameters with devlink.
>
> To keep with the abstraction, the DSA drivers pass the ds structure to
> these helpers, and the DSA core then translates that to the devlink
> structure associated t
Hi Andrew,
On Fri, 4 Oct 2019 03:35:23 +0200, Andrew Lunn wrote:
> Some of the marvell switches have bits controlling the hash algorithm
> the ATU uses for MAC addresses. In some industrial settings, where all
> the devices are from the same manufacture, and hence use the same OUI,
> the default
Hi Robert,
On Wed, 11 Sep 2019 10:46:05 +0100, Robert Beckett
wrote:
> > Feature series targeting netdev must be prefixed "PATCH net-next". As
>
> Thanks for the info. Out of curiosity, where should I have gleaned this
> info from? This is my first contribution to netdev, so I wasnt familiar
>
Hi Robert,
On Tue, 10 Sep 2019 16:41:46 +0100, Robert Beckett
wrote:
> This patch-set adds support for some features of the Marvell switch
> chips that can be used to handle packet storms.
>
> The rationale for this was a setup that requires the ability to receive
> traffic from one port, while
Hi Robert,
On Tue, 10 Sep 2019 16:41:50 +0100, Robert Beckett
wrote:
> Add code to set Schedule for any port that specifies "schedule" in their
> device tree node.
> This allows port prioritization in conjunction with port default queue
> priorities or packet priorities.
>
> Signed-off-by: Robe
Hi Robert,
On Tue, 10 Sep 2019 16:41:52 +0100, Robert Beckett
wrote:
> Add code for specifying egress rate limiting per port.
> The rate can be specified as ethernet frames or bits per second.
>
> Signed-off-by: Robert Beckett
> ---
> drivers/net/dsa/mv88e6xxx/chip.c | 72 ++-
Hi Robert,
On Tue, 10 Sep 2019 09:42:24 -0700, Florian Fainelli
wrote:
> This is a vendor specific driver/property,
> marvell,default-queue-priority (which be cheapskate on words) would be
> more readable. But still, I have some more fundamental issues with the
> general approach, see my respons
Hi Robert,
On Tue, 10 Sep 2019 16:41:48 +0100, Robert Beckett
wrote:
> +static int mv88e6xxx_set_port_defqpri(struct mv88e6xxx_chip *chip, int port)
> +{
> + struct dsa_switch *ds = chip->ds;
> + struct device_node *dn = ds->ports[port].dn;
> + int err;
> + u32 pri;
> +
> + i
Hi Robert,
On Tue, 10 Sep 2019 16:41:47 +0100, Robert Beckett
wrote:
> Configure autoneg for phy connected CPU ports.
> This allows us to use autoneg between the CPU port's phy and the link
> partner's phy.
> This enables us to negoatiate pause frame transmission to prioritise
> packet delivery
Hi Andrew,
On Sat, 7 Sep 2019 22:32:56 +0200, Andrew Lunn wrote:
> > + policy = devm_kzalloc(chip->dev, sizeof(*policy), GFP_KERNEL);
> > + if (!policy)
> > + return -ENOMEM;
>
> I think this might be the first time we have done dynamic memory
> allocation in the mv88e6xxx driver.
Introduce a new .port_set_policy operation to configure a port's
Policy Control List, based on mapping such as DA, SA, Etype and so on.
Models similar to 88E6352 and 88E6390 are supported at the moment.
Signed-off-by: Vivien Didelot
---
drivers/net/dsa/mv88e6xxx/chip.c | 9
driver
Implement the .get_rxnfc and .set_rxnfc DSA operations to configure
a port's Layer 2 Policy Control List (PCL) via ethtool.
Currently only dropping frames based on MAC Destination or Source
Address (including the option VLAN parameter) is supported.
Signed-off-by: Vivien Didelot
---
dr
Marvell has different values for the state of a MAC address,
depending on its multicast bit. This patch completes the definitions
for these states.
At the same time, use 0 which is intuitive enough and simplifies the
code a bit, instead of the UC or MC unused value.
Signed-off-by: Vivien Didelot
on or source MAC address and an optional VLAN, with e.g.:
# ethtool --config-nfc lan1 flow-type ether src 00:11:22:33:44:55 action -1
Vivien Didelot (3):
net: dsa: mv88e6xxx: complete ATU state definitions
net: dsa: mv88e6xxx: introduce .port_set_policy
net: dsa: mv88e6xxx: add RXNFC su
Introduce a new .serdes_irq_status operation to prepare the abstraction
of IRQ thread from the SERDES IRQ setup code.
Signed-off-by: Vivien Didelot
---
drivers/net/dsa/mv88e6xxx/chip.c | 11 ++
drivers/net/dsa/mv88e6xxx/chip.h | 2 +
drivers/net/dsa/mv88e6xxx/serdes.c | 59
Introduce a new .serdes_irq_enable operation to prepare the abstraction
of IRQ enabling from the SERDES IRQ setup code.
Signed-off-by: Vivien Didelot
---
drivers/net/dsa/mv88e6xxx/chip.c | 11 +
drivers/net/dsa/mv88e6xxx/chip.h | 2 +
drivers/net/dsa/mv88e6xxx/port.c | 4 +-
drivers
same time provide mv88e6xxx_serdes_power_{up,down} helpers
and prefer up/down instead of on/off as in the documentation.
Signed-off-by: Vivien Didelot
---
drivers/net/dsa/mv88e6xxx/chip.c | 8 +---
drivers/net/dsa/mv88e6xxx/chip.h | 3 ++-
drivers/net/dsa/mv88e6xxx/port.c | 4
The current mv88e6xxx SERDES code checks for negative error code from
irq_find_mapping, while this function returns an unsigned integer. This
patch removes this dead code and simply returns 0 is no IRQ is found.
Signed-off-by: Vivien Didelot
---
drivers/net/dsa/mv88e6xxx/chip.h | 2
fying the implementations with single return
statements. Last but not least, fix the reverse chrismas tree in
mv88e6390x_serdes_get_lane.
Signed-off-by: Vivien Didelot
---
drivers/net/dsa/mv88e6xxx/chip.h | 2 +-
drivers/net/dsa/mv88e6xxx/port.c | 13 +--
drivers/net/dsa/mv88e6xxx/ser
Introduce a new .serdes_irq_mapping operation to prepare the
abstraction of IRQ mapping from the SERDES IRQ setup code.
Signed-off-by: Vivien Didelot
---
drivers/net/dsa/mv88e6xxx/chip.c | 11 +++
drivers/net/dsa/mv88e6xxx/chip.h | 2 ++
drivers/net/dsa/mv88e6xxx/serdes.c | 26
.
Signed-off-by: Vivien Didelot
---
drivers/net/dsa/mv88e6xxx/chip.c | 96 +--
drivers/net/dsa/mv88e6xxx/chip.h | 2 -
drivers/net/dsa/mv88e6xxx/serdes.c | 142 -
drivers/net/dsa/mv88e6xxx/serdes.h | 4 -
4 files changed, 69 insertions(+), 175
away and do
not call dsa_port_phylink_mac_change if an error occurred.
Signed-off-by: Vivien Didelot
---
drivers/net/dsa/mv88e6xxx/serdes.c | 9 +++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/drivers/net/dsa/mv88e6xxx/serdes.c
b/drivers/net/dsa/mv88e6xxx/serdes.c
index 38c0da
tches which simply returns an unused 0xff lane address.
Signed-off-by: Vivien Didelot
---
drivers/net/dsa/mv88e6xxx/chip.c | 4
drivers/net/dsa/mv88e6xxx/serdes.c | 11 ++-
drivers/net/dsa/mv88e6xxx/serdes.h | 1 +
3 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/dr
The mv88e6352_serdes_power_set helper is only used at one place, in
mv88e6352_serdes_power. Keep it simple and merge the two functions
together.
Use mv88e6xxx_serdes_get_lane instead of mv88e6352_port_has_serdes
to avoid moving code. No functional changes.
Signed-off-by: Vivien Didelot
ns to simple
register accesses only; centralize the IRQ handling and mutex locking logic;
as well as reducing boilerplate in the driver.
Vivien Didelot (10):
net: dsa: mv88e6xxx: check errors in mv88e6352_serdes_irq_link
net: dsa: mv88e6xxx: fix SERDES IRQ mapping
net: dsa: mv88e6xxx: intr
list might go on.
>
> So just make dsa_port_setup undo the setup it had done upon failure, and
> let the for loop undo the work of setting up the previous ports, which
> are guaranteed to be brought up to a consistent state.
>
> Fixes: 955222ca5281 ("net: dsa: use a single switch statement for port setup")
> Signed-off-by: Vladimir Oltean
Reviewed-by: Vivien Didelot
This belongs to net-next. Thanks,
Vivien
Hi Vladimir,
On Sat, 31 Aug 2019 19:54:40 +0300, Vladimir Oltean wrote:
> Fine, I had not noticed the "registered" field from devlink_port.
> But I fail to see how dsa_port_teardown can be entered in the generic
> case from whatever failure state dsa_port_setup left it in. What if
> it's a DSA_PO
Hi Vladimir,
On Sat, 31 Aug 2019 15:46:19 +0300, Vladimir Oltean wrote:
> When a function such as dsa_slave_create fails, currently the following
> stack trace can be seen:
>
> [2.038342] sja1105 spi0.1: Probed switch chip: SJA1105T
> [2.054556] sja1105 spi0.1: Reset switch and programme
e settings. Wrap this logic inside a
> dsa_8021q_vid_apply helper function to reduce code duplication.
>
> Signed-off-by: Vladimir Oltean
I have no complaint with this series:
Reviewed-by: Vivien Didelot
Thanks for sending smaller pieces like this one btw,
Vivien
Hi Vladimir,
On Thu, 29 Aug 2019 14:50:14 +0300, Vladimir Oltean wrote:
> > +static int dsa_8021q_restore_pvid(struct dsa_switch *ds, int port)
> > +{
> > + struct bridge_vlan_info vinfo;
> > + struct net_device *slave;
> > + u16 pvid;
> > + int err;
> > +
> > + if (
IRQ. The patch fixes this assumption.
Fixes: b759f528ca3d ("net: dsa: mv88e6xxx: enable SERDES after setup")
Signed-off-by: Vivien Didelot
---
drivers/net/dsa/mv88e6xxx/chip.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drive
code private to the mv88e6341_port_set_cmode implementation, instead
of adding yet another operation to the switch info structure.
Signed-off-by: Vivien Didelot
---
drivers/net/dsa/mv88e6xxx/chip.c | 8
drivers/net/dsa/mv88e6xxx/chip.h | 1 -
drivers/net/dsa/mv88e6xxx/port.c | 9 -
drivers/net/dsa/
t the same time, check for an eventual error and return IRQ_DONE,
instead of blindly ignoring it.
Signed-off-by: Vivien Didelot
---
drivers/net/dsa/mv88e6xxx/serdes.c | 6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/net/dsa/mv88e6xxx/serdes.c
b/drivers/net/dsa
int err;
> + u8 lane;
>
> - lane = mv88e6390x_serdes_get_lane(chip, port->port);
> + mv88e6xxx_serdes_get_lane(chip, port->port, &lane);
I don't like when errors aren't always checked, but the code was already
like this, so this can be addressed in a
t_cmode_writable, which is called from mv88e6xxx_port_setup_mac
> just before .port_set_cmode.
>
> SERDES IRQs are also enabled for Topaz.
>
> Tested on Turris Mox.
>
> Signed-off-by: Marek Behún
Reviewed-by: Vivien Didelot
Ho this is much clearer now, I realize I got confu
On Mon, 26 Aug 2019 20:36:14 +0200, Marek Behun wrote:
> > Ask yourself what is the single task achieved by this function, and name
> > this
> > operation accordingly. It seems to change the CMODE to be writable, only
> > supported by certain switch models right? So in addition to port_get_cmode
On Mon, 26 Aug 2019 20:03:15 +0200, Marek Behun wrote:
> What about this?
>
> It adds a new chip operation (I know Vivien said not to, but I was
> doing it already) port_setup_extra, and implements it for Topaz.
So what feedback do you expect exactly? That is *exactly* what I told
you I did not
On Mon, 26 Aug 2019 19:31:25 +0200, Marek Behun wrote:
> On Mon, 26 Aug 2019 17:38:30 +0200
> Andrew Lunn wrote:
>
> > > +static int mv88e6xxx_port_set_cmode(struct mv88e6xxx_chip *chip, int
> > > port,
> > > + phy_interface_t mode, bool allow_over_2500,
> > > +
On Mon, 26 Aug 2019 19:27:17 +0200, Marek Behun wrote:
> On Mon, 26 Aug 2019 17:38:30 +0200
> Andrew Lunn wrote:
>
> > > +static int mv88e6xxx_port_set_cmode(struct mv88e6xxx_chip *chip, int
> > > port,
> > > + phy_interface_t mode, bool allow_over_2500,
> > > +
Hi Marek,
On Sun, 25 Aug 2019 18:36:09 +0200, Marek Behun wrote:
> > Aren't you relying on -ENODEV as well?
>
> Vivien, I am not relying o -ENODEV. I changed the serdes_get_lane
> semantics:
> - previously:
>- if port has a lane for current cmode, return given lane number
>- otherwise r
Hi Vladimir,
On Sun, 25 Aug 2019 21:44:54 +0300, Vladimir Oltean wrote:
> - if (enabled)
> - err = dsa_port_vid_add(upstream_dp, tx_vid, 0);
> - else
> - err = dsa_port_vid_del(upstream_dp, tx_vid);
> + err = dsa_8021q_vid_apply(ds, upstream, tx_vid, 0, enabled
; create mode 100644 drivers/net/dsa/mv88e6xxx/port_hidden.c
The series causes no issues on my Dev C with two 88E6390Xs. If Andrew has
no complaints about the functional changes on the SERDES code, this LGTM:
Tested-by: Vivien Didelot
Thanks,
Vivien
On Sat, 24 Aug 2019 22:53:08 +0300, Vladimir Oltean wrote:
> Vivien, can't you just unset the PVID flag? Keeping the same
> tagged/untagged setting on ingress as on egress does make more sense.
Why not. I've sent a v2 with this single change.
Thanks,
Vivien
transparently this way is what we want.
Signed-off-by: Vivien Didelot
---
net/dsa/slave.c | 14 ++
net/dsa/switch.c | 5 -
2 files changed, 18 insertions(+), 1 deletion(-)
diff --git a/net/dsa/slave.c b/net/dsa/slave.c
index 82e48d247b81..8267c156a51a 100644
--- a/net/dsa/slave.c
necessary,
that is to say in dsa_slave_vlan_rx_add_vid.
Signed-off-by: Vivien Didelot
---
net/dsa/port.c | 4 ++--
net/dsa/slave.c | 7 +--
2 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/net/dsa/port.c b/net/dsa/port.c
index f75301456430..ef28df7ecbde 100644
--- a/net/dsa
ports anyway, move
these checks were it belongs, one layer up in the slave code.
Signed-off-by: Vivien Didelot
Suggested-by: Vladimir Oltean
---
net/dsa/port.c | 10 ++
net/dsa/slave.c | 12
2 files changed, 14 insertions(+), 8 deletions(-)
diff --git a/net/dsa/port.c b
ar which local port of a switch must be programmed with the target
object. While the targeted user port is an obvious candidate, the
DSA links must also be programmed, as well as the CPU port for VLANs.
While at it, also remove local variables that are only used once.
Signed-off-by: Vivien Didelot
--
ugh DSA expects the drivers to handle the CPU port membership,
it does not make sense to program user VLANs as PVID on the CPU port.
This patch clears this flag before programming the CPU port.
Signed-off-by: Vivien Didelot
Suggested-by: Vladimir Oltean
---
net/dsa/slave.c | 6 ++
1
Add dsa_slave_vlan_add and dsa_slave_vlan_del helpers to handle
SWITCHDEV_OBJ_ID_PORT_VLAN switchdev objects. Also copy the
switchdev_obj_port_vlan structure on add since we will modify it in
future patches.
Signed-off-by: Vivien Didelot
---
net/dsa/slave.c | 40
of CPU ports where they belong,
in the slave code.
While at it, clear the VLAN flags before programming a CPU port, as it
doesn't make sense to forward the PVID flag for example for such ports.
Changes in v2: only clear the PVID flag.
Vivien Didelot (6):
net: dsa: remove bitmap operations
On Sun, 25 Aug 2019 05:59:12 +0200, Marek Behún wrote:
> int mv88e6390_serdes_power(struct mv88e6xxx_chip *chip, int port, bool on)
> {
> - int lane;
> -
> - lane = mv88e6390_serdes_get_lane(chip, port);
> - if (lane == -ENODEV)
> - return 0;
> + s8 lane;
> + int
Hi Marek,
On Sun, 25 Aug 2019 05:59:13 +0200, Marek Behún wrote:
> +int mv88e6341_serdes_get_lane(struct mv88e6xxx_chip *chip, int port, s8
> *lane)
> +{
> + u8 cmode = chip->ports[port].cmode;
> +
> + *lane = -1;
> +
> + if (port != 5)
> + return 0;
Aren't you relying o
= mv88e6xxx_serdes_get_lane(chip, port, &lane);
if (err) {
if (err == -ENODEV)
err = 0;
return err;
}
But at least it is well documented, so we can eventually fine tuned later:
Reviewed-by: Vivien Didelot
Thank you!
Vivien
hún
Even though there are several semantic changes here, bisectability is
preserved, and blaming the new functions will easily show which commit
introduced this new API and why. Much more readable and well documented:
Reviewed-by: Vivien Didelot
Hi Andrew,
On Sun, 25 Aug 2019 01:16:53 +0200, Andrew Lunn wrote:
> On Sat, Aug 24, 2019 at 07:12:20PM -0400, Vivien Didelot wrote:
> > Hi Andrew,
> >
> > On Sun, 25 Aug 2019 00:53:06 +0200, Andrew Lunn wrote:
> > > I just booted a ZII devel C and got a new warni
Hi Andrew,
On Sun, 25 Aug 2019 00:53:06 +0200, Andrew Lunn wrote:
> I just booted a ZII devel C and got a new warning splat.
>
> WARNING: CPU: 0 PID: 925 at kernel/irq/manage.c:1708 __free_irq+0xc8/0x2c4
> Trying to free already-free IRQ 0
> Modules linked in:
> CPU: 0 PID: 925 Comm: kworker/0:2
Hi Marek,
On Sat, 24 Aug 2019 22:52:16 +0200, Marek Behun wrote:
> > There's something I'm having trouble to follow here. This series keeps
> > adding and modifying its own code. Wouldn't it be simpler for everyone
> > if you directly implement the final mv88e6xxx_port_hidden_{read,write}
> > fun
Hi Marek,
On Fri, 23 Aug 2019 23:26:02 +0200, Marek Behún wrote:
> -int mv88e6xxx_port_hidden_write(struct mv88e6xxx_chip *chip, int port, int
> reg,
> - u16 val);
> +int mv88e6xxx_port_hidden_write(struct mv88e6xxx_chip *chip, int block, int
> port,
> +
Also can you place the mv88e6xxx_serdes_get_lane() function as static inline
in the serdes.h header? So that it's obvious that it's a wrapper and not a
switch implementation.
Ho and you can skip the 'chip->info->ops->' from the commit subject line ;-)
Hi Marek,
On Fri, 23 Aug 2019 23:25:58 +0200, Marek Behún wrote:
> + /* SERDES lane mapping */
> + int (*serdes_get_lane)(struct mv88e6xxx_chip *chip, int port);
I would prefer to keep the return code strictly for error checking as commonly
used in the driver:
int (*serdes_get_lane)
Hi Marek,
On Fri, 23 Aug 2019 23:25:57 +0200, Marek Behún wrote:
> /* Offset 0x1a: Magic undocumented errata register */
/* Offset 0x1A: Reserved */
(nitpicking here, for consistency this other definitions as shown in docs.)
> -#define PORT_RESERVED_1A 0x1a
> -#define P
Hi Vladimir,
On Fri, 23 Aug 2019 01:06:58 +0300, Vladimir Oltean wrote:
> Hi Vivien,
>
> On 8/22/19 11:13 PM, Vivien Didelot wrote:
> > Currently dsa_port_vid_add returns 0 if the switch returns -EOPNOTSUPP.
> >
> > This function is used in the tag_8021q.c code to of
On Wed, 21 Aug 2019 02:24:23 -0400, Vivien Didelot
wrote:
> The bitmap operations were introduced to simplify the switch drivers
> in the future, since most of them could implement the common VLAN and
> MDB operations (add, del, dump) with simple functions taking all target
> ports
ugh DSA expects the drivers to handle the CPU port membership,
they are unlikely to program such VLANs untagged, and certainly not as
PVID. This patch clears the VLAN flags before programming the CPU port.
Signed-off-by: Vivien Didelot
Suggested-by: Vladimir Oltean
---
net/dsa/slave.c | 6
transparently this way is fine.
Signed-off-by: Vivien Didelot
---
net/dsa/slave.c | 14 ++
net/dsa/switch.c | 5 -
2 files changed, 18 insertions(+), 1 deletion(-)
diff --git a/net/dsa/slave.c b/net/dsa/slave.c
index 82e48d247b81..8267c156a51a 100644
--- a/net/dsa/slave.c
+++ b
ports anyway, move
these checks were it belongs, one layer up in the slave code.
Signed-off-by: Vivien Didelot
Suggested-by: Vladimir Oltean
---
net/dsa/port.c | 10 ++
net/dsa/slave.c | 12
2 files changed, 14 insertions(+), 8 deletions(-)
diff --git a/net/dsa/port.c b
ar which local port of a switch must be programmed with the target
object. While the targeted user port is an obvious candidate, the
DSA links must also be programmed, as well as the CPU port for VLANs.
While at it, also remove local variables that are only used once.
Signed-off-by: Vivien Didelot
--
Add dsa_slave_vlan_add and dsa_slave_vlan_del helpers to handle
SWITCHDEV_OBJ_ID_PORT_VLAN switchdev objects. Also copy the
switchdev_obj_port_vlan structure on add since we will modify it in
future patches.
Signed-off-by: Vivien Didelot
---
net/dsa/slave.c | 40
necessary,
that is to say in dsa_slave_vlan_rx_add_vid.
Signed-off-by: Vivien Didelot
---
net/dsa/port.c | 4 ++--
net/dsa/slave.c | 7 +--
2 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/net/dsa/port.c b/net/dsa/port.c
index f75301456430..ef28df7ecbde 100644
--- a/net/dsa
of CPU ports where they belong,
in the slave code.
While at it, clear the VLAN flags before programming a CPU port, as it
doesn't make sense to forward the PVID flag for example for such ports.
Vivien Didelot (6):
net: dsa: remove bitmap operations
net: dsa: do not skip -EOPNOTSU
Hi Marek, Andrew,
On Thu, 22 Aug 2019 15:10:47 +0200, Andrew Lunn wrote:
> On Thu, Aug 22, 2019 at 01:27:17AM +0200, Marek Behún wrote:
> > This patch moves the functions operating on the hidden debug registers
> > into it's own file, hidden.c.
>
> Humm, actually...
>
> These are in the port re
ar which local port of a switch must be programmed with the target
object. While the targeted user port is an obvious candidate, the
DSA links must also be programmed, as well as the CPU port for VLANs.
While at it, also remove local variables that are only used once.
Signed-off-by: Vivien Didelot
--
On Wed, 21 Aug 2019 01:09:39 +0300, Vladimir Oltean wrote:
> I mean I made an argument already for the hack in 4/6 ("Don't program
> the VLAN as pvid on the upstream port"). If the hack gets accepted
> like that, I have no further need of any change in the implicit VLAN
> configuration. But it's s
On Wed, 21 Aug 2019 00:02:22 +0300, Vladimir Oltean wrote:
> On Tue, 20 Aug 2019 at 23:58, Vivien Didelot wrote:
> >
> > On Tue, 20 Aug 2019 23:40:34 +0300, Vladimir Oltean
> > wrote:
> > > I don't need this patch. I'm not sure what my thought process
On Tue, 20 Aug 2019 23:40:34 +0300, Vladimir Oltean wrote:
> I don't need this patch. I'm not sure what my thought process was at
> the time I added it to the patchset.
> I'm still interested in getting rid of the vlan bitmap through other
> means (picking up your old changeset). Could you take a
Hi Vladimir,
On Tue, 20 Aug 2019 12:54:44 +0300, Vladimir Oltean wrote:
> I can agree that this isn't one of my brightest moments. But at least
> we get to see Cunningham's law in action :)
> When dsa_8021q is cleaning up the switch's VLAN table for the bridge
> to use it, it is good to really cl
On Tue, 20 Aug 2019 02:59:56 +0300, Vladimir Oltean wrote:
> This patchset addresses a few limitations in DSA and the bridge core
> that made it impossible for this sequence of commands to work:
>
> ip link add name br0 type bridge
> ip link set dev swp2 master br0
> echo 1 > /sys/class/net
On Tue, 20 Aug 2019 03:00:00 +0300, Vladimir Oltean wrote:
> Commit b2f81d304cee ("net: dsa: add CPU and DSA ports as VLAN members")
> programs the VLAN from the bridge into the specified port as well as the
> upstream port, with the same set of flags.
>
> Consider the typical case of installing
Vladimir,
On Tue, 20 Aug 2019 02:59:59 +0300, Vladimir Oltean wrote:
> Commit b2f81d304cee ("net: dsa: add CPU and DSA ports as VLAN members")
> is littering a lot. After deleting a VLAN added on a DSA port, it still
> remains installed in the hardware filter of the upstream port. Fix this.
Litt
callbacks also have the benefit to
handle the SERDES IRQ for non user ports as well.
Signed-off-by: Vivien Didelot
---
drivers/net/dsa/mv88e6xxx/chip.c | 35
1 file changed, 4 insertions(+), 31 deletions(-)
diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net
Now that mv88e6xxx_serdes_power is only called after driver setup,
we can wrap the SERDES IRQ code directly within it for clarity.
Signed-off-by: Vivien Didelot
---
drivers/net/dsa/mv88e6xxx/chip.c | 32 +++-
1 file changed, 19 insertions(+), 13 deletions(-)
diff
When disabling a port, that is not for the driver to decide what to
do with the STP state. This is already handled by the DSA layer.
Signed-off-by: Vivien Didelot
Reviewed-by: Andrew Lunn
---
drivers/net/dsa/mv88e6xxx/chip.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/net/dsa
.port_disable for broadcom switches.
Vivien Didelot (6):
net: dsa: use a single switch statement for port setup
net: dsa: do not enable or disable non user ports
net: dsa: enable and disable all ports
net: dsa: mv88e6xxx: do not change STP state on port disabling
net: dsa: mv88e6xxx
inconditionally handled by dsa_port_teardown on error.
Signed-off-by: Vivien Didelot
---
net/dsa/dsa2.c | 87 ++
1 file changed, 39 insertions(+), 48 deletions(-)
diff --git a/net/dsa/dsa2.c b/net/dsa/dsa2.c
index 3abd173ebacb..405552ac4c08 100644
that bcm_sf2_sw_suspend() currently calls bcm_sf2_port_disable()
(and thus b53_disable_port()) against the user and CPU ports, so do
not guards those functions. They will be called for unused ports in
the future, but that was expected by those drivers anyway.
Signed-off-by: Vivien Didelot
ports were already
enabled at slave creation and disabled at slave destruction.
Signed-off-by: Vivien Didelot
Reviewed-by: Florian Fainelli
---
net/dsa/dsa2.c | 11 +++
1 file changed, 11 insertions(+)
diff --git a/net/dsa/dsa2.c b/net/dsa/dsa2.c
index 405552ac4c08..8c4eccb0cfe6 100644
Hi Marek,
On Mon, 19 Aug 2019 19:32:46 +0200, Marek Behun wrote:
> > Call the .port_enable and .port_disable functions for all ports,
> > not only the user ports, so that drivers may optimize the power
> > consumption of all ports after a successful setup.
> >
> > Unused ports are now disabled o
1 - 100 of 2022 matches
Mail list logo