diff options
author | Ben Hutchings <bhutchings@solarflare.com> | 2008-09-01 07:48:17 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2008-09-03 09:53:47 -0400 |
commit | f8b87c17017f2ce1890fb9a7f85fb0fbf5643e37 (patch) | |
tree | 261a31a95d2fa296ef7abaf6019ff5b7c86bbc63 /drivers/net/sfc/falcon_xmac.c | |
parent | 3594e131b23665b728b4c98daaf0b61b1d4aaa7a (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/falcon_xmac.c')
-rw-r--r-- | drivers/net/sfc/falcon_xmac.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/drivers/net/sfc/falcon_xmac.c b/drivers/net/sfc/falcon_xmac.c index be5a86f0e5cf..5620d9d13925 100644 --- a/drivers/net/sfc/falcon_xmac.c +++ b/drivers/net/sfc/falcon_xmac.c | |||
@@ -69,10 +69,6 @@ static int falcon_reset_xmac(struct efx_nic *efx) | |||
69 | udelay(10); | 69 | udelay(10); |
70 | } | 70 | } |
71 | 71 | ||
72 | /* This often fails when DSP is disabled, ignore it */ | ||
73 | if (sfe4001_phy_flash_cfg) | ||
74 | return 0; | ||
75 | |||
76 | EFX_ERR(efx, "timed out waiting for XMAC core reset\n"); | 72 | EFX_ERR(efx, "timed out waiting for XMAC core reset\n"); |
77 | return -ETIMEDOUT; | 73 | return -ETIMEDOUT; |
78 | } | 74 | } |
@@ -444,7 +440,8 @@ static bool falcon_check_xaui_link_up(struct efx_nic *efx) | |||
444 | max_tries = tries; | 440 | max_tries = tries; |
445 | 441 | ||
446 | if ((efx->loopback_mode == LOOPBACK_NETWORK) || | 442 | if ((efx->loopback_mode == LOOPBACK_NETWORK) || |
447 | (efx->phy_type == PHY_TYPE_NONE)) | 443 | (efx->phy_type == PHY_TYPE_NONE) || |
444 | efx_phy_mode_disabled(efx->phy_mode)) | ||
448 | return false; | 445 | return false; |
449 | 446 | ||
450 | while (tries) { | 447 | while (tries) { |
@@ -471,7 +468,11 @@ void falcon_reconfigure_xmac(struct efx_nic *efx) | |||
471 | 468 | ||
472 | falcon_deconfigure_mac_wrapper(efx); | 469 | falcon_deconfigure_mac_wrapper(efx); |
473 | 470 | ||
474 | efx->tx_disabled = LOOPBACK_INTERNAL(efx); | 471 | /* Reconfigure the PHY, disabling transmit in mac level loopback. */ |
472 | if (LOOPBACK_INTERNAL(efx)) | ||
473 | efx->phy_mode |= PHY_MODE_TX_DISABLED; | ||
474 | else | ||
475 | efx->phy_mode &= ~PHY_MODE_TX_DISABLED; | ||
475 | efx->phy_op->reconfigure(efx); | 476 | efx->phy_op->reconfigure(efx); |
476 | 477 | ||
477 | falcon_reconfigure_xgxs_core(efx); | 478 | falcon_reconfigure_xgxs_core(efx); |
@@ -566,7 +567,7 @@ int falcon_check_xmac(struct efx_nic *efx) | |||
566 | int rc; | 567 | int rc; |
567 | 568 | ||
568 | if ((efx->loopback_mode == LOOPBACK_NETWORK) || | 569 | if ((efx->loopback_mode == LOOPBACK_NETWORK) || |
569 | (efx->phy_type == PHY_TYPE_NONE)) | 570 | efx_phy_mode_disabled(efx->phy_mode)) |
570 | return 0; | 571 | return 0; |
571 | 572 | ||
572 | falcon_mask_status_intr(efx, false); | 573 | falcon_mask_status_intr(efx, false); |