Hi Andrew,
Andrew Lunn writes:
> On Tue, Jan 03, 2017 at 01:15:35PM -0500, Vivien Didelot wrote:
>> The current HWMON support in DSA in embedded in the legacy code.
>> Extract it to its own file and register it in the newer DSA code.
>
> I would really prefer not to do this
Hi Andrew,
Andrew Lunn writes:
> On Tue, Jan 03, 2017 at 01:15:36PM -0500, Vivien Didelot wrote:
>> The "out" label in dsa_switch_setup_one() is useless, thus remove it.
>
> Hi Vivien
>
> Missing a SOB.
>
> This one patch i'm happy with. Assuming we dro
ct dsa_switch *ds);
diff --git a/net/dsa/hwmon.c b/net/dsa/hwmon.c
new file mode 100644
index 0000..7b3d1a9c2be2
--- /dev/null
+++ b/net/dsa/hwmon.c
@@ -0,0 +1,149 @@
+/*
+ * net/dsa/hwmon.c - HWMON subsystem support
+ * Copyright (c) 2014 Guenter Roeck
+ * Copyright (c) 2017 Vivien Didelot
+
The "out" label in dsa_switch_setup_one() is useless, thus remove it.
---
net/dsa/dsa.c | 40 +---
1 file changed, 13 insertions(+), 27 deletions(-)
diff --git a/net/dsa/dsa.c b/net/dsa/dsa.c
index 7899919cd9f0..89e66b623d73 100644
--- a/net/dsa/dsa.c
+++ b/net
The current HWMON support in DSA in embedded in the legacy code.
Extract it to its own file and register it in the newer DSA code.
Tested on ZII Rev B boards.
Vivien Didelot (3):
net: dsa: remove out label in dsa_switch_setup_one
net: dsa: move HWMON support to its own file
net: dsa
The HWMON support was only registered in the legacy DSA code. Register
it in the newer DSA code (dsa2) as well.
---
net/dsa/dsa2.c | 4
1 file changed, 4 insertions(+)
diff --git a/net/dsa/dsa2.c b/net/dsa/dsa2.c
index 5fff951a0a49..668aa2974d01 100644
--- a/net/dsa/dsa2.c
+++ b/net/dsa/dsa2
r a negative error code or the positive number of messages
executed.
Only check "ret" against negative values to restore the caching.
Fixes: 463e8f845cbf ("i2c: mux: pca954x: retry updating the mux selection on
failure")
Signed-off-by: Vivien Didelot
---
drivers/i2c/muxes/i2c-
it can be called
under bridge lock.
Signed-off-by: Vivien Didelot
---
net/bridge/br_private.h | 1 +
net/bridge/br_stp.c | 28
net/bridge/br_stp_if.c | 12 +++-
3 files changed, 24 insertions(+), 17 deletions(-)
diff --git a/net/bridge/br_private.h b/net
ot;8.3.5 Notifying topology changes",
http://profesores.elo.utfsm.cl/~agv/elo309/doc/802.1D-1998.pdf
No change since RFC: https://lkml.org/lkml/2016/10/19/828
Vivien Didelot (3):
net: bridge: add helper to offload ageing time
net: bridge: add helper to set topology change
net: br
,
http://profesores.elo.utfsm.cl/~agv/elo309/doc/802.1D-1998.pdf
Signed-off-by: Vivien Didelot
---
net/bridge/br_device.c | 2 +-
net/bridge/br_private.h | 3 ++-
net/bridge/br_stp.c | 27 +++
3 files changed, 30 insertions(+), 2 deletions(-)
diff --git a/
Add a __br_set_topology_change helper to set the topology change value.
This can be later extended to add actions when the topology change flag
is set or cleared.
Signed-off-by: Vivien Didelot
---
net/bridge/br_private_stp.h | 1 +
net/bridge/br_stp.c | 10 --
net/bridge
;
> Signed-off-by: Nikita Yushchenko
For what it's worth, I have tested your patch on my ZII Rev B boards
(see vf610-zii-dev-rev-b.dts) which have a FEC as the master net device
of their DSA trees. They still work as expected.
Tested-by: Vivien Didelot
Thanks,
Vivien
implement these differences and introduce a
mv88e6xxx_software_reset() helper to wrap it conveniently.
Signed-off-by: Vivien Didelot
---
drivers/net/dsa/mv88e6xxx/chip.c | 72 ++--
drivers/net/dsa/mv88e6xxx/global1.c | 121 ++
drivers/net
Add an helper to toggle the eventual GPIO connected to the reset pin.
Signed-off-by: Vivien Didelot
Reviewed-by: Andrew Lunn
---
drivers/net/dsa/mv88e6xxx/chip.c | 22 ++
1 file changed, 14 insertions(+), 8 deletions(-)
diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b
Some Marvell chips can enable/disable the PPU on demand. This is needed
to access the PHY registers when there is no indirection mechanism.
Add two new ppu_enable and ppu_disable ops to describe this and finally
get rid of the MV88E6XXX_FLAG_PPU* flags.
Signed-off-by: Vivien Didelot
nges in v3:
- consider 6097 as 6352 (no PPU ops and use mv88e6352_g1_reset).
Changes in v2:
- wait in ppu/reset ops so that ppu_polling is not needed anymore.
Vivien Didelot (4):
net: dsa: mv88e6xxx: add helper to disable ports
net: dsa: mv88e6xxx: add helper to hardware reset
net: dsa: mv88e6
Before resetting a switch, the ports should be set to the Disabled state
and the transmit queues should be drained.
Add an helper to explicit that.
Signed-off-by: Vivien Didelot
Reviewed-by: Andrew Lunn
---
drivers/net/dsa/mv88e6xxx/chip.c | 34 +++---
1 file
Stefan Eichenberger writes:
> Hi Vivien,
>
> On Mon, Dec 05, 2016 at 11:27:03AM -0500, Vivien Didelot wrote:
>> @@ -3266,6 +3220,8 @@ static const struct mv88e6xxx_ops mv88e6097_ops = {
>> .g1_set_cpu_port = mv88e6095_g1_set_cpu_port,
>&g
implement these differences and rename the PPU
state macros to highlight the difference between 1-bit and 2-bit PPUState.
Signed-off-by: Vivien Didelot
---
drivers/net/dsa/mv88e6xxx/chip.c | 72 ++--
drivers/net/dsa/mv88e6xxx/global1.c | 121
Before resetting a switch, the ports should be set to the Disabled state
and the transmit queues should be drained.
Add an helper to explicit that.
Signed-off-by: Vivien Didelot
Reviewed-by: Andrew Lunn
---
drivers/net/dsa/mv88e6xxx/chip.c | 34 +++---
1 file
nges in v2:
- wait in ppu/reset ops so that ppu_polling is not needed anymore.
Vivien Didelot (4):
net: dsa: mv88e6xxx: add helper to disable ports
net: dsa: mv88e6xxx: add helper to hardware reset
net: dsa: mv88e6xxx: add a soft reset operation
net: dsa: mv88e6xxx: add PPU operations
drive
Some Marvell chips can enable/disable the PPU on demand. This is needed
to access the PHY registers when there is no indirection mechanism.
Add two new ppu_enable and ppu_disable ops to describe this and finally
get rid of the MV88E6XXX_FLAG_PPU* flags.
Signed-off-by: Vivien Didelot
Add an helper to toggle the eventual GPIO connected to the reset pin.
Signed-off-by: Vivien Didelot
Reviewed-by: Andrew Lunn
---
drivers/net/dsa/mv88e6xxx/chip.c | 22 ++
1 file changed, 14 insertions(+), 8 deletions(-)
diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b
Hi Andrew,
Andrew Lunn writes:
> + /* Switch Software Reset */
> + int (*g1_reset)(struct mv88e6xxx_chip *chip);
> +
>
> We have a collection of function pointers with port_ prefix, another
> collection with stats_, and a third with ppu_, etc. And then we have
> some which do not fit a s
Hi Andrew,
Andrew Lunn writes:
>> diff --git a/drivers/net/dsa/mv88e6xxx/mv88e6xxx.h
>> b/drivers/net/dsa/mv88e6xxx/mv88e6xxx.h
>> index ab52c37..9e51405 100644
>> --- a/drivers/net/dsa/mv88e6xxx/mv88e6xxx.h
>> +++ b/drivers/net/dsa/mv88e6xxx/mv88e6xxx.h
>> @@ -765,6 +765,9 @@ struct mv88e6xxx_
Hi Andrew,
Andrew Lunn writes:
> As we have seen in the past, this sort of loop is broken if we end up
> sleeping for a long time. Please take the opportunity to replace it
> with one of our _wait() helpers, e.g. mv88e6xxx_g1_wait()
That won't work. the _wait() helpers are made to wait on self-
).
Add a .ppu_polling op check this state and use it in the PPU
enable/disable routines. It will also be used later in the switch reset
code.
Signed-off-by: Vivien Didelot
---
drivers/net/dsa/mv88e6xxx/chip.c | 70 +++
drivers/net/dsa/mv88e6xxx/global1.c
Some Marvell chips can enable/disable the PPU on demand. This is needed
to access the PHY registers when there is no indirection mechanism.
Add two new ppu_enable and ppu_disable ops to describe this and finally
get rid of the MV88E6XXX_FLAG_PPU* flags.
Signed-off-by: Vivien Didelot
mv88e6xxx_wait_switch_ready() helper for the switch reset code.
Signed-off-by: Vivien Didelot
---
drivers/net/dsa/mv88e6xxx/chip.c | 52 +--
drivers/net/dsa/mv88e6xxx/global1.c | 15 ++
drivers/net/dsa/mv88e6xxx/global1.h | 1 +
drivers/net/dsa
X_FLAG_PPU* flags.
Vivien Didelot (6):
net: dsa: mv88e6xxx: add helper to disable ports
net: dsa: mv88e6xxx: add helper to hardware reset
net: dsa: mv88e6xxx: add a software reset op
net: dsa: mv88e6xxx: add a PPU polling op
net: dsa: mv88e6xxx: add helper for switch ready
net: dsa: mv88
Before resetting a switch, the ports should be set to the Disabled state
and the transmit queues should be drained.
Add an helper to explicit that.
Signed-off-by: Vivien Didelot
---
drivers/net/dsa/mv88e6xxx/chip.c | 34 +++---
1 file changed, 23 insertions(+), 11
implement these differences and introduce a
mv88e6xxx_software_reset() helper to wrap it conveniently.
Signed-off-by: Vivien Didelot
---
drivers/net/dsa/mv88e6xxx/chip.c | 42 ---
drivers/net/dsa/mv88e6xxx/global1.c | 35
Add an helper to toggle the eventual GPIO connected to the reset pin.
Signed-off-by: Vivien Didelot
---
drivers/net/dsa/mv88e6xxx/chip.c | 22 ++
1 file changed, 14 insertions(+), 8 deletions(-)
diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx
Hi,
Uwe Kleine-König writes:
> Also it seems wrong to write "marvell,mv88e6085" (only) if I know the
> hardware is really a "marvell,mv88e6176".
I agree. It might be complex for a user to dig into the driver in order
to figure out how the switch ID is read and which compatible to choose.
I've
Most of the chips will have a port register control bits to force the
port's link up, down, or let normal link detection occurs.
Implement such operation to use it later when setting duplex, etc.
Signed-off-by: Vivien Didelot
---
drivers/net/dsa/mv88e6xxx/chip.c
em when needed (e.g. SPEED_MAX).
Changes in v2:
- Strictly use new _UNFORCED values instead of re-using _UNKNOWN ones.
Vivien Didelot (11):
net: dsa: mv88e6xxx: add port files
net: dsa: mv88e6xxx: add port state setter
net: dsa: mv88e6xxx: add port vlan map setter
net: dsa: mv88e6xxx: add
Add a port function to access the Port Based VLAN Map register.
Signed-off-by: Vivien Didelot
---
drivers/net/dsa/mv88e6xxx/chip.c | 14 ++
drivers/net/dsa/mv88e6xxx/port.c | 25 +
drivers/net/dsa/mv88e6xxx/port.h | 2 ++
3 files changed, 29 insertions
Similarly to port's link, add setter to force port's half duplex, full
duplex or let normal duplex detection occurs.
Signed-off-by: Vivien Didelot
---
drivers/net/dsa/mv88e6xxx/chip.c | 17 +
drivers/net/dsa/mv88e6xxx/mv88e6xxx.h | 9 +
drivers/net/dsa
Add port functions to set the port 802.1Q mode.
Signed-off-by: Vivien Didelot
---
drivers/net/dsa/mv88e6xxx/chip.c | 33 ++---
drivers/net/dsa/mv88e6xxx/port.c | 32
drivers/net/dsa/mv88e6xxx/port.h | 3 +++
3 files changed, 37
Some chips such as 88E6352 and 88E6390 can be programmed to add delays
to RXCLK for IND inputs or to GTXCLK for OUTD outputs when port is in
RGMII mode.
Add a port function to program such delays according to the provided PHY
interface mode.
Signed-off-by: Vivien Didelot
---
drivers/net/dsa
The Marvell switches contains one internal SMI device per port, called
"Port Registers". Depending on the model, the addresses of these devices
start from 0x0, 0x8 or 0x10.
Start moving Port Registers specific code to their own files.
Signed-off-by: Vivien Didelot
---
drivers/net/dsa
Signed-off-by: Vivien Didelot
---
drivers/net/dsa/mv88e6xxx/chip.c | 140 +--
1 file changed, 60 insertions(+), 80 deletions(-)
diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c
index 23c05e3..c8f824d 100644
--- a/drivers/net/dsa/m
ted ports and speeds.
Signed-off-by: Vivien Didelot
---
drivers/net/dsa/mv88e6xxx/chip.c | 33 ++--
drivers/net/dsa/mv88e6xxx/mv88e6xxx.h | 24 +-
drivers/net/dsa/mv88e6xxx/port.c | 138 ++
drivers/net/dsa/mv88e6xxx/port.h | 6 ++
4 fi
Add the port STP state setter to the port files.
Signed-off-by: Vivien Didelot
---
drivers/net/dsa/mv88e6xxx/chip.c | 49
drivers/net/dsa/mv88e6xxx/port.c | 31 +
drivers/net/dsa/mv88e6xxx/port.h | 2 ++
3 files changed, 37
Add port functions to access the ports default VID.
Signed-off-by: Vivien Didelot
---
drivers/net/dsa/mv88e6xxx/chip.c | 51
drivers/net/dsa/mv88e6xxx/port.c | 38 ++
drivers/net/dsa/mv88e6xxx/port.h | 3 +++
3 files changed
Add functions to port files to access the ports default FID.
Signed-off-by: Vivien Didelot
---
drivers/net/dsa/mv88e6xxx/chip.c | 77 +++-
drivers/net/dsa/mv88e6xxx/port.c | 67 ++
drivers/net/dsa/mv88e6xxx/port.h | 3 ++
3
Hi Andrew,
Andrew Lunn writes:
> On Wed, Nov 02, 2016 at 02:07:09AM +0100, Vivien Didelot wrote:
>> Hi Andrew,
>>
>> Andrew Lunn writes:
>>
>> >> +#define LINK_UNKNOWN -1
>> >> +
>> >> + /* Port's MAC link state
>
Hi Andrew,
Andrew Lunn writes:
>> int (*port_set_link)(struct mv88e6xxx_chip *chip, int port, int link);
>> +
>> +/* Port's MAC duplex mode
>> + *
>> + * Use DUPLEX_HALF or DUPLEX_FULL to force half or full duplex, or
>> + * DUPLEX_UNKNOWN for normal duplex detection.
>> +
Hi Andrew,
Andrew Lunn writes:
>> +#define LINK_UNKNOWN-1
>> +
>> +/* Port's MAC link state
>> + * LINK_UNKNOWN for normal link detection, 0 to force link down,
>> + * otherwise force link up.
>> + */
>> +int (*port_set_link)(struct mv88e6xxx_chip *chip, int port, int
Hi Andrew,
Andrew Lunn writes:
>> --- a/drivers/net/dsa/mv88e6xxx/port.c
>> +++ b/drivers/net/dsa/mv88e6xxx/port.c
>> @@ -61,6 +61,8 @@ int mv88e6xxx_port_set_state(struct mv88e6xxx_chip *chip,
>> int port, u8 state)
>> return 0;
>> }
>>
>> +/* Offset 0x05: Port Control 1 */
>> +
>> /*
Signed-off-by: Vivien Didelot
---
drivers/net/dsa/mv88e6xxx/chip.c | 138 ---
1 file changed, 58 insertions(+), 80 deletions(-)
diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c
index 23c05e3..56d60fd 100644
--- a/drivers/net/dsa/m
Add functions to port files to access the ports default FID.
Signed-off-by: Vivien Didelot
---
drivers/net/dsa/mv88e6xxx/chip.c | 77 +++-
drivers/net/dsa/mv88e6xxx/port.c | 67 ++
drivers/net/dsa/mv88e6xxx/port.h | 3 ++
3
Add the port STP state setter to the port files.
Signed-off-by: Vivien Didelot
---
drivers/net/dsa/mv88e6xxx/chip.c | 49
drivers/net/dsa/mv88e6xxx/port.c | 31 +
drivers/net/dsa/mv88e6xxx/port.h | 2 ++
3 files changed, 37
Add a port function to access the Port Based VLAN Map register.
Signed-off-by: Vivien Didelot
---
drivers/net/dsa/mv88e6xxx/chip.c | 14 ++
drivers/net/dsa/mv88e6xxx/port.c | 25 +
drivers/net/dsa/mv88e6xxx/port.h | 2 ++
3 files changed, 29 insertions
The Marvell switches contains one internal SMI device per port, called
"Port Registers". Depending on the model, the addresses of these devices
start from 0x0, 0x8 or 0x10.
Start moving Port Registers specific code to their own files.
Signed-off-by: Vivien Didelot
---
drivers/net/dsa
Most of the chips will have a port register control bits to force the
port's link up, down, or let normal link detection occurs.
Implement such operation to use it later when setting duplex, etc.
Signed-off-by: Vivien Didelot
---
drivers/net/dsa/mv88e6xxx/chip.c
Add port functions to access the ports default VID.
Signed-off-by: Vivien Didelot
---
drivers/net/dsa/mv88e6xxx/chip.c | 51
drivers/net/dsa/mv88e6xxx/port.c | 38 ++
drivers/net/dsa/mv88e6xxx/port.h | 3 +++
3 files changed
Similarly to port's link, add setter to force port's half duplex, full
duplex or let normal duplex detection occurs.
Signed-off-by: Vivien Didelot
---
drivers/net/dsa/mv88e6xxx/chip.c | 17 +
drivers/net/dsa/mv88e6xxx/mv88e6xxx.h | 7 +++
drivers/net/dsa
Some chips such as 88E6352 and 88E6390 can be programmed to add delays
to RXCLK for IND inputs or to GTXCLK for OUTD outputs when port is in
RGMII mode.
Add a port function to program such delays according to the provided PHY
interface mode.
Signed-off-by: Vivien Didelot
---
drivers/net/dsa
Add port functions to set the port 802.1Q mode.
Signed-off-by: Vivien Didelot
---
drivers/net/dsa/mv88e6xxx/chip.c | 33 ++---
drivers/net/dsa/mv88e6xxx/port.c | 32
drivers/net/dsa/mv88e6xxx/port.h | 3 +++
3 files changed, 37
ted ports and speeds.
Signed-off-by: Vivien Didelot
---
drivers/net/dsa/mv88e6xxx/chip.c | 33 ++--
drivers/net/dsa/mv88e6xxx/mv88e6xxx.h | 23 +-
drivers/net/dsa/mv88e6xxx/port.c | 138 ++
drivers/net/dsa/mv88e6xxx/port.h | 6 ++
4 fi
em when needed (e.g. SPEED_MAX).
Vivien Didelot (11):
net: dsa: mv88e6xxx: add port files
net: dsa: mv88e6xxx: add port state setter
net: dsa: mv88e6xxx: add port vlan map setter
net: dsa: mv88e6xxx: add port FID accessors
net: dsa: mv88e6xxx: add port PVID accessors
net: dsa: mv88e6xxx: add
it can be called
under bridge lock.
Signed-off-by: Vivien Didelot
---
net/bridge/br_private.h | 1 +
net/bridge/br_stp.c | 28
net/bridge/br_stp_if.c | 12 +++-
3 files changed, 24 insertions(+), 17 deletions(-)
diff --git a/net/bridge/br_private.h b/net
Add a __br_set_topology_change helper to set the topology change value.
This can be later extended to add actions when the topology change flag
is set or cleared.
Signed-off-by: Vivien Didelot
---
net/bridge/br_private_stp.h | 1 +
net/bridge/br_stp.c | 10 --
net/bridge
,
http://profesores.elo.utfsm.cl/~agv/elo309/doc/802.1D-1998.pdf
Signed-off-by: Vivien Didelot
---
net/bridge/br_device.c | 2 +-
net/bridge/br_private.h | 3 ++-
net/bridge/br_stp.c | 27 +++
3 files changed, 30 insertions(+), 2 deletions(-)
diff --git a/
ot;8.3.5 Notifying topology changes",
http://profesores.elo.utfsm.cl/~agv/elo309/doc/802.1D-1998.pdf
[ Feedbacks are needed, especially for the usage of the bridge lock and
the defered ageing time attribute. It works fine so far but might raise
concerns. ]
Vivien Didelot (3):
net: bridg
Add a set_switch_mac chip-wide function to mv88e6xxx_ops and remove
MV88E6XXX_FLAG_G2_SWITCH_MAC flags.
Signed-off-by: Vivien Didelot
---
drivers/net/dsa/mv88e6xxx/chip.c | 28 +---
drivers/net/dsa/mv88e6xxx/mv88e6xxx.h | 8 ++--
2 files changed, 23 insertions
Similarly to the ports, phys, and Global SMI devices, abstract the SMI
device address of the Global 2 registers in a few g2 static helpers.
Signed-off-by: Vivien Didelot
---
drivers/net/dsa/mv88e6xxx/global2.c | 78 ++-
drivers/net/dsa/mv88e6xxx/mv88e6xxx.h
mv88e6xxx_g1_{read,write} and
mv88e6xxx_g1_wait helpers in a new global1.c file.
This patch finally removes _mv88e6xxx_reg_{read,write}, in favor on the
appropriate helpers. No functional changes here.
Signed-off-by: Vivien Didelot
---
drivers/net/dsa/mv88e6xxx/Makefile| 1 +
drivers/net
Introduce a mv88e6xxx_ops structure to describe supported chip-wide
functions and assign the correct variant to the chip models.
For the moment, add only PHY access routines. This allows to get rid of
the PHY ops structures and the usage of PHY flags.
Signed-off-by: Vivien Didelot
---
drivers
need the mv88e6xxx_ops name for future chip-wide operation
structure, thus rename mv88e6xxx_ops to more explicit mv88e6xxx_bus_ops.
Signed-off-by: Vivien Didelot
---
drivers/net/dsa/mv88e6xxx/chip.c | 10 +-
drivers/net/dsa/mv88e6xxx/mv88e6xxx.h | 8
2 files changed, 9
The STU (if the switch has one) is abstracted and accessed through the
VTU operations and data registers.
Thus rename the mv88e6xxx_vtu_stu_entry struct to mv88e6xxx_vtu_entry.
Signed-off-by: Vivien Didelot
---
drivers/net/dsa/mv88e6xxx/chip.c | 46
The mv88e6xxx_num_databases will be used by shared code, so move it
inline to the header file.
Signed-off-by: Vivien Didelot
---
drivers/net/dsa/mv88e6xxx/chip.c | 5 -
drivers/net/dsa/mv88e6xxx/mv88e6xxx.h | 5 +
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a
Add an mv88e6xxx_num_ports helper instead of digging in the chip info
structure.
Signed-off-by: Vivien Didelot
---
drivers/net/dsa/mv88e6xxx/chip.c | 30 +++---
drivers/net/dsa/mv88e6xxx/global2.c | 8
drivers/net/dsa/mv88e6xxx/mv88e6xxx.h | 5 +
3
Remove EEPROM flags in favor of new {get,set}_eeprom chip-wide
functions in the mv88e6xxx_ops structure.
Signed-off-by: Vivien Didelot
---
drivers/net/dsa/mv88e6xxx/chip.c | 34 +-
drivers/net/dsa/mv88e6xxx/mv88e6xxx.h | 16 +---
2 files changed
*val);
int (*phy_write)(struct mv88e6xxx_chip *chip, int addr, int reg,
u16 val);
};
Future patchsets will add ATU/VTU ops, software reset, etc.
Vivien Didelot (10):
net: dsa: mv88e6xxx: add global1 helpers
net: dsa: mv88e6xxx: abstract REG_GLOBAL2
net
Add flags to describe the presence of Global 1 ATU FID register (0x01)
and VTU FID register (0x02), instead of checking families.
Signed-off-by: Vivien Didelot
---
drivers/net/dsa/mv88e6xxx/chip.c | 16 +++-
drivers/net/dsa/mv88e6xxx/mv88e6xxx.h | 24
2
Commit-ID: 96b03ab86d843524ec4aed7fe0ceef412c684c68
Gitweb: http://git.kernel.org/tip/96b03ab86d843524ec4aed7fe0ceef412c684c68
Author: Vivien Didelot
AuthorDate: Thu, 22 Sep 2016 16:55:13 -0400
Committer: Ingo Molnar
CommitDate: Fri, 23 Sep 2016 07:30:04 +0200
locking/hung_task: Fix
port_fast_age operation to
dsa_switch_ops, to move this logic to the DSA layer and keep drivers
simple. b53 and mv88e6xxx are updated accordingly.
Vivien Didelot (4):
net: dsa: add port STP state helper
net: dsa: add port fast ageing
net: dsa: b53: implement DSA port fast ageing
net: dsa
Add a void helper to set the STP state of a port, checking first if the
required routine is provided by the driver.
Signed-off-by: Vivien Didelot
---
net/dsa/slave.c | 17 ++---
1 file changed, 10 insertions(+), 7 deletions(-)
diff --git a/net/dsa/slave.c b/net/dsa/slave.c
index
Remove the fast ageing logic from b53_br_set_stp_state and implement the
new DSA switch port_fast_age operation instead.
Signed-off-by: Vivien Didelot
---
drivers/net/dsa/b53/b53_common.c | 31 +++
1 file changed, 11 insertions(+), 20 deletions(-)
diff --git a
operation to dsa_switch_ops, to
move this logic to the DSA layer and keep drivers simple.
Signed-off-by: Vivien Didelot
---
include/net/dsa.h | 2 ++
net/dsa/slave.c | 18 ++
2 files changed, 20 insertions(+)
diff --git a/include/net/dsa.h b/include/net/dsa.h
index 7556646..b122196
Fix the indefinitiley -> indefinitely typo in Kconfig.debug.
Signed-off-by: Vivien Didelot
---
lib/Kconfig.debug | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index e2894b2..ee9e9a3 100644
--- a/lib/Kconfig.debug
+++ b/
Now that the DSA layer handles port fast ageing on correct STP change,
simplify _mv88e6xxx_port_state and implement mv88e6xxx_port_fast_age.
Signed-off-by: Vivien Didelot
---
drivers/net/dsa/mv88e6xxx/chip.c | 45
1 file changed, 23 insertions(+), 22
Hi Andrew,
Andrew Lunn writes:
> On Mon, Sep 19, 2016 at 07:56:11PM -0400, Vivien Didelot wrote:
>> An address can be loaded in the ATU with multiple ports, for instance
>> when adding multiple ports to a Multicast group with "bridge mdb".
>>
>> The cu
Hi Andrew,
Andrew Lunn writes:
> Hi Vivien
>
>> +do {
>> +err = _mv88e6xxx_atu_getnext(chip, fid, &next);
>> +if (err)
>> +return err;
>> +
>> +if (next.state == GLOBAL_ATU_DATA_STATE_UNUSED)
>> +break;
>> +
>> +
e
entry back in the ATU.
Note that the required _mv88e6xxx_atu_getnext function is defined below
mv88e6xxx_port_db_load_purge, so forward-declare it for the moment. The
ATU code will be isolated in future patches.
Fixes: 83dabd1fa84c ("net: dsa: mv88e6xxx: make switchdev DB ops generic&quo
Hi Andrew,
Andrew Lunn writes:
>> ok, i will simply substract 1 from the phy_addr inside the mdio
>> callbacks. this would make the code more readable and make the DT
>> binding compliant with the ePAPR spec.
>
> It does however need well commenting. It is setting a trap for anybody
> who puts a
Hi John,
John Crispin writes:
> i sent an email to Jiri earlier today and he asked me to drop this
> until his notification series got merged.
That makes sense then. So David should ignore this for the moment.
Thanks,
Vivien
Hi John,
John Crispin writes:
> @@ -237,6 +237,7 @@ struct switchdev_obj;
> struct switchdev_obj_port_fdb;
> struct switchdev_obj_port_mdb;
> struct switchdev_obj_port_vlan;
> +struct switchdev_obj_ipv4_fib;
Can you keep it ordered please (put obj_ipv4 above port_fdb).
>
> struct dsa_swi
Hi Stephen,
Stephen Hemminger writes:
> On Thu, 8 Sep 2016 12:50:43 -0400
> Vivien Didelot wrote:
>
>> If /sbin/bridge-stp is available on the system, bridge tries to execute
>> it instead of the kernel implementation when starting/stopping STP.
>>
>> If anyt
on
br0: failed to start userspace STP (256)
# dmesg
br0: /sbin/bridge-stp exited with code 1
br0: failed to start userspace STP (256)
br0: using kernel STP
Signed-off-by: Vivien Didelot
---
net/bridge/br_stp_if.c | 43 +++
1 file changed
Since the mv88e6xxx.c file has been renamed, the driver compiled as a
module is called chip.ko instead of mv88e6xxx.ko. Fix this.
Fixes: fad09c73c270 ("net: dsa: mv88e6xxx: rename single-chip support")
Signed-off-by: Vivien Didelot
---
drivers/net/dsa/mv88e6xxx/Makefile | 3 ++-
1 fi
ch as home routers embedding Ethernet
chips without Global2 support.
It is present on most recent chips, thus enable its support by default.
Changes in v2: fail probe if GLOBAL2 is required but not enabled.
Vivien Didelot (3):
net: dsa: mv88e6xxx: fix module naming
net: dsa: mv88e6xxx: move Gl
present on most recent chips, thus enable its support by default.
Signed-off-by: Vivien Didelot
---
drivers/net/dsa/mv88e6xxx/Kconfig | 11 +++
drivers/net/dsa/mv88e6xxx/Makefile | 2 +-
drivers/net/dsa/mv88e6xxx/chip.c| 4 +++
drivers/net/dsa/mv88e6xxx/global2.h | 58
igned-off-by: Vivien Didelot
---
drivers/net/dsa/mv88e6xxx/Makefile| 1 +
drivers/net/dsa/mv88e6xxx/chip.c | 463 +
drivers/net/dsa/mv88e6xxx/global2.c | 471 ++
drivers/net/dsa/mv88e6xxx/global2.h | 30 +++
drivers/ne
Hi Andrew,
Andrew Lunn writes:
>> I agree. Does the following snippet looks OK?
>>
>>
>> #ifndef CONFIG_NET_DSA_MV88E6XXX_GLOBAL2
>> if (mv88e6xxx_has(chip, MV88E6XXX_FLAG_GLOBAL2)) {
>> dev_err(chip->dev, "Missing support for Global 2
>> registers\n");
>
>
Hi Andrew,
Andrew Lunn writes:
>> What do you think?
>
> I think the probe() needs to fail with a very obvious error message
> saying you need to recompile your kernel with option XYZ enabled in
> order to support this switch, when the optional stuff is not
> optional...
I agree. Does the follo
Hi Andrew,
Andrew Lunn writes:
> On Fri, Sep 02, 2016 at 08:08:19AM -0400, Vivien Didelot wrote:
>> Since not every chip has a Global2 set of registers, make its support
>> optional, in which case the related functions will return -EOPNOTSUPP.
>>
>> This also allow
igned-off-by: Vivien Didelot
---
drivers/net/dsa/mv88e6xxx/Makefile| 1 +
drivers/net/dsa/mv88e6xxx/chip.c | 461 +
drivers/net/dsa/mv88e6xxx/global2.c | 470 ++
drivers/net/dsa/mv88e6xxx/mv88e6xxx.h | 18 ++
4 files ch
801 - 900 of 1687 matches
Mail list logo