All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Lars-Peter Clausen <lars@metafoo.de>
Cc: Pierluigi Passaro <pierluigi.passaro@gmail.com>,
	hkallweit1@gmail.com, linux@armlinux.org.uk, davem@davemloft.net,
	edumazet@google.com, kuba@kernel.org, pabeni@redhat.com,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	eran.m@variscite.com, nate.d@variscite.com,
	francesco.f@variscite.com, pierluigi.p@variscite.com
Subject: Re: [PATCH] net: mdio: force deassert MDIO reset signal
Date: Tue, 17 Jan 2023 15:13:30 +0100	[thread overview]
Message-ID: <Y8atCtZdV96cj3n1@lunn.ch> (raw)
In-Reply-To: <54eb0ee4-7d9e-7025-f984-b1e026c18c3d@metafoo.de>

> > > I think part of the problem is that for C45 there are a few other fields
> > > that get populated by the ID detection, such as devices_in_package and
> > > mmds_present. Is this something we can do after running the PHY drivers
> > > probe function? Or is it too late at that point?
> > As i hinted, it needs somebody to actually debug this and figure out
> > why it does not work.
> > 
> > I think what i did above is part of the solution. You need to actually
> > read the ID from the DT, which if you never call fwnode_get_phy_id()
> > you never do.
> > 
> > You then need to look at phy_bus_match() and probably remove the
> > 
> > 		return 0;
> > 	} else {
> > 
> > so that C22 style ID matching is performed if matching via
> > c45_ids.device_ids fails.
> 
> Sorry, I've should have been more clear. I did try your proposed change a
> while ago. The problem why it does not work is that there are other fields
> in the phy data structure that get initialized when reading the IDs for C45.
> Such as which MMD addresses are valid.

So lets take this one step at a time.

Does this change at least get the driver loaded?

There is some code in phy-c45.c which needs
phydev->c45_ids.mmds_present. So maybe after the driver has probed,
and the device should be accessible, we need to call get_phy_c45_ids()
to fill in the missing IDs?

   Andrew

  reply	other threads:[~2023-01-17 14:14 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-15 16:10 [PATCH] net: mdio: force deassert MDIO reset signal Pierluigi Passaro
2023-01-15 17:08 ` Andrew Lunn
2023-01-15 18:38   ` Pierluigi Passaro
2023-01-15 19:02     ` Andrew Lunn
2023-01-15 20:34       ` Pierluigi Passaro
2023-01-15 21:58   ` Lars-Peter Clausen
2023-01-15 22:33     ` Pierluigi Passaro
2023-01-15 22:56       ` Lars-Peter Clausen
2023-01-15 23:16         ` Pierluigi Passaro
2023-01-16  0:11       ` Andrew Lunn
2023-01-16  9:44         ` Pierluigi Passaro
2023-01-16 10:21           ` Russell King (Oracle)
2023-01-17 14:01           ` Andrew Lunn
2023-01-17 15:20             ` Pierluigi Passaro
2023-01-15 23:55     ` Andrew Lunn
2023-01-16  2:21       ` Lars-Peter Clausen
2023-01-16  9:51         ` Pierluigi Passaro
2023-01-17 13:40         ` Andrew Lunn
2023-01-17 13:48           ` Lars-Peter Clausen
2023-01-17 14:13             ` Andrew Lunn [this message]
2023-01-16  8:39       ` Pierluigi Passaro
2023-01-17 13:43         ` Andrew Lunn
2023-01-16  8:43 ` kernel test robot
2023-01-16 10:32   ` Pierluigi Passaro
2023-01-16 10:34     ` Russell King (Oracle)
2023-01-16 14:35   ` Pierluigi Passaro
2023-01-17 19:25 kernel test robot
2023-01-17 20:30 ` Dan Carpenter

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=Y8atCtZdV96cj3n1@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=eran.m@variscite.com \
    --cc=francesco.f@variscite.com \
    --cc=hkallweit1@gmail.com \
    --cc=kuba@kernel.org \
    --cc=lars@metafoo.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=nate.d@variscite.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=pierluigi.p@variscite.com \
    --cc=pierluigi.passaro@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.