mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Oleksij Rempel <o.rempel@pengutronix.de>
To: Florian Fainelli <f.fainelli@gmail.com>
Cc: Woojung Huh <woojung.huh@microchip.com>,
	UNGLinuxDriver@microchip.com, Andrew Lunn <andrew@lunn.ch>,
	Vivien Didelot <vivien.didelot@gmail.com>,
	Vladimir Oltean <olteanv@gmail.com>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Arun Ramadoss <arun.ramadoss@microchip.com>,
	kernel@pengutronix.de, linux-kernel@vger.kernel.org,
	netdev@vger.kernel.org
Subject: Re: [PATCH net-next v4 1/4] net: dsa: microchip: move max mtu to one location
Date: Fri, 11 Nov 2022 06:26:56 +0100	[thread overview]
Message-ID: <20221111052656.GC27099@pengutronix.de> (raw)
In-Reply-To: <53bd4c46-17f9-91c1-fda5-bd2d09ae2ff7@gmail.com>

Hi Florian,

On Thu, Nov 10, 2022 at 06:42:03AM -0800, Florian Fainelli wrote:
> 
> 
> On 11/10/2022 4:22 AM, Oleksij Rempel wrote:
> > There are no HW specific registers, so we can process all of them
> > in one location.
> > 
> > Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
> > Tested-by: Arun Ramadoss <arun.ramadoss@microchip.com> (KSZ9893 and LAN937x)
> 
> This looks good to me, just one nit see below
> 
> [snip]
> 
> > @@ -2500,10 +2499,23 @@ static int ksz_max_mtu(struct dsa_switch *ds, int port)
> >   {
> >   	struct ksz_device *dev = ds->priv;
> > -	if (!dev->dev_ops->max_mtu)
> > -		return -EOPNOTSUPP;
> > +	switch (dev->chip_id) {
> > +	case KSZ8563_CHIP_ID:
> > +	case KSZ9477_CHIP_ID:
> > +	case KSZ9563_CHIP_ID:
> > +	case KSZ9567_CHIP_ID:
> > +	case KSZ9893_CHIP_ID:
> > +	case KSZ9896_CHIP_ID:
> > +	case KSZ9897_CHIP_ID:
> > +	case LAN9370_CHIP_ID:
> > +	case LAN9371_CHIP_ID:
> > +	case LAN9372_CHIP_ID:
> > +	case LAN9373_CHIP_ID:
> > +	case LAN9374_CHIP_ID:
> > +		return KSZ9477_MAX_FRAME_SIZE - VLAN_ETH_HLEN - ETH_FCS_LEN;
> 
> Rename to KSZ_MAX_FRAME_SIZE to denote this is a common constant?

This is not so common. This list is extended by the patch 4, with two
more types of switches with different max frame size.

Regards,
Oleksij
-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

  reply	other threads:[~2022-11-11  5:27 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-10 12:22 [PATCH net-next v4 0/4] net: dsa: microchip: add MTU support for KSZ8 series Oleksij Rempel
2022-11-10 12:22 ` [PATCH net-next v4 1/4] net: dsa: microchip: move max mtu to one location Oleksij Rempel
2022-11-10 14:42   ` Florian Fainelli
2022-11-11  5:26     ` Oleksij Rempel [this message]
2022-11-10 12:22 ` [PATCH net-next v4 2/4] net: dsa: microchip: do not store max MTU for all ports Oleksij Rempel
2022-11-10 13:04   ` Vladimir Oltean
2022-11-10 14:42   ` Florian Fainelli
2022-11-10 12:22 ` [PATCH net-next v4 3/4] net: dsa: microchip: add ksz_rmw8() function Oleksij Rempel
2022-11-10 14:42   ` Florian Fainelli
2022-11-10 12:22 ` [PATCH net-next v4 4/4] net: dsa: microchip: ksz8: add MTU configuration support Oleksij Rempel
2022-11-10 13:03   ` Vladimir Oltean
2022-11-11  5:29     ` Oleksij Rempel
2022-11-10 14:43   ` Florian Fainelli

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=20221111052656.GC27099@pengutronix.de \
    --to=o.rempel@pengutronix.de \
    --cc=UNGLinuxDriver@microchip.com \
    --cc=andrew@lunn.ch \
    --cc=arun.ramadoss@microchip.com \
    --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=olteanv@gmail.com \
    --cc=pabeni@redhat.com \
    --cc=vivien.didelot@gmail.com \
    --cc=woojung.huh@microchip.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®