Netdev List
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Vladimir Oltean <vladimir.oltean@nxp.com>
Cc: netdev@vger.kernel.org, "Russell King" <linux@armlinux.org.uk>,
	"Marek Behún" <kabel@kernel.org>,
	"Heiner Kallweit" <hkallweit1@gmail.com>
Subject: Re: [PATCH net] net: phy: marvell10g: fix broken PHY interrupts for anyone after us in the driver probe list
Date: Fri, 27 Aug 2021 03:49:55 +0200	[thread overview]
Message-ID: <YShEw9v55NZdUYQE@lunn.ch> (raw)
In-Reply-To: <20210827001513.1756306-1-vladimir.oltean@nxp.com>

Thanks for the detailed description.

> (also, a bit frightening that drivers are permitted to bypass the MDIO
> bus matching in such a trivial way and perform PHY reads and writes from
> the .match_phy_device method, on devices that do not even belong to
> them.

Yes, but i don't think we can block it. We might want to extend the
comment a bit:

        /**
         * @match_phy_device: Returns true if this is a suitable
         * driver for the given phydev.  If NULL, matching is based on
         * phy_id and phy_id_mask.
         */
        int (*match_phy_device)(struct phy_device *phydev);

I guess we got into this situation because it was assumed that phy_id
and phy_id_mask matched and now we can refine it down further between
two devices which have identical IDs. Which is wrong.

    Andrew

      parent reply	other threads:[~2021-08-27  1:49 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-27  0:15 [PATCH net] net: phy: marvell10g: fix broken PHY interrupts for anyone after us in the driver probe list Vladimir Oltean
2021-08-27  1:32 ` Marek Behún
2021-08-27  1:42   ` Andrew Lunn
2021-08-27 15:33   ` Vladimir Oltean
2021-08-27  1:49 ` Andrew Lunn [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=YShEw9v55NZdUYQE@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=hkallweit1@gmail.com \
    --cc=kabel@kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=netdev@vger.kernel.org \
    --cc=vladimir.oltean@nxp.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