diff options
| author | Oleksij Rempel <o.rempel@pengutronix.de> | 2024-07-05 10:47:15 +0200 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2024-07-08 13:41:56 +0100 |
| commit | 5483cbfd863f01126c08703898a9e71d991a9bfe (patch) | |
| tree | 1f0efffd553cd9a78dc7fe28d085e696c79e65f2 /drivers/net/dsa/microchip/ksz_common.h | |
| parent | 3abbd7ed8b768ff37798e81910b47c2e05156d49 (diff) | |
net: dsa: microchip: lan9371/2: update MAC capabilities for port 4
Set proper MAC capabilities for port 4 on LAN9371 and LAN9372 switches with
integrated 100BaseTX PHY. And introduce the is_lan937x_tx_phy() function to
reuse it where applicable.
Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
Acked-by: Arun Ramadoss <arun.ramadoss@microchip.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/dsa/microchip/ksz_common.h')
| -rw-r--r-- | drivers/net/dsa/microchip/ksz_common.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/dsa/microchip/ksz_common.h b/drivers/net/dsa/microchip/ksz_common.h index c4a4664c0385..5f0a628b9849 100644 --- a/drivers/net/dsa/microchip/ksz_common.h +++ b/drivers/net/dsa/microchip/ksz_common.h @@ -638,6 +638,12 @@ static inline int is_lan937x(struct ksz_device *dev) dev->chip_id == LAN9374_CHIP_ID; } +static inline bool is_lan937x_tx_phy(struct ksz_device *dev, int port) +{ + return (dev->chip_id == LAN9371_CHIP_ID || + dev->chip_id == LAN9372_CHIP_ID) && port == KSZ_PORT_4; +} + /* STP State Defines */ #define PORT_TX_ENABLE BIT(2) #define PORT_RX_ENABLE BIT(1) |