From a606f4325dca6950996abbae452d33f2af095f39 Mon Sep 17 00:00:00 2001 From: Steve Hodgson Date: Mon, 23 May 2011 12:18:45 +0100 Subject: sfc: Disable flow control during flushes The TX DMA engine issues upstream read requests when there is room in the TX FIFO for the completion. However, the fetches for the rest of the packet might be delayed by any back pressure. Since a flush must wait for an EOP, the entire flush may be delayed by back pressure. Mitigate this by disabling flow control before the flushes are started. Since PF and VF flushes run in parallel introduce fc_disable, a reference count of the number of flushes outstanding. The same principle could be applied to Falcon, but that would bring with it its own testing. Signed-off-by: Ben Hutchings --- drivers/net/ethernet/sfc/mcdi_mac.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'drivers/net/ethernet/sfc/mcdi_mac.c') diff --git a/drivers/net/ethernet/sfc/mcdi_mac.c b/drivers/net/ethernet/sfc/mcdi_mac.c index f67cf92..98afe1c 100644 --- a/drivers/net/ethernet/sfc/mcdi_mac.c +++ b/drivers/net/ethernet/sfc/mcdi_mac.c @@ -44,6 +44,8 @@ static int efx_mcdi_set_mac(struct efx_nic *efx) } if (efx->wanted_fc & EFX_FC_AUTO) fcntl = MC_CMD_FCNTL_AUTO; + if (efx->fc_disable) + fcntl = MC_CMD_FCNTL_OFF; MCDI_SET_DWORD(cmdbytes, SET_MAC_IN_FCNTL, fcntl); -- cgit v1.1