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