mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: <Arun.Ramadoss@microchip.com>
To: <andrew@lunn.ch>, <olteanv@gmail.com>, <davem@davemloft.net>,
	<Woojung.Huh@microchip.com>, <pabeni@redhat.com>,
	<o.rempel@pengutronix.de>, <edumazet@google.com>,
	<f.fainelli@gmail.com>, <kuba@kernel.org>
Cc: <kernel@pengutronix.de>, <linux-kernel@vger.kernel.org>,
	<netdev@vger.kernel.org>, <UNGLinuxDriver@microchip.com>
Subject: Re: [PATCH net-next v1 1/1] net: dsa: microchip: lan9371/2: update MAC capabilities for port 4
Date: Fri, 5 Jul 2024 02:38:30 +0000	[thread overview]
Message-ID: <caff641db601d068ceff25b5ab9b54b044a1f8b3.camel@microchip.com> (raw)
In-Reply-To: <20240704141348.3947232-1-o.rempel@pengutronix.de>

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
> 

      parent reply	other threads:[~2024-07-05  2:38 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-04 14:13 Oleksij Rempel
2024-07-04 14:21 ` Florian Fainelli
2024-07-05  2:38 ` Arun.Ramadoss [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=caff641db601d068ceff25b5ab9b54b044a1f8b3.camel@microchip.com \
    --to=arun.ramadoss@microchip.com \
    --cc=UNGLinuxDriver@microchip.com \
    --cc=Woojung.Huh@microchip.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=f.fainelli@gmail.com \
    --cc=kernel@pengutronix.de \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=o.rempel@pengutronix.de \
    --cc=olteanv@gmail.com \
    --cc=pabeni@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®