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:
Dhananjay Phadke 2009-01-14 20:49:43 -08:00 committed by David S. Miller
parent 06e9d9f978
commit 03e678ee96

View file

@ -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;
}