[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20191118.165826.1141859219100186291.davem@davemloft.net>
Date: Mon, 18 Nov 2019 16:58:26 -0800 (PST)
From: David Miller <davem@...emloft.net>
To: rmk+kernel@...linux.org.uk
Cc: andrew@...n.ch, f.fainelli@...il.com, hkallweit1@...il.com,
netdev@...r.kernel.org
Subject: Re: [PATCH net-next] net: phy: avoid matching all-ones clause 45
PHY IDs
From: Russell King <rmk+kernel@...linux.org.uk>
Date: Fri, 15 Nov 2019 20:08:37 +0000
> We currently match clause 45 PHYs using any ID read from a MMD marked
> as present in the "Devices in package" registers 5 and 6. However,
> this is incorrect. 45.2 says:
>
> "The definition of the term package is vendor specific and could be
> a chip, module, or other similar entity."
>
> so a package could be more or less than the whole PHY - a PHY could be
> made up of several modules instantiated onto a single chip such as the
> Marvell 88x3310, or some of the MMDs could be disabled according to
> chip configuration, such as the Broadcom 84881.
>
> In the case of Broadcom 84881, the "Devices in package" registers
> contain 0xc000009b, meaning that there is a PHYXS present in the
> package, but all registers in MMD 4 return 0xffff. This leads to our
> matching code incorrectly binding this PHY to one of our generic PHY
> drivers.
>
> This patch changes the way we determine whether to attempt to match a
> MMD identifier, or use it to request a module - if the identifier is
> all-ones, then we skip over it. When reading the identifiers, we
> initialise phydev->c45_ids.device_ids to all-ones, only reading the
> device ID if the "Devices in package" registers indicates we should.
>
> This avoids the generic drivers incorrectly matching on a PHY ID of
> 0xffffffff.
>
> Signed-off-by: Russell King <rmk+kernel@...linux.org.uk>
Applied, thanks.
Powered by blists - more mailing lists