netxen: hold tx lock while sending firmware commands
Some firmware commands like mac address addition/deletion are sent on the transmit ring. So need to hold the tx lock before touching tx producer/consumer indices. Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
06e9d9f978
commit
03e678ee96
1 changed files with 4 additions and 0 deletions
|
@ -503,6 +503,8 @@ netxen_send_cmd_descs(struct netxen_adapter *adapter,
|
|||
|
||||
i = 0;
|
||||
|
||||
netif_tx_lock_bh(adapter->netdev);
|
||||
|
||||
producer = adapter->cmd_producer;
|
||||
do {
|
||||
cmd_desc = &cmd_desc_arr[i];
|
||||
|
@ -527,6 +529,8 @@ netxen_send_cmd_descs(struct netxen_adapter *adapter,
|
|||
|
||||
netxen_nic_update_cmd_producer(adapter, adapter->cmd_producer);
|
||||
|
||||
netif_tx_unlock_bh(adapter->netdev);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue