All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Russell King (Oracle)" <linux@armlinux.org.uk>
To: Andrew Lunn <andrew@lunn.ch>
Cc: Charles Perry <charles.perry@microchip.com>,
	netdev@vger.kernel.org, Heiner Kallweit <hkallweit1@gmail.com>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next v4 3/3] net: phy: add a PHY write barrier when disabling interrupts
Date: Thu, 2 Apr 2026 19:03:42 +0100	[thread overview]
Message-ID: <ac6vfhsW2ThF8i2_@shell.armlinux.org.uk> (raw)
In-Reply-To: <6bb3aec4-1635-4287-b7ce-f15b693563ea@lunn.ch>

On Thu, Apr 02, 2026 at 03:31:52PM +0200, Andrew Lunn wrote:
> > +static int phy_write_barrier(struct phy_device *phydev)
> > +{
> > +	int err;
> > +
> > +	err = phy_read(phydev, MII_PHYSID1);
> > +	if (err < 0)
> > +		return err;
> 
> There are a small number of MDIO busses which don't implement C22,
> only C45. You are likely to get -EIO or maybe ENODEV, -EOPNOTSUPP,
> -EINVAL for such a read. Returning the error than makes
> phy_disable_interrupts() fail, etc.

If it returns -EOPNOTSUPP (meaning, at least, that bus->read is not
implemented), do we want to issue a C45 read instead?

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

  parent reply	other threads:[~2026-04-02 18:03 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-02 13:12 [PATCH net-next v4 0/3] Add support for PIC64-HPSC/HX MDIO controller Charles Perry
2026-04-02 13:12 ` [PATCH net-next v4 1/3] dt-bindings: net: document Microchip " Charles Perry
2026-04-02 13:12 ` [PATCH net-next v4 2/3] net: mdio: add a driver for " Charles Perry
2026-04-02 13:12 ` [PATCH net-next v4 3/3] net: phy: add a PHY write barrier when disabling interrupts Charles Perry
2026-04-02 13:31   ` Andrew Lunn
2026-04-02 17:51     ` Charles Perry
2026-04-02 18:03     ` Russell King (Oracle) [this message]
2026-04-02 18:09       ` Andrew Lunn
2026-04-07 16:19         ` Charles Perry
2026-04-07 16:59           ` Andrew Lunn
2026-04-07 17:59             ` Charles Perry

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=ac6vfhsW2ThF8i2_@shell.armlinux.org.uk \
    --to=linux@armlinux.org.uk \
    --cc=andrew@lunn.ch \
    --cc=charles.perry@microchip.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=hkallweit1@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --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 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.