aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/sfc/mdio_10g.c
diff options
context:
space:
mode:
authorBen Hutchings <bhutchings@solarflare.com>2008-09-01 07:48:17 -0400
committerJeff Garzik <jgarzik@redhat.com>2008-09-03 09:53:47 -0400
commitf8b87c17017f2ce1890fb9a7f85fb0fbf5643e37 (patch)
tree261a31a95d2fa296ef7abaf6019ff5b7c86bbc63 /drivers/net/sfc/mdio_10g.c
parent3594e131b23665b728b4c98daaf0b61b1d4aaa7a (diff)
sfc: Make PHY flash mode a device attribute, not a module parameter
This allows updating PHY firmware for one interface without removing all other interfaces handled by the driver. Replace tx_disabled flags and 10Xpress status enumeration with flags in enum efx_phy_mode. Prevent an interface from being brought up while in PHY flash mode. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/net/sfc/mdio_10g.c')
-rw-r--r--drivers/net/sfc/mdio_10g.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/sfc/mdio_10g.c b/drivers/net/sfc/mdio_10g.c
index 406494684bb8..003e48dcb2f3 100644
--- a/drivers/net/sfc/mdio_10g.c
+++ b/drivers/net/sfc/mdio_10g.c
@@ -172,6 +172,8 @@ bool mdio_clause45_links_ok(struct efx_nic *efx, unsigned int mmd_mask)
172 return true; 172 return true;
173 else if (efx->loopback_mode == LOOPBACK_NETWORK) 173 else if (efx->loopback_mode == LOOPBACK_NETWORK)
174 return false; 174 return false;
175 else if (efx_phy_mode_disabled(efx->phy_mode))
176 return false;
175 else if (efx->loopback_mode == LOOPBACK_PHYXS) 177 else if (efx->loopback_mode == LOOPBACK_PHYXS)
176 mmd_mask &= ~(MDIO_MMDREG_DEVS0_PHYXS | 178 mmd_mask &= ~(MDIO_MMDREG_DEVS0_PHYXS |
177 MDIO_MMDREG_DEVS0_PCS | 179 MDIO_MMDREG_DEVS0_PCS |
@@ -206,7 +208,7 @@ void mdio_clause45_transmit_disable(struct efx_nic *efx)
206 208
207 ctrl1 = ctrl2 = mdio_clause45_read(efx, phy_id, MDIO_MMD_PMAPMD, 209 ctrl1 = ctrl2 = mdio_clause45_read(efx, phy_id, MDIO_MMD_PMAPMD,
208 MDIO_MMDREG_TXDIS); 210 MDIO_MMDREG_TXDIS);
209 if (efx->tx_disabled) 211 if (efx->phy_mode & PHY_MODE_TX_DISABLED)
210 ctrl2 |= (1 << MDIO_MMDREG_TXDIS_GLOBAL_LBN); 212 ctrl2 |= (1 << MDIO_MMDREG_TXDIS_GLOBAL_LBN);
211 else 213 else
212 ctrl1 &= ~(1 << MDIO_MMDREG_TXDIS_GLOBAL_LBN); 214 ctrl1 &= ~(1 << MDIO_MMDREG_TXDIS_GLOBAL_LBN);