Re: DSA switch

2018-05-04 Thread Andrew Lunn
> I also see that there is no bridge function in /drivers/net/dsa files > in our kernel (2.6.37) Sorry, i cannot really help you with an ancient kernel like that. Andrew

Re: DSA switch

2018-05-04 Thread Ran Shalit
why not just use mainline? >> > > It seems that the bridge functions OK, > so I rather keep on working with it, instead of doing too many > dramatically changes in the custom kernel of TI's which works with our > chip (dm8148). > > Yet, I would like to ask about the bridge:

Re: DSA switch

2018-05-04 Thread Ran Shalit
lly changes in the custom kernel of TI's which works with our chip (dm8148). Yet, I would like to ask about the bridge: Can a bridge also be used with dsa switch when ports are connected to different subnets ? Regards, Ran

Re: DSA switch

2018-05-03 Thread Andrew Lunn
> I am using kernel 2.6.37, but I think it is not kernel issue, but more > bad patches done on kernel. > It is based on TI's kernel, but with some custom modifications on > driver's switch, to make it work with TI's cpsw switch. > Seems like someone made some bad patch, I'll continue investigating

Re: DSA switch

2018-05-03 Thread Ran Shalit
On Thu, May 3, 2018 at 11:41 PM, Andrew Lunn wrote: > On Thu, May 03, 2018 at 11:35:08PM +0300, Ran Shalit wrote: >> On Wed, May 2, 2018 at 11:56 PM, Andrew Lunn wrote: >> > On Wed, May 02, 2018 at 11:20:05PM +0300, Ran Shalit wrote: >> >> Hello, >> >> >> >> Is it

Re: DSA switch

2018-05-03 Thread Andrew Lunn
On Thu, May 03, 2018 at 11:35:08PM +0300, Ran Shalit wrote: > On Wed, May 2, 2018 at 11:56 PM, Andrew Lunn wrote: > > On Wed, May 02, 2018 at 11:20:05PM +0300, Ran Shalit wrote: > >> Hello, > >> > >> Is it possible to use switch just like external real switch, > >> connecting all

Re: DSA switch

2018-05-03 Thread Ran Shalit
On Wed, May 2, 2018 at 11:56 PM, Andrew Lunn wrote: > On Wed, May 02, 2018 at 11:20:05PM +0300, Ran Shalit wrote: >> Hello, >> >> Is it possible to use switch just like external real switch, >> connecting all ports to the same subnet ? > > Yes. Just bridge all ports/interfaces

Re: DSA switch

2018-05-03 Thread Andrew Lunn
> It seems that although the bridge command functions, it takes several > seconds (~6-7 seconds !) from the time it resturns to shell till a > real communication works (ping between 2 PCs connected to switch). > Does it usually takes so much time ? PHY link up can take a second or two. Less if

Re: DSA switch

2018-05-03 Thread Ran Shalit
On Thu, May 3, 2018 at 10:11 AM, Jiri Pirko wrote: > Thu, May 03, 2018 at 08:50:52AM CEST, ransha...@gmail.com wrote: >>On Wed, May 2, 2018 at 11:56 PM, Andrew Lunn wrote: >>> On Wed, May 02, 2018 at 11:20:05PM +0300, Ran Shalit wrote: Hello, Is

Re: DSA switch

2018-05-03 Thread Ran Shalit
On Thu, May 3, 2018 at 10:11 AM, Jiri Pirko wrote: > Thu, May 03, 2018 at 08:50:52AM CEST, ransha...@gmail.com wrote: >>On Wed, May 2, 2018 at 11:56 PM, Andrew Lunn wrote: >>> On Wed, May 02, 2018 at 11:20:05PM +0300, Ran Shalit wrote: Hello, Is

Re: DSA switch

2018-05-03 Thread Jiri Pirko
Thu, May 03, 2018 at 08:50:52AM CEST, ransha...@gmail.com wrote: >On Wed, May 2, 2018 at 11:56 PM, Andrew Lunn wrote: >> On Wed, May 02, 2018 at 11:20:05PM +0300, Ran Shalit wrote: >>> Hello, >>> >>> Is it possible to use switch just like external real switch, >>> connecting all

Re: DSA switch

2018-05-03 Thread Ran Shalit
On Wed, May 2, 2018 at 11:56 PM, Andrew Lunn wrote: > On Wed, May 02, 2018 at 11:20:05PM +0300, Ran Shalit wrote: >> Hello, >> >> Is it possible to use switch just like external real switch, >> connecting all ports to the same subnet ? > > Yes. Just bridge all ports/interfaces

Re: DSA switch

2018-05-02 Thread Andrew Lunn
On Wed, May 02, 2018 at 11:20:05PM +0300, Ran Shalit wrote: > Hello, > > Is it possible to use switch just like external real switch, > connecting all ports to the same subnet ? Yes. Just bridge all ports/interfaces together and put your host IP address on the bridge. Andrew

DSA switch

2018-05-02 Thread Ran Shalit
Hello, Is it possible to use switch just like external real switch, connecting all ports to the same subnet ? In our architecture, we prefer that all IPs connected to board shall be in the same subnet. Yet, I am not sure if it is possible with dsa switch, because in dsa the ports are seen

[PATCH v4 net-next 6/6] net: dsa: switch: Don't add CPU port to an mdb by default

2017-11-09 Thread Andrew Lunn
Now that the host indicates when a multicast group should be forwarded from the switch to the host, don't do it by default. Signed-off-by: Andrew Lunn --- v4: Fix unrelated white space change --- net/dsa/switch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: [PATCH v3 net-next 5/5] net: dsa: switch: Don't add CPU port to an mdb by default

2017-11-07 Thread Sergei Shtylyov
Hello! On 11/7/2017 2:26 AM, Andrew Lunn wrote: Now that the host indicates when a multicast group should be forwarded from the switch to the host, don't do it by default. Signed-off-by: Andrew Lunn --- net/dsa/switch.c | 3 ++- 1 file changed, 2 insertions(+), 1

[PATCH v3 net-next 5/5] net: dsa: switch: Don't add CPU port to an mdb by default

2017-11-06 Thread Andrew Lunn
Now that the host indicates when a multicast group should be forwarded from the switch to the host, don't do it by default. Signed-off-by: Andrew Lunn --- net/dsa/switch.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/dsa/switch.c b/net/dsa/switch.c

[PATCH v2 rfc 6/8] net: dsa: switch: Don't add CPU port to an mdb by default

2017-09-05 Thread Andrew Lunn
Now that the host indicates when a multicast group should be forwarded from the switch to the host, don't do it by default. Signed-off-by: Andrew Lunn --- net/dsa/switch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/dsa/switch.c b/net/dsa/switch.c

[PATCH v2 rfc 5/8] net: dsa: switch: handle host mdb add/remove

2017-09-05 Thread Andrew Lunn
When receiving notifications of the host mdb add/remove, add/remove an mdb to the CPU port, so that traffic flows from a port to the CPU port and hence to the host. Signed-off-by: Andrew Lunn --- net/dsa/switch.c | 72 ++-- 1

[PATCH net-next v3 03/13] net: dsa: Remove switchdev dependency from DSA switch notifier chain

2017-08-06 Thread Arkadi Sharshevsky
Currently, the switchdev objects are embedded inside the DSA notifier info. This patch removes this dependency. This is done as a preparation stage before adding support for learning FDB through the switchdev notification chain. Signed-off-by: Arkadi Sharshevsky

[PATCH net-next v2 03/13] net: dsa: Remove switchdev dependency from DSA switch notifier chain

2017-07-19 Thread Arkadi Sharshevsky
Currently, the switchdev objects are embedded inside the DSA notifier info. This patch removes this dependency. This is done as a preparation stage before adding support for learning FDB through the switchdev notification chain. Signed-off-by: Arkadi Sharshevsky

[PATCH net-next 03/11] net: dsa: Remove switchdev dependency from DSA switch notifier chain

2017-07-18 Thread Arkadi Sharshevsky
Currently, the switchdev objects are embedded inside the DSA notifier info. This patch removes this dependency. This is done as a preparation stage before adding support for learning FDB through the switchdev notification chain. Signed-off-by: Arkadi Sharshevsky

Re: [PATCH net-next RFC 03/12] net: dsa: Remove switchdev dependency from DSA switch notifier chain

2017-07-06 Thread Vivien Didelot
Arkadi Sharshevsky writes: > Currently, the switchdev objects are embedded inside the DSA notifier > info. This patch removes this dependency. This is done as a preparation > stage before adding support for learning FDB through the switchdev > notification chain. > >

Re: [PATCH net-next RFC 03/12] net: dsa: Remove switchdev dependency from DSA switch notifier chain

2017-07-05 Thread Florian Fainelli
On 07/05/2017 08:36 AM, Arkadi Sharshevsky wrote: > Currently, the switchdev objects are embedded inside the DSA notifier > info. This patch removes this dependency. This is done as a preparation > stage before adding support for learning FDB through the switchdev > notification chain. > >

[PATCH net-next RFC 03/12] net: dsa: Remove switchdev dependency from DSA switch notifier chain

2017-07-05 Thread Arkadi Sharshevsky
Currently, the switchdev objects are embedded inside the DSA notifier info. This patch removes this dependency. This is done as a preparation stage before adding support for learning FDB through the switchdev notification chain. Signed-off-by: Arkadi Sharshevsky ---

Re: [PATCH v5 net-next 3/5] dsa: add DSA switch driver for Microchip KSZ9477

2017-05-31 Thread Andrew Lunn
gt; The other 2 ports have interfaces that can be configured as SGMII, RGMII, MII > or RMII. Either of these may connect directly to a host processor or > to an external PHY. The SGMII port may interface to a fiber optic transceiver. > > This driver currently supports vlan, fdb, m

[PATCH v5 net-next 3/5] dsa: add DSA switch driver for Microchip KSZ9477

2017-05-31 Thread Woojung.Huh
Either of these may connect directly to a host processor or to an external PHY. The SGMII port may interface to a fiber optic transceiver. This driver currently supports vlan, fdb, mdb & mirror dsa switch operations. Reviewed-by: Florian Fainelli <f.faine...@gmail.com> Signed-off-by: Wooj

[PATCH v5 net-next 3/5] dsa: add DSA switch driver for Microchip KSZ9477

2017-05-30 Thread Woojung.Huh
Either of these may connect directly to a host processor or to an external PHY. The SGMII port may interface to a fiber optic transceiver. This driver currently supports vlan, fdb, mdb & mirror dsa switch operations. Reviewed-by: Florian Fainelli <f.faine...@gmail.com> Signed-off-by: Wooj

RE: [PATCH v4 net-next 3/5] dsa: add DSA switch driver for Microchip KSZ9477

2017-05-30 Thread Woojung.Huh
Hi Andrew, > > +static int ksz_port_mdb_del(struct dsa_switch *ds, int port, > > + const struct switchdev_obj_port_mdb *mdb) > > +{ > > + struct ksz_device *dev = ds->priv; > > + u32 static_table[4]; > > + u32 data; > > + int index; > > + int ret = 0; > > + u32

Re: [PATCH v4 net-next 3/5] dsa: add DSA switch driver for Microchip KSZ9477

2017-05-30 Thread Andrew Lunn
> +static int ksz_port_mdb_del(struct dsa_switch *ds, int port, > + const struct switchdev_obj_port_mdb *mdb) > +{ > + struct ksz_device *dev = ds->priv; > + u32 static_table[4]; > + u32 data; > + int index; > + int ret = 0; > + u32 mac_hi, mac_lo; >

[PATCH v4 net-next 3/5] dsa: add DSA switch driver for Microchip KSZ9477

2017-05-30 Thread Woojung.Huh
Either of these may connect directly to a host processor or to an external PHY. The SGMII port may interface to a fiber optic transceiver. This driver currently supports vlan, fdb, mdb & mirror dsa switch operations. Signed-off-by: Woojung Huh <woojung@microchip.com> Reviewed-by: Florian F

RE: [PATCH v3 net-next 3/5] dsa: add DSA switch driver for Microchip KSZ9477

2017-05-22 Thread Woojung.Huh
> > > > +static int get_vlan_table(struct dsa_switch *ds, u16 vid, u32 > *vlan_table) > > > > +{ > > > > + struct ksz_device *dev = ds->priv; > > > > + u8 data; > > > > + int timeout = 1000; > > > > + > > > > + ksz_write16(dev, REG_SW_VLAN_ENTRY_INDEX__2, vid & > > >

Re: [PATCH v3 net-next 3/5] dsa: add DSA switch driver for Microchip KSZ9477

2017-05-22 Thread Andrew Lunn
On Mon, May 22, 2017 at 09:21:28PM +, woojung@microchip.com wrote: > Hi Andres, > > > > +static struct { > > > + int index; > > > + char string[ETH_GSTRING_LEN]; > > > > Hi Woojung > > > > Since you need to respin for the skb_put_padto(), please make this > > const. > OK. > > > >

RE: [PATCH v3 net-next 3/5] dsa: add DSA switch driver for Microchip KSZ9477

2017-05-22 Thread Woojung.Huh
Hi Andres, > > +static struct { > > + int index; > > + char string[ETH_GSTRING_LEN]; > > Hi Woojung > > Since you need to respin for the skb_put_padto(), please make this > const. OK. > > +static int get_vlan_table(struct dsa_switch *ds, u16 vid, u32 *vlan_table) > > +{ > > + struct

Re: [PATCH v3 net-next 3/5] dsa: add DSA switch driver for Microchip KSZ9477

2017-05-22 Thread Andrew Lunn
On Fri, May 19, 2017 at 10:57:12PM +, woojung@microchip.com wrote: > +static struct { > + int index; > + char string[ETH_GSTRING_LEN]; Hi Woojung Since you need to respin for the skb_put_padto(), please make this const. > +static int get_vlan_table(struct dsa_switch *ds, u16

Re: [PATCH v3 net-next 3/5] dsa: add DSA switch driver for Microchip KSZ9477

2017-05-19 Thread Florian Fainelli
ports have interfaces that can be configured as SGMII, RGMII, MII > or RMII. Either of these may connect directly to a host processor or > to an external PHY. The SGMII port may interface to a fiber optic transceiver. > > This driver currently supports vlan, fdb, mdb & mirror d

[PATCH v3 net-next 3/5] dsa: add DSA switch driver for Microchip KSZ9477

2017-05-19 Thread Woojung.Huh
Either of these may connect directly to a host processor or to an external PHY. The SGMII port may interface to a fiber optic transceiver. This driver currently supports vlan, fdb, mdb & mirror dsa switch operations. Signed-off-by: Woojung Huh <woojung@microchip.com> --- drivers

Re: [PATCH v2 net-next 3/5] dsa: add DSA switch driver for Microchip KSZ9477

2017-05-15 Thread Florian Fainelli
On 05/15/2017 02:01 PM, woojung@microchip.com wrote: >>> +static const struct ksz_chip_data ksz_switch_chips[] = { >>> + { >>> + .chip_id = 0x00947700, >>> + .dev_name = "KSZ9477", >>> + .num_vlans = 4096, >>> + .num_alus = 4096, >>> +

RE: [PATCH v2 net-next 3/5] dsa: add DSA switch driver for Microchip KSZ9477

2017-05-15 Thread Woojung.Huh
> > +static const struct ksz_chip_data ksz_switch_chips[] = { > > + { > > + .chip_id = 0x00947700, > > + .dev_name = "KSZ9477", > > + .num_vlans = 4096, > > + .num_alus = 4096, > > + .num_statics = 16, > > + .enabled_ports = 0x1F, /*

RE: [PATCH v2 net-next 3/5] dsa: add DSA switch driver for Microchip KSZ9477

2017-05-15 Thread Woojung.Huh
> >> + dev->vlan_cache = devm_kmalloc_array(dev->dev, > >> + sizeof(struct vlan_table), > >> + dev->num_vlans, GFP_KERNEL); > > > > You should check, but i think devm_kmalloc_array sets the allocated > > memory to 0. > >

Re: [PATCH v2 net-next 3/5] dsa: add DSA switch driver for Microchip KSZ9477

2017-05-14 Thread Sergei Shtylyov
Hello! On 5/13/2017 5:56 PM, Andrew Lunn wrote: [...] +static int ksz_reset_switch(struct dsa_switch *ds) +{ + struct ksz_device *dev = ds->priv; + u8 data8; + u16 data16; + u32 data32; + ... + + memset(dev->vlan_cache, 0, sizeof(*dev->vlan_cache) *

Re: [PATCH v2 net-next 3/5] dsa: add DSA switch driver for Microchip KSZ9477

2017-05-13 Thread Andrew Lunn
> +static int get_vlan_table(struct dsa_switch *ds, u16 vid, u32 *vlan_table) > +{ > + struct ksz_device *dev = ds->priv; > + u8 data; > + int timeout = 1000; > + > + ksz_write16(dev, REG_SW_VLAN_ENTRY_INDEX__2, vid & VLAN_INDEX_M); > + ksz_write8(dev, REG_SW_VLAN_CTRL,

Re: [PATCH v2 net-next 3/5] dsa: add DSA switch driver for Microchip KSZ9477

2017-05-13 Thread Andrew Lunn
On Fri, May 12, 2017 at 08:07:58PM +, woojung@microchip.com wrote: > +static void ksz_config_cpu_port(struct dsa_switch *ds) > +{ > + struct ksz_device *dev = ds->priv; > + int i; > + > + ds->num_ports = dev->port_cnt; > + > + for (i = 0; i < ds->num_ports; i++) { > +

[PATCH v2 net-next 3/5] dsa: add DSA switch driver for Microchip KSZ9477

2017-05-12 Thread Woojung.Huh
Either of these may connect directly to a host processor or to an external PHY. The SGMII port may interface to a fiber optic transceiver. This driver currently supports vlan, fdb, mdb & mirror dsa switch operations. Signed-off-by: Woojung Huh <woojung@microchip.com> --- drivers

RE: [PATCH net-next 3/5] dsa: add DSA switch driver for Microchip KSZ9477

2017-05-08 Thread Woojung.Huh
t; Either of these may connect directly to a host processor or to > > an external PHY. The SGMII port may interface to a fiber optic transceiver. > > > > This driver currently supports vlan, fdb, mdb & mirror dsa switch > > operations. > > > > Signed-off-by: Wo

Re: [PATCH net-next 3/5] dsa: add DSA switch driver for Microchip KSZ9477

2017-05-07 Thread Florian Fainelli
he other 2 ports have interfaces that can be > configured as SGMII, RGMII, MII or RMII. > Either of these may connect directly to a host processor or to > an external PHY. The SGMII port may interface to a fiber optic transceiver. > > This driver currently supports vlan, fdb

[PATCH net-next 3/5] dsa: add DSA switch driver for Microchip KSZ9477

2017-05-05 Thread Woojung.Huh
Either of these may connect directly to a host processor or to an external PHY. The SGMII port may interface to a fiber optic transceiver. This driver currently supports vlan, fdb, mdb & mirror dsa switch operations. Signed-off-by: Woojung Huh <woojung@microchip.com> --- drivers

Re: [PATCH v6 2/4] net: dsa: add new DSA switch driver for the SMSC-LAN9303

2017-04-20 Thread Florian Fainelli
On 04/18/2017 01:48 AM, Juergen Borleis wrote: > The SMSC/Microchip LAN9303 is an ethernet switch device with one CPU port > and two external ethernet ports with built-in phys. > > This driver uses the DSA framework, but is currently only capable of > separating the two external ports. There is

[PATCH v6 2/4] net: dsa: add new DSA switch driver for the SMSC-LAN9303

2017-04-18 Thread Juergen Borleis
The SMSC/Microchip LAN9303 is an ethernet switch device with one CPU port and two external ethernet ports with built-in phys. This driver uses the DSA framework, but is currently only capable of separating the two external ports. There is no offload support yet. Signed-off-by: Juergen Borleis

[PATCH v5 2/4] net: dsa: add new DSA switch driver for the SMSC-LAN9303

2017-04-13 Thread Juergen Borleis
The SMSC/Microchip LAN9303 is an ethernet switch device with one CPU port and two external ethernet ports with built-in phys. This driver uses the DSA framework, but is currently only capable of separating the two external ports. There is no offload support yet. Signed-off-by: Juergen Borleis

[PATCH v3 2/4] net: dsa: add new DSA switch driver for the SMSC-LAN9303

2017-04-12 Thread Juergen Borleis
The SMSC/Microchip LAN9303 is an ethernet switch device with one CPU port and two external ethernet ports with built-in phys. This driver uses the DSA framework, but is currently only capable of separating the two external ports. There is no offload support yet. Signed-off-by: Juergen Borleis

Re: [PATCH v3 2/4] net: dsa: add new DSA switch driver for the SMSC-LAN9303

2017-04-11 Thread Andrew Lunn
On Tue, Apr 11, 2017 at 09:22:57AM +0200, Juergen Borleis wrote: > The SMSC/Microchip LAN9303 is an ethernet switch device with one CPU port > and two external ethernet ports with built-in phys. > > This driver uses the DSA framework, but is currently only capable of > separating the two external

[PATCH v3 2/4] net: dsa: add new DSA switch driver for the SMSC-LAN9303

2017-04-11 Thread Juergen Borleis
The SMSC/Microchip LAN9303 is an ethernet switch device with one CPU port and two external ethernet ports with built-in phys. This driver uses the DSA framework, but is currently only capable of separating the two external ports. There is no offload support yet. Signed-off-by: Juergen Borleis

Re: [PATCH v2 2/4] net: dsa: add new DSA switch driver for the SMSC-LAN9303

2017-04-10 Thread Andrew Lunn
On Mon, Apr 10, 2017 at 09:44:12AM +0200, Juergen Borleis wrote: > Hi Andrew, > > On Friday 07 April 2017 16:29:43 Andrew Lunn wrote: > > > +static int lan9303_virt_phy_reg_read(struct lan9303 *chip, int regnum) > > > +{ > > > + int ret; > > > + u32 val; > > > + > > > + if (regnum >

Re: [PATCH v2 2/4] net: dsa: add new DSA switch driver for the SMSC-LAN9303

2017-04-10 Thread Juergen Borleis
Hi Andrew, On Friday 07 April 2017 16:29:43 Andrew Lunn wrote: > > +static int lan9303_virt_phy_reg_read(struct lan9303 *chip, int regnum) > > +{ > > + int ret; > > + u32 val; > > + > > + if (regnum > MII_EXPANSION) { > > + if (regnum == MII_LAN911X_SPECIAL_CONTROL_STATUS) > > +

Re: [PATCH v2 2/4] net: dsa: add new DSA switch driver for the SMSC-LAN9303

2017-04-07 Thread Andrew Lunn
Hi Juergen > +static int lan9303_virt_phy_reg_read(struct lan9303 *chip, int regnum) > +{ > + int ret; > + u32 val; > + > + if (regnum > MII_EXPANSION) { > + if (regnum == MII_LAN911X_SPECIAL_CONTROL_STATUS) > + regnum = 7; /* map to

Re: [PATCH v2 2/4] net: dsa: add new DSA switch driver for the SMSC-LAN9303

2017-04-07 Thread David Miller
From: Juergen Borleis Date: Fri, 7 Apr 2017 10:15:00 +0200 > +static inline struct lan9303 *ds_to_lan9303(struct dsa_switch *ds) > +{ > + return (struct lan9303 *)ds->priv; > +} You never need an explicit cast from a void pointer to another kind of pointer. Please

[PATCH v2 2/4] net: dsa: add new DSA switch driver for the SMSC-LAN9303

2017-04-07 Thread Juergen Borleis
The SMSC/Microchip LAN9303 is an ethernet switch device with one CPU port and two external ethernet ports with built-in phys. This driver uses the DSA framework, but is currently only capable of separating the two external ports. There is no offload support yet. Signed-off-by: Juergen Borleis

Re: [PATCH 2/4] net: dsa: add new DSA switch driver for the SMSC-LAN9303

2017-04-06 Thread Juergen Borleis
Hi Andrew, On Thursday 06 April 2017 13:59:00 Andrew Lunn wrote: > [...] > > > Does the MDIO bus go to the outside world? Could there be external > > > PHYs? > > > > This device includes two phys (at port 1 and 2) and these > > functions are called to detect their state. > > Some switches

Re: [PATCH 2/4] net: dsa: add new DSA switch driver for the SMSC-LAN9303

2017-04-06 Thread Andrew Lunn
> > > +static int lan9303_phy_write(struct dsa_switch *ds, int phy, int regnum, > > > + u16 val) > > > +{ > > > + struct lan9303 *chip = ds_to_lan9303(ds); > > > + int phy_base = chip->phy_addr_sel_strap; > > > + > > > + if (phy == phy_base) > > > + return

Re: [PATCH 2/4] net: dsa: add new DSA switch driver for the SMSC-LAN9303

2017-04-06 Thread Juergen Borleis
Hi Andrew, On Wednesday 05 April 2017 20:12:32 Andrew Lunn wrote: > [...] > > drivers/net/phy/lan9303-core.c | 924 > > + > > drivers/net/phy/lan9303.h | 21 + > > drivers/net/dsa please. Done in v2. > One general comment. I'm assuming parts of

Re: [PATCH 2/4] net: dsa: add new DSA switch driver for the SMSC-LAN9303

2017-04-06 Thread Juergen Borleis
Hi Andrew, v2 of the patches will follow. On Wednesday 05 April 2017 20:12:32 Andrew Lunn wrote: > [...] > > + do { > > + ret = regmap_read(regmap, offset, reg); > > + if (ret == -EAGAIN) > > + msleep(500); > > + } while (ret == -EAGAIN); > > Please

Re: [PATCH 2/4] net: dsa: add new DSA switch driver for the SMSC-LAN9303

2017-04-05 Thread Andrew Lunn
On Wed, Apr 05, 2017 at 11:20:22AM +0200, Juergen Borleis wrote: > The SMSC/Microchip LAN9303 is an ethernet switch device with one CPU port > and two external ethernet ports with built-in phys. > > This driver uses the DSA framework, but is currently only capable of > separating the two external

[PATCH 2/4] net: dsa: add new DSA switch driver for the SMSC-LAN9303

2017-04-05 Thread Juergen Borleis
The SMSC/Microchip LAN9303 is an ethernet switch device with one CPU port and two external ethernet ports with built-in phys. This driver uses the DSA framework, but is currently only capable of separating the two external ports. There is no offload support yet. Signed-off-by: Juergen Borleis

[PATCH net-next v5 4/4] ARM: orion: Register DSA switch as a MDIO device

2017-02-04 Thread Florian Fainelli
Utilize the ability to pass board specific MDIO bus information towards a particular MDIO device thus allowing us to provide the per-port switch layout to the Marvell 88E6XXX switch driver. Since we would end-up with conflicting registration paths, do not register the "dsa" platform device

[PATCH net-next v4 10/10] ARM: orion: Register DSA switch as a MDIO device

2017-01-17 Thread Florian Fainelli
Utilize the ability to pass board specific MDIO bus information towards a particular MDIO device thus allowing us to provide the per-port switch layout to the Marvell 88E6XXX switch driver. Since we would end-up with conflicting registration paths, do not register the "dsa" platform device

[PATCH net-next v3 10/10] ARM: orion: Register DSA switch as a MDIO device

2017-01-14 Thread Florian Fainelli
Utilize the ability to pass board specific MDIO bus information towards a particular MDIO device thus allowing us to provide the per-port switch layout to the Marvell 88E6XXX switch driver. Since we would end-up with conflicting registration paths, do not register the "dsa" platform device

[PATCH net-next v2 10/10] ARM: orion: Register DSA switch as a MDIO device

2017-01-11 Thread Florian Fainelli
Utilize the ability to pass board specific MDIO bus information towards a particular MDIO device thus allowing us to provide the per-port switch layout to the Marvell 88E6XXX switch driver. Since we would end-up with conflicting registration paths, do not register the "dsa" platform device

[PATCH net-next 8/8] ARM: orion: Register DSA switch as a MDIO device

2017-01-10 Thread Florian Fainelli
Utilize the ability to pass board specific MDIO bus information towards a particular MDIO device thus allowing us to provide the per-port switch layout to the Marvell 88E6XXX switch driver. Since we would end-up with conflicting registration paths, do not register the "dsa" platform device

[PATCH v3 4/5] net: dsa: switch to devm_ calls and remove kfree calls

2015-10-06 Thread Neil Armstrong
Now the kfree calls exists in the the remove functions, remove them in all places except the of_probe functions and replace allocation calls with their devm_ counterparts. Reviewed-by: Florian Fainelli Signed-off-by: Neil Armstrong ---

[PATCH v2 4/5] net: dsa: switch to devm_ calls and remove kfree calls

2015-10-03 Thread Neil Armstrong
Now the kfree calls exists in the the remove functions, remove them in all places except the of_probe functions and replace allocation calls with their devm_ counterparts. Signed-off-by: Neil Armstrong --- net/dsa/dsa.c | 17 + 1 file changed, 5

Re: [PATCH v2 4/5] net: dsa: switch to devm_ calls and remove kfree calls

2015-10-03 Thread Florian Fainelli
Le 03/10/2015 07:26, Neil Armstrong a écrit : > Now the kfree calls exists in the the remove functions, remove them in all > places except the of_probe functions and replace allocation calls > with their devm_ counterparts. > > Signed-off-by: Neil Armstrong Reviewed-by: