diff options
author | Ben Hutchings <bhutchings@solarflare.com> | 2012-09-06 19:52:31 +0400 |
---|---|---|
committer | Ben Hutchings <bhutchings@solarflare.com> | 2012-12-01 04:26:09 +0400 |
commit | d5e8cc6c946e0857826dcfbb3585068858445bfe (patch) | |
tree | 2867bb12190df7cea905afce3a698d41202953b1 /drivers/net/ethernet/sfc/siena_sriov.c | |
parent | 3f978ef36cca9bb10c88a56baec1d9d1cb072b98 (diff) | |
download | linux-d5e8cc6c946e0857826dcfbb3585068858445bfe.tar.xz |
sfc: Really disable flow control while flushing
Receiving pause frames can block TX queue flushes. Earlier changes
work around this by reconfiguring the MAC during flushes for VFs, but
during flushes for the PF we would only change the fc_disable counter.
Unless the MAC is reconfigured for some other reason during the flush
(which I would not expect to happen) this had no effect at all.
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Diffstat (limited to 'drivers/net/ethernet/sfc/siena_sriov.c')
-rw-r--r-- | drivers/net/ethernet/sfc/siena_sriov.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/net/ethernet/sfc/siena_sriov.c b/drivers/net/ethernet/sfc/siena_sriov.c index d49b53dc2a50..6e62a018ea32 100644 --- a/drivers/net/ethernet/sfc/siena_sriov.c +++ b/drivers/net/ethernet/sfc/siena_sriov.c @@ -695,8 +695,7 @@ static int efx_vfdi_fini_all_queues(struct efx_vf *vf) return VFDI_RC_ENOMEM; rtnl_lock(); - if (efx->fc_disable++ == 0) - efx_mcdi_set_mac(efx); + siena_prepare_flush(efx); rtnl_unlock(); /* Flush all the initialized queues */ @@ -733,8 +732,7 @@ static int efx_vfdi_fini_all_queues(struct efx_vf *vf) } rtnl_lock(); - if (--efx->fc_disable == 0) - efx_mcdi_set_mac(efx); + siena_finish_flush(efx); rtnl_unlock(); /* Irrespective of success/failure, fini the queues */ |