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 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 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, 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-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

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 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