Commit 03e678ee authored by Dhananjay Phadke's avatar Dhananjay Phadke Committed by David S. Miller

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: default avatarDhananjay Phadke <dhananjay@netxen.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 06e9d9f9
...@@ -503,6 +503,8 @@ netxen_send_cmd_descs(struct netxen_adapter *adapter, ...@@ -503,6 +503,8 @@ netxen_send_cmd_descs(struct netxen_adapter *adapter,
i = 0; i = 0;
netif_tx_lock_bh(adapter->netdev);
producer = adapter->cmd_producer; producer = adapter->cmd_producer;
do { do {
cmd_desc = &cmd_desc_arr[i]; cmd_desc = &cmd_desc_arr[i];
...@@ -527,6 +529,8 @@ netxen_send_cmd_descs(struct netxen_adapter *adapter, ...@@ -527,6 +529,8 @@ netxen_send_cmd_descs(struct netxen_adapter *adapter,
netxen_nic_update_cmd_producer(adapter, adapter->cmd_producer); netxen_nic_update_cmd_producer(adapter, adapter->cmd_producer);
netif_tx_unlock_bh(adapter->netdev);
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment