Skip to content

Commit

Permalink
netxen: hold tx lock while sending firmware commands
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Dhananjay Phadke authored and David S. Miller committed Jan 15, 2009
1 parent 06e9d9f commit 03e678e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/net/netxen/netxen_nic_hw.c
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand All @@ -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;
}

Expand Down

0 comments on commit 03e678e

Please sign in to comment.