diff options
Diffstat (limited to 'drivers/net/dsa/microchip/ksz_common.c')
| -rw-r--r-- | drivers/net/dsa/microchip/ksz_common.c | 10 | 
1 files changed, 9 insertions, 1 deletions
| diff --git a/drivers/net/dsa/microchip/ksz_common.c b/drivers/net/dsa/microchip/ksz_common.c index 0580b2fee21c..b074b4bb0629 100644 --- a/drivers/net/dsa/microchip/ksz_common.c +++ b/drivers/net/dsa/microchip/ksz_common.c @@ -3116,7 +3116,8 @@ static void ksz_set_xmii(struct ksz_device *dev, int port,  		/* On KSZ9893, disable RGMII in-band status support */  		if (dev->chip_id == KSZ9893_CHIP_ID ||  		    dev->chip_id == KSZ8563_CHIP_ID || -		    dev->chip_id == KSZ9563_CHIP_ID) +		    dev->chip_id == KSZ9563_CHIP_ID || +		    is_lan937x(dev))  			data8 &= ~P_MII_MAC_MODE;  		break;  	default: @@ -3917,6 +3918,13 @@ static int ksz_hsr_join(struct dsa_switch *ds, int port, struct net_device *hsr,  		return -EOPNOTSUPP;  	} +	/* KSZ9477 can only perform HSR offloading for up to two ports */ +	if (hweight8(dev->hsr_ports) >= 2) { +		NL_SET_ERR_MSG_MOD(extack, +				   "Cannot offload more than two ports - using software HSR"); +		return -EOPNOTSUPP; +	} +  	/* Self MAC address filtering, to avoid frames traversing  	 * the HSR ring more than once.  	 */ |