[v3,3/3,net-next] net: phy: add constant for "Clause 22 registers present" flags in device list bitmap

Message ID 697e2fa2-1e2e-61aa-9f2b-b6d3b6d218df@gmail.com
State Changes Requested
Delegated to: David Miller
Headers show
Series
  • net: phy: disregard "Clause 22 registers present" bit in get_phy_c45_devs_in_pkg
Related show

Commit Message

Heiner Kallweit Feb. 8, 2019, 7:22 p.m.
Bit 0 ("Clause 22 registers present") is a flag and doesn't represent
a device, therefore don't define a MDIO_MMD_XYZ constant, just define
a MDIO_DEVS_XYZ constant for the flag in the device list bitmap.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
---
 include/uapi/linux/mdio.h | 1 +
 1 file changed, 1 insertion(+)

Comments

Andrew Lunn Feb. 8, 2019, 8:20 p.m. | #1
On Fri, Feb 08, 2019 at 08:22:17PM +0100, Heiner Kallweit wrote:
> Bit 0 ("Clause 22 registers present") is a flag and doesn't represent
> a device, therefore don't define a MDIO_MMD_XYZ constant, just define
> a MDIO_DEVS_XYZ constant for the flag in the device list bitmap.
> 
> Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>

Reviewed-by: Andrew Lunn <andrew@lunn.ch>

    Andrew

Patch

diff --git a/include/uapi/linux/mdio.h b/include/uapi/linux/mdio.h
index 2e6e309f0..0e012b168 100644
--- a/include/uapi/linux/mdio.h
+++ b/include/uapi/linux/mdio.h
@@ -115,6 +115,7 @@ 
 
 /* Device present registers. */
 #define MDIO_DEVS_PRESENT(devad)	(1 << (devad))
+#define MDIO_DEVS_C22PRESENT		MDIO_DEVS_PRESENT(0)
 #define MDIO_DEVS_PMAPMD		MDIO_DEVS_PRESENT(MDIO_MMD_PMAPMD)
 #define MDIO_DEVS_WIS			MDIO_DEVS_PRESENT(MDIO_MMD_WIS)
 #define MDIO_DEVS_PCS			MDIO_DEVS_PRESENT(MDIO_MMD_PCS)