* [PATCH net-next v1 1/1] net: dsa: microchip: lan9371/2: update MAC capabilities for port 4
@ 2024-07-04 14:13 Oleksij Rempel
2024-07-04 14:21 ` Florian Fainelli
2024-07-05 2:38 ` Arun.Ramadoss
0 siblings, 2 replies; 3+ messages in thread
From: Oleksij Rempel @ 2024-07-04 14:13 UTC (permalink / raw)
To: David S. Miller, Andrew Lunn, Eric Dumazet, Florian Fainelli,
Jakub Kicinski, Paolo Abeni, Vladimir Oltean, Woojung Huh,
Arun Ramadoss
Cc: Oleksij Rempel, kernel, linux-kernel, netdev, UNGLinuxDriver
Set proper MAC capabilities for port 4 on LAN9371 and LAN9372 switches with
integrated 100BaseTX PHY.
Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
---
drivers/net/dsa/microchip/lan937x_main.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/net/dsa/microchip/lan937x_main.c b/drivers/net/dsa/microchip/lan937x_main.c
index 83ac33fede3f5..44911bc7cea1d 100644
--- a/drivers/net/dsa/microchip/lan937x_main.c
+++ b/drivers/net/dsa/microchip/lan937x_main.c
@@ -324,6 +324,11 @@ void lan937x_phylink_get_caps(struct ksz_device *dev, int port,
/* MII/RMII/RGMII ports */
config->mac_capabilities |= MAC_ASYM_PAUSE | MAC_SYM_PAUSE |
MAC_100HD | MAC_10 | MAC_1000FD;
+ } else if ((dev->info->chip_id == LAN9371_CHIP_ID ||
+ dev->info->chip_id == LAN9372_CHIP_ID) &&
+ port == KSZ_PORT_4) {
+ config->mac_capabilities |= MAC_ASYM_PAUSE | MAC_SYM_PAUSE |
+ MAC_100HD | MAC_10;
}
}
--
2.39.2
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net-next v1 1/1] net: dsa: microchip: lan9371/2: update MAC capabilities for port 4
2024-07-04 14:13 [PATCH net-next v1 1/1] net: dsa: microchip: lan9371/2: update MAC capabilities for port 4 Oleksij Rempel
@ 2024-07-04 14:21 ` Florian Fainelli
2024-07-05 2:38 ` Arun.Ramadoss
1 sibling, 0 replies; 3+ messages in thread
From: Florian Fainelli @ 2024-07-04 14:21 UTC (permalink / raw)
To: Oleksij Rempel, David S. Miller, Andrew Lunn, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Vladimir Oltean, Woojung Huh,
Arun Ramadoss
Cc: kernel, linux-kernel, netdev, UNGLinuxDriver
On 7/4/2024 3:13 PM, Oleksij Rempel wrote:
> Set proper MAC capabilities for port 4 on LAN9371 and LAN9372 switches with
> integrated 100BaseTX PHY.
>
> Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
--
Florian
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net-next v1 1/1] net: dsa: microchip: lan9371/2: update MAC capabilities for port 4
2024-07-04 14:13 [PATCH net-next v1 1/1] net: dsa: microchip: lan9371/2: update MAC capabilities for port 4 Oleksij Rempel
2024-07-04 14:21 ` Florian Fainelli
@ 2024-07-05 2:38 ` Arun.Ramadoss
1 sibling, 0 replies; 3+ messages in thread
From: Arun.Ramadoss @ 2024-07-05 2:38 UTC (permalink / raw)
To: andrew, olteanv, davem, Woojung.Huh, pabeni, o.rempel, edumazet,
f.fainelli, kuba
Cc: kernel, linux-kernel, netdev, UNGLinuxDriver
Hi Oleksij,
On Thu, 2024-07-04 at 16:13 +0200, Oleksij Rempel wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you
> know the content is safe
>
> Set proper MAC capabilities for port 4 on LAN9371 and LAN9372
> switches with
> integrated 100BaseTX PHY.
>
> Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
> ---
> drivers/net/dsa/microchip/lan937x_main.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/drivers/net/dsa/microchip/lan937x_main.c
> b/drivers/net/dsa/microchip/lan937x_main.c
> index 83ac33fede3f5..44911bc7cea1d 100644
> --- a/drivers/net/dsa/microchip/lan937x_main.c
> +++ b/drivers/net/dsa/microchip/lan937x_main.c
> @@ -324,6 +324,11 @@ void lan937x_phylink_get_caps(struct ksz_device
> *dev, int port,
> /* MII/RMII/RGMII ports */
> config->mac_capabilities |= MAC_ASYM_PAUSE |
> MAC_SYM_PAUSE |
> MAC_100HD | MAC_10 |
> MAC_1000FD;
> + } else if ((dev->info->chip_id == LAN9371_CHIP_ID ||
> + dev->info->chip_id == LAN9372_CHIP_ID) &&
> + port == KSZ_PORT_4) {
nitpick:
If you are going to add many features regarding this Tx Phy, then it
would be good to have wrapper function to find out whether it is Tx phy
and set the capabilities accordingly like (bool is_lan937x_tx_phy( int
chipid, int port))
Already you added the same snippet for lan937x_vphy_ind_addr_wr( ).
> + config->mac_capabilities |= MAC_ASYM_PAUSE |
> MAC_SYM_PAUSE |
> + MAC_100HD | MAC_10;
> }
> }
>
> --
> 2.39.2
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-07-05 2:38 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-07-04 14:13 [PATCH net-next v1 1/1] net: dsa: microchip: lan9371/2: update MAC capabilities for port 4 Oleksij Rempel
2024-07-04 14:21 ` Florian Fainelli
2024-07-05 2:38 ` Arun.Ramadoss
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®