summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2020-06-20 06:17:15 +0300
committerDavid S. Miller <davem@davemloft.net>2020-06-20 06:17:15 +0300
commit1075a4744a32628b6744a616d5d9b3e7df261d35 (patch)
tree5158362df1f7e86d8478deeca913d56f04021ab1 /include
parente034c6d23bc43266af1fa983212218f4aa38f995 (diff)
parent389a338999875b6e7b111096e8b6484434556449 (diff)
downloadlinux-1075a4744a32628b6744a616d5d9b3e7df261d35.tar.xz
Merge branch 'Clause-45-PHY-probing-improvements'
Russell King says: ==================== Clause 45 PHY probing improvements Last time this series was posted back in May, Florian reviewed the patches, which was the only feedback I received. I'm now posting them without the RFC tag. This series aims to improve the probing for Clause 45 PHYs. The first four patches clean up get_phy_device() and called functions, updating the kernel doc, adding information about the various error return values. We then provide better kerneldoc for get_phy_device(), describing what is going on, and more importantly what the various return codes mean. Patch 6 adds support for probing MMDs >= 8 to check for their presence. Patch 7 changes get_phy_c45_ids() to only set the returned devices_in_package if we successfully find a PHY. Patch 8 splits the use of "devices in package" from the "mmds present". Patch 9 expands our ID reading to cover the other MMDs. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r--include/linux/phy.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/include/linux/phy.h b/include/linux/phy.h
index 8c05d0fb5c00..9248dd2ce4ca 100644
--- a/include/linux/phy.h
+++ b/include/linux/phy.h
@@ -388,14 +388,18 @@ enum phy_state {
PHY_CABLETEST,
};
+#define MDIO_MMD_NUM 32
+
/**
* struct phy_c45_device_ids - 802.3-c45 Device Identifiers
- * @devices_in_package: Bit vector of devices present.
+ * @devices_in_package: IEEE 802.3 devices in package register value.
+ * @mmds_present: bit vector of MMDs present.
* @device_ids: The device identifer for each present device.
*/
struct phy_c45_device_ids {
u32 devices_in_package;
- u32 device_ids[8];
+ u32 mmds_present;
+ u32 device_ids[MDIO_MMD_NUM];
};
struct macsec_context;