netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: <Rakesh.Sankaranarayanan@microchip.com>
To: <andrew@lunn.ch>
Cc: <olteanv@gmail.com>, <davem@davemloft.net>,
	<linux@armlinux.org.uk>, <Woojung.Huh@microchip.com>,
	<linux-kernel@vger.kernel.org>, <pabeni@redhat.com>,
	<kuba@kernel.org>, <edumazet@google.com>,
	<netdev@vger.kernel.org>, <UNGLinuxDriver@microchip.com>,
	<f.fainelli@gmail.com>
Subject: Re: [RFC PATCH net-next 07/11] net: dsa: microchip: lan937x: update switch register
Date: Fri, 3 Feb 2023 10:48:02 +0000	[thread overview]
Message-ID: <2d6f98b01fdce3247b8f93f0467e7f1cdb6e080e.camel@microchip.com> (raw)
In-Reply-To: <Y9vZdMQgqhaGIcdf@lunn.ch>

Hi Andrew,

Thanks for the comment, I will change and test the code as you
explained and update the patch in next revision.

Thanks,
Rakesh S.

On Thu, 2023-02-02 at 16:40 +0100, Andrew Lunn wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you
> know the content is safe
> 
> On Thu, Feb 02, 2023 at 06:29:26PM +0530, Rakesh Sankaranarayanan
> wrote:
> > Second switch in cascaded connection doesn't have port with macb
> > interface. dsa_switch_register returns error if macb interface is
> > not up. Due to this reason, second switch in cascaded connection
> > will
> > not report error during dsa_switch_register and mib thread work
> > will be
> > invoked even if actual switch register is not done. This will lead
> > to
> > kernel warning and it can be avoided by checking device tree setup
> > status. This will return true only after actual switch register is
> > done.
> 
> What i think you need to do is move the code into ksz_setup().
> 
> With a D in DSA setup, dsa_switch_register() adds the switch to the
> list of switches, and then a check is performed to see if all
> switches
> in the cluster have been registered. If not, it just returns. If all
> switches have been registered, it then iterates over all the switches
> can calls dsa_switch_ops.setup().
> 
> By moving the start of the MIB counter into setup(), it will only be
> started once all the switches are present, and it means you don't
> need
> to look at DSA core internal state.
> 
>         Andrew


  reply	other threads:[~2023-02-03 10:48 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-02 12:59 [RFC PATCH net-next 00/11] net: dsa: microchip: lan937x: add switch cascade support Rakesh Sankaranarayanan
2023-02-02 12:59 ` [RFC PATCH net-next 01/11] net: dsa: microchip: lan937x: add cascade tailtag Rakesh Sankaranarayanan
2023-02-03 23:10   ` Vladimir Oltean
2023-02-02 12:59 ` [RFC PATCH net-next 02/11] net: dsa: microchip: lan937x: update SMI index Rakesh Sankaranarayanan
2023-02-03 23:18   ` Vladimir Oltean
2023-02-02 12:59 ` [RFC PATCH net-next 03/11] net: dsa: microchip: lan937x: enable cascade port Rakesh Sankaranarayanan
2023-02-03 23:24   ` Vladimir Oltean
2023-02-02 12:59 ` [RFC PATCH net-next 04/11] net: dsa: microchip: lan937x: update port number for LAN9373 Rakesh Sankaranarayanan
2023-02-02 15:19   ` Andrew Lunn
2023-02-03 10:43     ` Rakesh.Sankaranarayanan
2023-02-03 23:26       ` Vladimir Oltean
2023-02-06 14:38         ` Arun.Ramadoss
2023-02-02 12:59 ` [RFC PATCH net-next 05/11] net: dsa: microchip: lan937x: add shared global interrupt Rakesh Sankaranarayanan
2023-02-02 15:25   ` Andrew Lunn
2023-02-02 12:59 ` [RFC PATCH net-next 06/11] net: dsa: microchip: lan937x: get cascade tag protocol Rakesh Sankaranarayanan
2023-02-03 23:30   ` Vladimir Oltean
2023-02-02 12:59 ` [RFC PATCH net-next 07/11] net: dsa: microchip: lan937x: update switch register Rakesh Sankaranarayanan
2023-02-02 15:40   ` Andrew Lunn
2023-02-03 10:48     ` Rakesh.Sankaranarayanan [this message]
2023-02-03 23:37     ` Vladimir Oltean
2023-02-02 12:59 ` [RFC PATCH net-next 08/11] net: dsa: microchip: lan937x: avoid mib read for cascaded port Rakesh Sankaranarayanan
2023-02-02 15:45   ` Andrew Lunn
2023-02-02 12:59 ` [RFC PATCH net-next 09/11] net: dsa: microchip: lan937x: update port membership with dsa port Rakesh Sankaranarayanan
2023-02-03 23:47   ` Vladimir Oltean
2023-02-02 12:59 ` [RFC PATCH net-next 10/11] net: dsa: microchip: lan937x: update vlan untag membership Rakesh Sankaranarayanan
2023-02-03 23:48   ` Vladimir Oltean
2023-02-02 12:59 ` [RFC PATCH net-next 11/11] net: dsa: microchip: lan937x: update multicast table Rakesh Sankaranarayanan

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=2d6f98b01fdce3247b8f93f0467e7f1cdb6e080e.camel@microchip.com \
    --to=rakesh.sankaranarayanan@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=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=netdev@vger.kernel.org \
    --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;
as well as URLs for NNTP newsgroup(s).