Re: [PATCH 06/11] net: dsa: microchip: ksz8795: use phy_port_cnt where possible

2020-11-19 Thread Andrew Lunn
On Thu, Nov 19, 2020 at 09:40:05AM +0100, Michael Grzeschik wrote: > On Thu, Nov 19, 2020 at 01:29:15AM +0100, Andrew Lunn wrote: > > > case BR_STATE_DISABLED: > > > data |= PORT_LEARN_DISABLE; > > > - if (port < SWITCH_PORT_NUM) > > > + if (port < dev->phy_port_cnt) > >

Re: [PATCH 06/11] net: dsa: microchip: ksz8795: use phy_port_cnt where possible

2020-11-19 Thread Michael Grzeschik
On Thu, Nov 19, 2020 at 01:29:15AM +0100, Andrew Lunn wrote: case BR_STATE_DISABLED: data |= PORT_LEARN_DISABLE; - if (port < SWITCH_PORT_NUM) + if (port < dev->phy_port_cnt) member = 0; break; So this,

Re: [PATCH 06/11] net: dsa: microchip: ksz8795: use phy_port_cnt where possible

2020-11-18 Thread Florian Fainelli
On 11/18/2020 2:03 PM, Michael Grzeschik wrote: > Since the driver can be used on more switches it needs > to use flexible port count where ever possible. > > Signed-off-by: Michael Grzeschik Reviewed-by: Florian Fainelli -- Florian

Re: [PATCH 06/11] net: dsa: microchip: ksz8795: use phy_port_cnt where possible

2020-11-18 Thread Andrew Lunn
> case BR_STATE_DISABLED: > data |= PORT_LEARN_DISABLE; > - if (port < SWITCH_PORT_NUM) > + if (port < dev->phy_port_cnt) > member = 0; > break; So this, unlike all the other patches so far, is not obviously correct. W

[PATCH 06/11] net: dsa: microchip: ksz8795: use phy_port_cnt where possible

2020-11-18 Thread Michael Grzeschik
Since the driver can be used on more switches it needs to use flexible port count where ever possible. Signed-off-by: Michael Grzeschik --- v1: - based on "[PATCH v4 04/11] net: dsa: microchip: ksz8795: use port_cnt where possible" - lore: https://lore.kernel.org/netdev/20200803054442.2008