diff options
author | Ben Hutchings <bhutchings@solarflare.com> | 2009-11-29 04:42:18 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-11-30 01:46:26 +0100 |
commit | 4b0d29dcfca9eafbf6e940862ab022df3ef2dd6f (patch) | |
tree | 13af38825d9c0f290f6486f2ae38dc8c55061723 /drivers/net/sfc/falcon_xmac.c | |
parent | sfc: Remove duplicate hardware structure definitions (diff) | |
download | linux-4b0d29dcfca9eafbf6e940862ab022df3ef2dd6f.tar.xz linux-4b0d29dcfca9eafbf6e940862ab022df3ef2dd6f.zip |
sfc: Turn pause frame generation on and off at the MAC, not the RX FIFO
Pause frame generation is gated by both RX_XOFF_MAC_EN and an enable
bit in each MAC. RX_XOFF_MAC_EN bit always reads back as 0 so we need
to set it correctly every time we modify RX_CFG_REG. Simplify this by
always setting it to 1 and only changing the enable bits in the MACs.
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/sfc/falcon_xmac.c')
-rw-r--r-- | drivers/net/sfc/falcon_xmac.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/sfc/falcon_xmac.c b/drivers/net/sfc/falcon_xmac.c index 1523efdcefe6..60dc0975cfa4 100644 --- a/drivers/net/sfc/falcon_xmac.c +++ b/drivers/net/sfc/falcon_xmac.c @@ -148,6 +148,7 @@ static void falcon_reconfigure_xmac_core(struct efx_nic *efx) unsigned int max_frame_len; efx_oword_t reg; bool rx_fc = !!(efx->link_state.fc & EFX_FC_RX); + bool tx_fc = !!(efx->link_state.fc & EFX_FC_TX); /* Configure MAC - cut-thru mode is hard wired on */ EFX_POPULATE_OWORD_3(reg, @@ -162,7 +163,7 @@ static void falcon_reconfigure_xmac_core(struct efx_nic *efx) FRF_AB_XM_TX_PRMBL, 1, FRF_AB_XM_AUTO_PAD, 1, FRF_AB_XM_TXCRC, 1, - FRF_AB_XM_FCNTL, 1, + FRF_AB_XM_FCNTL, tx_fc, FRF_AB_XM_IPG, 0x3); efx_writeo(efx, ®, FR_AB_XM_TX_CFG); |