diff options
author | Ben Hutchings <bhutchings@solarflare.com> | 2008-12-13 00:50:46 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-12-13 00:58:17 -0500 |
commit | 04cc8cacb01c09fba2297faf1477cd570ba43f0b (patch) | |
tree | f17dbd584b072d14f1500c6f6d659be993ae35c7 /drivers/net/sfc/falcon.c | |
parent | 177dfcd80f28f8fbc3e22c2d8b24d21cb86f1d97 (diff) |
sfc: Implement auto-negotiation
Add infrastructure for auto-negotiation of speed, duplex and flow
control.
When using 10Xpress, auto-negotiate flow control. While we're
at it, clean up the code to warn when partner is not 10GBASE-T
capable.
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/sfc/falcon.c')
-rw-r--r-- | drivers/net/sfc/falcon.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/sfc/falcon.c b/drivers/net/sfc/falcon.c index f09eded40fba..fde4e7912c39 100644 --- a/drivers/net/sfc/falcon.c +++ b/drivers/net/sfc/falcon.c | |||
@@ -1998,7 +1998,7 @@ void falcon_reconfigure_mac_wrapper(struct efx_nic *efx) | |||
1998 | /* Transmission of pause frames when RX crosses the threshold is | 1998 | /* Transmission of pause frames when RX crosses the threshold is |
1999 | * covered by RX_XOFF_MAC_EN and XM_TX_CFG_REG:XM_FCNTL. | 1999 | * covered by RX_XOFF_MAC_EN and XM_TX_CFG_REG:XM_FCNTL. |
2000 | * Action on receipt of pause frames is controller by XM_DIS_FCNTL */ | 2000 | * Action on receipt of pause frames is controller by XM_DIS_FCNTL */ |
2001 | tx_fc = !!(efx->flow_control & EFX_FC_TX); | 2001 | tx_fc = !!(efx->link_fc & EFX_FC_TX); |
2002 | falcon_read(efx, ®, RX_CFG_REG_KER); | 2002 | falcon_read(efx, ®, RX_CFG_REG_KER); |
2003 | EFX_SET_OWORD_FIELD_VER(efx, reg, RX_XOFF_MAC_EN, tx_fc); | 2003 | EFX_SET_OWORD_FIELD_VER(efx, reg, RX_XOFF_MAC_EN, tx_fc); |
2004 | 2004 | ||
@@ -2328,9 +2328,9 @@ int falcon_probe_port(struct efx_nic *efx) | |||
2328 | 2328 | ||
2329 | /* Hardware flow ctrl. FalconA RX FIFO too small for pause generation */ | 2329 | /* Hardware flow ctrl. FalconA RX FIFO too small for pause generation */ |
2330 | if (falcon_rev(efx) >= FALCON_REV_B0) | 2330 | if (falcon_rev(efx) >= FALCON_REV_B0) |
2331 | efx->flow_control = EFX_FC_RX | EFX_FC_TX; | 2331 | efx->wanted_fc = EFX_FC_RX | EFX_FC_TX; |
2332 | else | 2332 | else |
2333 | efx->flow_control = EFX_FC_RX; | 2333 | efx->wanted_fc = EFX_FC_RX; |
2334 | 2334 | ||
2335 | /* Allocate buffer for stats */ | 2335 | /* Allocate buffer for stats */ |
2336 | rc = falcon_alloc_buffer(efx, &efx->stats_buffer, | 2336 | rc = falcon_alloc_buffer(efx, &efx->stats_buffer, |