diff options
author | Ben Hutchings <bhutchings@solarflare.com> | 2009-02-27 08:07:15 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-03-02 06:15:04 -0500 |
commit | 3f39a5e9bff000025c2679101b4f83e4fc21dbba (patch) | |
tree | b5a9632720383e3309e170da6c38f6468dbfd5ee /drivers/net/sfc/mdio_10g.h | |
parent | f794fd440066ccd7d601f405f80aa514b95f15d1 (diff) |
sfc: Fix reporting of PHY id
Shuffle bits of the OUI into the conventional written order.
Replace PHY id component macros with functions.
Zero-pad PHY id components in log messages.
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/sfc/mdio_10g.h')
-rw-r--r-- | drivers/net/sfc/mdio_10g.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/sfc/mdio_10g.h b/drivers/net/sfc/mdio_10g.h index 8ba49773ce7e..7014d2279c20 100644 --- a/drivers/net/sfc/mdio_10g.h +++ b/drivers/net/sfc/mdio_10g.h | |||
@@ -70,10 +70,10 @@ | |||
70 | #define MDIO_MMDREG_STAT1_LPABLE_LBN (1) | 70 | #define MDIO_MMDREG_STAT1_LPABLE_LBN (1) |
71 | #define MDIO_MMDREG_STAT1_LPABLE_WIDTH (1) | 71 | #define MDIO_MMDREG_STAT1_LPABLE_WIDTH (1) |
72 | 72 | ||
73 | /* Bits in ID reg */ | 73 | /* Bits in combined ID regs */ |
74 | #define MDIO_ID_REV(_id32) (_id32 & 0xf) | 74 | static inline unsigned mdio_id_rev(u32 id) { return id & 0xf; } |
75 | #define MDIO_ID_MODEL(_id32) ((_id32 >> 4) & 0x3f) | 75 | static inline unsigned mdio_id_model(u32 id) { return (id >> 4) & 0x3f; } |
76 | #define MDIO_ID_OUI(_id32) (_id32 >> 10) | 76 | extern unsigned mdio_id_oui(u32 id); |
77 | 77 | ||
78 | /* Bits in MMDREG_DEVS0/1. Someone thoughtfully layed things out | 78 | /* Bits in MMDREG_DEVS0/1. Someone thoughtfully layed things out |
79 | * so the 'bit present' bit number of an MMD is the number of | 79 | * so the 'bit present' bit number of an MMD is the number of |