[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <caff641db601d068ceff25b5ab9b54b044a1f8b3.camel@microchip.com>
Date: Fri, 5 Jul 2024 02:38:30 +0000
From: <Arun.Ramadoss@...rochip.com>
To: <andrew@...n.ch>, <olteanv@...il.com>, <davem@...emloft.net>,
<Woojung.Huh@...rochip.com>, <pabeni@...hat.com>, <o.rempel@...gutronix.de>,
<edumazet@...gle.com>, <f.fainelli@...il.com>, <kuba@...nel.org>
CC: <kernel@...gutronix.de>, <linux-kernel@...r.kernel.org>,
<netdev@...r.kernel.org>, <UNGLinuxDriver@...rochip.com>
Subject: Re: [PATCH net-next v1 1/1] net: dsa: microchip: lan9371/2: update
MAC capabilities for port 4
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@...gutronix.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
>
Powered by blists - more mailing lists