diff options
author | Ben Hutchings <bhutchings@solarflare.com> | 2009-11-23 16:06:30 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-11-24 10:58:53 -0800 |
commit | eb50c0d67fe3c5513c717c2dee6d9771c51be703 (patch) | |
tree | 449f56f6c8fac242be9ac57663ad98128524b404 /drivers/net/sfc/falcon_gmac.c | |
parent | e775fb93a880d218ce0b3fd405278dd78f86c405 (diff) | |
download | talos-obmc-linux-eb50c0d67fe3c5513c717c2dee6d9771c51be703.tar.gz talos-obmc-linux-eb50c0d67fe3c5513c717c2dee6d9771c51be703.zip |
sfc: Gather link state fields in struct efx_nic into new struct efx_link_state
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/sfc/falcon_gmac.c')
-rw-r--r-- | drivers/net/sfc/falcon_gmac.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/net/sfc/falcon_gmac.c b/drivers/net/sfc/falcon_gmac.c index 8a1b80d1ff28..967f3fb397c9 100644 --- a/drivers/net/sfc/falcon_gmac.c +++ b/drivers/net/sfc/falcon_gmac.c @@ -24,16 +24,17 @@ static void falcon_reconfigure_gmac(struct efx_nic *efx) { + struct efx_link_state *link_state = &efx->link_state; bool loopback, tx_fc, rx_fc, bytemode; int if_mode; unsigned int max_frame_len; efx_oword_t reg; /* Configuration register 1 */ - tx_fc = (efx->link_fc & EFX_FC_TX) || !efx->link_fd; - rx_fc = !!(efx->link_fc & EFX_FC_RX); + tx_fc = (link_state->fc & EFX_FC_TX) || !link_state->fd; + rx_fc = !!(link_state->fc & EFX_FC_RX); loopback = (efx->loopback_mode == LOOPBACK_GMAC); - bytemode = (efx->link_speed == 1000); + bytemode = (link_state->speed == 1000); EFX_POPULATE_OWORD_5(reg, FRF_AB_GM_LOOP, loopback, @@ -50,7 +51,7 @@ static void falcon_reconfigure_gmac(struct efx_nic *efx) FRF_AB_GM_IF_MODE, if_mode, FRF_AB_GM_PAD_CRC_EN, 1, FRF_AB_GM_LEN_CHK, 1, - FRF_AB_GM_FD, efx->link_fd, + FRF_AB_GM_FD, link_state->fd, FRF_AB_GM_PAMBL_LEN, 0x7/*datasheet recommended */); efx_writeo(efx, ®, FR_AB_GM_CFG2); @@ -101,8 +102,8 @@ static void falcon_reconfigure_gmac(struct efx_nic *efx) /* FIFO configuration register 5 */ efx_reado(efx, ®, FR_AB_GMF_CFG5); EFX_SET_OWORD_FIELD(reg, FRF_AB_GMF_CFGBYTMODE, bytemode); - EFX_SET_OWORD_FIELD(reg, FRF_AB_GMF_CFGHDPLX, !efx->link_fd); - EFX_SET_OWORD_FIELD(reg, FRF_AB_GMF_HSTDRPLT64, !efx->link_fd); + EFX_SET_OWORD_FIELD(reg, FRF_AB_GMF_CFGHDPLX, !link_state->fd); + EFX_SET_OWORD_FIELD(reg, FRF_AB_GMF_HSTDRPLT64, !link_state->fd); EFX_SET_OWORD_FIELD(reg, FRF_AB_GMF_HSTFLTRFRMDC_PAUSE, 0); efx_writeo(efx, ®, FR_AB_GMF_CFG5); udelay(10); |