public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: "Russell King (Oracle)" <linux@armlinux•org.uk>
To: Florian Fainelli <f.fainelli@gmail•com>
Cc: Andrew Lunn <andrew@lunn•ch>,
	Vivien Didelot <vivien.didelot@gmail•com>,
	Vladimir Oltean <olteanv@gmail•com>,
	"David S. Miller" <davem@davemloft•net>,
	Jakub Kicinski <kuba@kernel•org>, Paolo Abeni <pabeni@redhat•com>,
	netdev@vger•kernel.org
Subject: Re: [PATCH RFC net-next] net: dsa: b53: convert to phylink_pcs
Date: Fri, 8 Apr 2022 09:30:02 +0100	[thread overview]
Message-ID: <Yk/yiv36t6QrhHBk@shell.armlinux.org.uk> (raw)
In-Reply-To: <f60b3515-d1a5-a5a8-9a3f-4cb82cd0a586@gmail.com>

On Thu, Apr 07, 2022 at 03:55:35PM -0700, Florian Fainelli wrote:
> On 4/6/22 08:06, Russell King (Oracle) wrote:
> > Convert B53 to use phylink_pcs for the serdes rather than hooking it
> > into the MAC-layer callbacks.
> > 
> > Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux•org.uk>
> > ---
> > Hi Florian,
> > 
> > Please can you test this patch? Thanks.
> 
> Did not spend much time debugging this as I had to do something else but
> here is what I got:
> 
> [    1.909223] b53-srab-switch 18036000.ethernet-switch: SerDes lane 0,
> model: 1, rev B0 (OUI: 0x0143bff0)
> [    1.918956] 8<--- cut here ---
> [    1.922119] Unable to handle kernel NULL pointer dereference at virtual
> address 0000012c

Thanks - it looks like the problem is dev->port has not been allocated
at the point where b53_serdes_init is called, causing this null pointer
deref. It's allocated in b53_switch_register(), which is also where the
driver works out how many ports there are.

I don't see an easy way to allocate this array earlier... so, where can
we save a pointer to the PCS. I guess as this is specific to srab, we
could put it in struct b53_srab_port_priv - but then we'll need
b53_phylink_mac_select_pcs() to call into the e.g. the srab layer.

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!

      reply	other threads:[~2022-04-08  8:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-06 15:06 [PATCH RFC net-next] net: dsa: b53: convert to phylink_pcs Russell King (Oracle)
2022-04-07 22:55 ` Florian Fainelli
2022-04-08  8:30   ` Russell King (Oracle) [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=Yk/yiv36t6QrhHBk@shell.armlinux.org.uk \
    --to=linux@armlinux$(echo .)org.uk \
    --cc=andrew@lunn$(echo .)ch \
    --cc=davem@davemloft$(echo .)net \
    --cc=f.fainelli@gmail$(echo .)com \
    --cc=kuba@kernel$(echo .)org \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=olteanv@gmail$(echo .)com \
    --cc=pabeni@redhat$(echo .)com \
    --cc=vivien.didelot@gmail$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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