Re: [PATCH net-next v2 08/10] net: dsa: lan9303: Added ALR/fdb/mdb handling

2017-07-27 Thread Egil Hjelmeland
On 26. juli 2017 19:41, Andrew Lunn wrote: Hi Egil +/* This function will wait a while until mask & reg == value */ +/* Otherwise, return timeout */ +static int lan9303_csr_reg_wait(struct lan9303 *chip, int regno, + int mask, char value) +{ + int i; + +

Re: [PATCH net-next v2 08/10] net: dsa: lan9303: Added ALR/fdb/mdb handling

2017-07-26 Thread Andrew Lunn
Hi Egil > +/* This function will wait a while until mask & reg == value */ > +/* Otherwise, return timeout */ > +static int lan9303_csr_reg_wait(struct lan9303 *chip, int regno, > + int mask, char value) > +{ > + int i; > + > + for (i = 0; i < 0x1000; i++) { >

[PATCH net-next v2 08/10] net: dsa: lan9303: Added ALR/fdb/mdb handling

2017-07-25 Thread Egil Hjelmeland
Added functions for accessing / managing the lan9303 ALR (Address Logic Resolution). Implemented DSA methods: set_addr, port_fast_age, port_fdb_prepare, port_fdb_add, port_fdb_del, port_fdb_dump, port_mdb_prepare, port_mdb_add and port_mdb_del. Since the lan9303 do not offer reading specific ALR