Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 290174
b: refs/heads/master
c: a606f43
h: refs/heads/master
v: v3
  • Loading branch information
Steve Hodgson authored and Ben Hutchings committed Feb 16, 2012
1 parent 209c7b1 commit c697946
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 90893000e21e2d52a0a9d5aa0c4234c90bcd9470
refs/heads/master: a606f4325dca6950996abbae452d33f2af095f39
2 changes: 2 additions & 0 deletions trunk/drivers/net/ethernet/sfc/mcdi_mac.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
4 changes: 4 additions & 0 deletions trunk/drivers/net/ethernet/sfc/net_driver.h
Original file line number Diff line number Diff line change
Expand Up @@ -670,6 +670,9 @@ struct efx_filter_state;
* @promiscuous: Promiscuous flag. Protected by netif_tx_lock.
* @multicast_hash: Multicast hash table
* @wanted_fc: Wanted flow control flags
* @fc_disable: When non-zero flow control is disabled. Typically used to
* ensure that network back pressure doesn't delay dma queue flushes.
* Serialised by the rtnl lock.
* @mac_work: Work item for changing MAC promiscuity and multicast hash
* @loopback_mode: Loopback status
* @loopback_modes: Supported loopback mode bitmask
Expand Down Expand Up @@ -769,6 +772,7 @@ struct efx_nic {
bool promiscuous;
union efx_multicast_hash multicast_hash;
u8 wanted_fc;
unsigned fc_disable;

atomic_t rx_reset;
enum efx_loopback_mode loopback_mode;
Expand Down
3 changes: 3 additions & 0 deletions trunk/drivers/net/ethernet/sfc/nic.c
Original file line number Diff line number Diff line change
Expand Up @@ -677,6 +677,7 @@ int efx_nic_flush_queues(struct efx_nic *efx)
struct efx_tx_queue *tx_queue;
int rc = 0;

efx->fc_disable++;
efx->type->prepare_flush(efx);

efx_for_each_channel(channel, efx) {
Expand Down Expand Up @@ -727,6 +728,8 @@ int efx_nic_flush_queues(struct efx_nic *efx)
atomic_set(&efx->rxq_flush_outstanding, 0);
}

efx->fc_disable--;

return rc;
}

Expand Down

0 comments on commit c697946

Please sign in to comment.