Thread (21 messages) flat view 21 messages, 3 authors, 2021-03-26

Re: [PATCH net-next v2 11/12] net: phy: marvell10g: print exact model

From: Marek Behún <kabel@kernel.org>
Date: 2021-03-25 16:57:37

On Thu, 25 Mar 2021 15:54:52 +0000
Russell King - ARM Linux admin [off-list ref] wrote:
On Thu, Mar 25, 2021 at 02:12:49PM +0100, Marek Behún wrote:
quoted
@@ -443,12 +446,24 @@ static int mv3310_probe(struct phy_device *phydev)
 
 	switch (phydev->drv->phy_id) {
 	case MARVELL_PHY_ID_88X3310:
+		ret = phy_read_mmd(phydev, MDIO_MMD_PMAPMD, MV_PMA_XGSTAT);
+		if (ret < 0)
+			return ret;
+
+		has_macsec = !(ret & MV_PMA_XGSTAT_NO_MACSEC);
+
 		if (nports == 4)
 			priv->model = MV_MODEL_88X3340;
 		else if (nports == 1)
 			priv->model = MV_MODEL_88X3310;
 		break;  
The 88X3310 and 88X3340 can be differentiated by bit 3 in the revision.
In other words, 88X3310 is 0x09a0..0x09a7, and 88X3340 is
0x09a8..0x09af. We could add a separate driver structure, which would
then allow the kernel to print a more specific string via standard
methods, like we do for other PHYs. Not sure whether that would work
for the 88X21x0 family though.
OK I will look into this. What are your thoughts on the other patches?

Marek
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help