W dniu 2.12.2026 o 21:13, Florian Fainelli pisze:
> On 12/2/26 02:34, Rafał Miłecki wrote:
>> From: Rafał Miłecki <raf…@milecki.pl>
>>
>> Port 8 allows using all switch features as in opposite to ports 5 and 7.
>>
>> Signed-off-by: Rafał Miłecki <raf…@milecki.pl>
>> ---
>> V4: Add check for NULL pointer
>>
>> drivers/net/dsa/b53/b53_common.c | 27 +++++++++++++++++++++++++++
>> 1 file changed, 27 insertions(+)
>>
>> diff --git a/drivers/net/dsa/b53/b53_common.c b/drivers/net/dsa/b53/b53_common.c
>> index ee2d27732c0c..53625090131e 100644
>> --- a/drivers/net/dsa/b53/b53_common.c
>> +++ b/drivers/net/dsa/b53/b53_common.c
>> @@ -758,6 +758,32 @@ void b53_disable_port(struct dsa_switch *ds, int port)
>> }
>> EXPORT_SYMBOL(b53_disable_port);
>> +static struct dsa_port *b53_preferred_default_local_cpu_port(struct dsa_switch *ds)
>> +{
>> + struct b53_device *dev = ds->priv;
>> + struct dsa_port *cpu_dp;
>> +
>> + /*
>> + * Northstar SoCs devices have 3 Ethernet controllers and 3 CPU ports:
>> + * 5 (IMP1), 7, 8 (IMP0). This design was meant for dual IMP setups when
>> + * WAN traffic goes to port 5 and LAN traffic goes to port 8.
>> + *
>> + * While all 3 ports support Broadcom header, ports 5 and 7 have their
>> + * limitations. Features that relay on trapping to CPU (e.g. EAP, STP)
>> + * won't work when using those as CPU ones.
>
> typo: s/relay/rely/
>
>> + *
>> + * Prefer CPU port 8 if available.
>> + */
>> + if (is5301x(dev)) {
>
> Appreciate you want to be somewhat conservative here but the list is much longer, in fact, we should probably implement this by exception, the norm is to use port 8, and the exception is to use another one.
I'm just not really familiar with other hardware supported by b53.
Are you aware of any devices that this logic shouldn't be applied to?