aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/sfc/xenpack.h
diff options
context:
space:
mode:
authorBen Hutchings <bhutchings@solarflare.com>2009-04-29 04:05:08 -0400
committerDavid S. Miller <davem@davemloft.net>2009-04-29 20:32:30 -0400
commit68e7f45e118f98b77cfa007aa2d97b5dac69fe6b (patch)
treed2e05579a0fc1f5a28bce8ff09ac6863d1907186 /drivers/net/sfc/xenpack.h
parent1b1c2e95103ce391c2ea39a9460968fcb73deb30 (diff)
sfc: Use generic MDIO functions and definitions
Make use of the newly-added generic MDIO clause 45 support and remove redundant definitions. Add an 'efx_' prefix to the remaining driver-specific MDIO functions and remove arguments which are redundant with efx->mdio.prtad. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/sfc/xenpack.h')
-rw-r--r--drivers/net/sfc/xenpack.h15
1 files changed, 5 insertions, 10 deletions
diff --git a/drivers/net/sfc/xenpack.h b/drivers/net/sfc/xenpack.h
index b0d1f225b70a..4e52286e542d 100644
--- a/drivers/net/sfc/xenpack.h
+++ b/drivers/net/sfc/xenpack.h
@@ -34,29 +34,24 @@
34/* Enable LASI interrupts for PHY */ 34/* Enable LASI interrupts for PHY */
35static inline void xenpack_enable_lasi_irqs(struct efx_nic *efx) 35static inline void xenpack_enable_lasi_irqs(struct efx_nic *efx)
36{ 36{
37 int reg;
38 int phy_id = efx->mii.phy_id;
39 /* Read to clear LASI status register */ 37 /* Read to clear LASI status register */
40 reg = mdio_clause45_read(efx, phy_id, MDIO_MMD_PMAPMD, 38 efx_mdio_read(efx, MDIO_MMD_PMAPMD, MDIO_XP_LASI_STAT);
41 MDIO_XP_LASI_STAT);
42 39
43 mdio_clause45_write(efx, phy_id, MDIO_MMD_PMAPMD, 40 efx_mdio_write(efx, MDIO_MMD_PMAPMD, MDIO_XP_LASI_CTRL,
44 MDIO_XP_LASI_CTRL, XP_LASI_LS_ALARM); 41 XP_LASI_LS_ALARM);
45} 42}
46 43
47/* Read the LASI interrupt status to clear the interrupt. */ 44/* Read the LASI interrupt status to clear the interrupt. */
48static inline int xenpack_clear_lasi_irqs(struct efx_nic *efx) 45static inline int xenpack_clear_lasi_irqs(struct efx_nic *efx)
49{ 46{
50 /* Read to clear link status alarm */ 47 /* Read to clear link status alarm */
51 return mdio_clause45_read(efx, efx->mii.phy_id, 48 return efx_mdio_read(efx, MDIO_MMD_PMAPMD, MDIO_XP_LASI_STAT);
52 MDIO_MMD_PMAPMD, MDIO_XP_LASI_STAT);
53} 49}
54 50
55/* Turn off LASI interrupts */ 51/* Turn off LASI interrupts */
56static inline void xenpack_disable_lasi_irqs(struct efx_nic *efx) 52static inline void xenpack_disable_lasi_irqs(struct efx_nic *efx)
57{ 53{
58 mdio_clause45_write(efx, efx->mii.phy_id, MDIO_MMD_PMAPMD, 54 efx_mdio_write(efx, MDIO_MMD_PMAPMD, MDIO_XP_LASI_CTRL, 0);
59 MDIO_XP_LASI_CTRL, 0);
60} 55}
61 56
62#endif /* EFX_XENPACK_H */ 57#endif /* EFX_XENPACK_H */