Thread (7 messages) flat view 7 messages, 2 authors, 2021-10-27

Re: [PATCH net-next] net: phy: microchip_t1: add cable test support for lan87xx phy

From: Andrew Lunn <andrew@lunn.ch>
Date: 2021-10-27 14:46:40

quoted
quoted
+     /* start cable diag */
+     /* check if part is alive - if not, return diagnostic error */
+     rc = access_ereg(phydev, PHYACC_ATTR_MODE_READ,
PHYACC_ATTR_BANK_SMI,
quoted
+                      0x00, 0);
+     if (rc < 0)
+             return rc;
+
+     if (rc != 0x2100)
+             return -ENODEV;
What does this actually mean? Would -EOPNOTSUPP be better?
This register should return the value of 0x2100. So if the return value is different, then I assume there is no device.
If the device does not exist, can we have go this far? Would probe of
the PHY failed? Or are you talking about a device within a device? Is
cable test implemented using an optional component?

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