Netdev List
 help / color / mirror / Atom feed
From: Vladimir Oltean <olteanv@gmail.com>
To: Daniel Danzberger <dd@embedd.com>
Cc: woojung.huh@microchip.com, UNGLinuxDriver@microchip.com,
	netdev@vger.kernel.org, Andrew Lunn <andrew@lunn.ch>,
	Florian Fainelli <f.fainelli@gmail.com>
Subject: Re: [PATCH] net: dsa: microchip: fix NULL pointer dereference on platform init
Date: Tue, 5 Dec 2023 20:17:35 +0200	[thread overview]
Message-ID: <20231205181735.csbtkcy3g256kwxl@skbuf> (raw)
In-Reply-To: <e37d2c6678f33b490e8ab56cd1472429ca3dcc7a.camel@embedd.com>

On Tue, Dec 05, 2023 at 06:33:18PM +0100, Daniel Danzberger wrote:
> On Tue, 2023-12-05 at 18:55 +0200, Vladimir Oltean wrote:
> > On Tue, Dec 05, 2023 at 09:00:39AM +0100, Daniel Danzberger wrote:
> > > > Is this all that's necessary for instantiating the ksz driver through
> > > > ds->dev->platform_data? I suppose not, so can you post it all, please?
> > > Yes, that NULL pointer was the only issue I encountered.
> > 
> > I was just thinking, the KSZ9477 has internal PHYs on ports 0-4, and an
> > internal MDIO bus registered in ksz_mdio_register(). The bus registration
> > won't work without OF, since it returns early when not finding
> > of_get_child_by_name(dev->dev->of_node, "mdio").
> Interesting, I did not notice that.
> After the NULL pointer issue was fixed the switch just worked.
> > 
> > Don't you need the internal PHY ports to work?
> For now the switch seems to run just fine, with port 0 being the CPU port and 1-4 being used as
> regular switch ports.
> I will do some more testing this week however...

What does "regular switch ports" mean? L2 forwarding between them?
Could you give us an "ip addr" output?

> 
> And probably checkout some DTS files that use that switch to see what other options I might need
> when going the platform_data path.

The platform_data code path has reduced functionality, at some point you
will get some pushback to help kickstart the software node conversion.

  reply	other threads:[~2023-12-05 18:17 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-04 15:43 [PATCH] net: dsa: microchip: fix NULL pointer dereference on platform init Daniel Danzberger
2023-12-04 17:43 ` Vladimir Oltean
2023-12-05  8:00   ` Daniel Danzberger
2023-12-05  8:36     ` Vladimir Oltean
2023-12-05  9:08       ` Daniel Danzberger
2023-12-05  9:39         ` Vladimir Oltean
2023-12-05 16:55     ` Vladimir Oltean
2023-12-05 17:33       ` Daniel Danzberger
2023-12-05 18:17         ` Vladimir Oltean [this message]
2023-12-05 22:15           ` Daniel Danzberger
2023-12-06  0:37             ` Vladimir Oltean
2023-12-06 15:26               ` Andrew Lunn
2023-12-06 21:49                 ` Vladimir Oltean
2023-12-05 10:12 ` Vladimir Oltean
2023-12-05 11:44   ` Daniel Danzberger
2023-12-05 12:04     ` Vladimir Oltean
2023-12-05 12:42       ` Vladimir Oltean

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=20231205181735.csbtkcy3g256kwxl@skbuf \
    --to=olteanv@gmail.com \
    --cc=UNGLinuxDriver@microchip.com \
    --cc=andrew@lunn.ch \
    --cc=dd@embedd.com \
    --cc=f.fainelli@gmail.com \
    --cc=netdev@vger.kernel.org \
    --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