aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/sfc/xenpack.h
diff options
context:
space:
mode:
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 */