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

2017-05-19 Thread Woojung.Huh
From: Woojung Huh The KSZ9477 is a fully integrated layer 2, managed, 7 ports GigE switch with numerous advanced features. 5 ports incorporate 10/100/1000 Mbps PHYs. The other 2 ports have interfaces that can be configured as SGMII, RGMII, MII or RMII. Either of these may connect directly to a ho

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

2017-05-19 Thread Florian Fainelli
On 05/19/2017 03:57 PM, woojung@microchip.com wrote: > From: Woojung Huh > > The KSZ9477 is a fully integrated layer 2, managed, 7 ports GigE switch > with numerous advanced features. 5 ports incorporate 10/100/1000 Mbps PHYs. > The other 2 ports have interfaces that can be configured as SGMI

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 vid

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 ksz_d

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. > > > > +stati

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