summaryrefslogtreecommitdiffstats
path: root/drivers/net/netxen
diff options
context:
space:
mode:
authorDhananjay Phadke <dhananjay@netxen.com>2009-01-14 20:49:43 -0800
committerDavid S. Miller <davem@davemloft.net>2009-01-14 20:49:43 -0800
commit03e678ee968ae54b79c1580c2935895bd863ad95 (patch)
tree537fa189202b60b14c76151cd819be88fdec3f79 /drivers/net/netxen
parent06e9d9f9783860fe4c602ef491f47211804ccc96 (diff)
downloadblackbird-op-linux-03e678ee968ae54b79c1580c2935895bd863ad95.tar.gz
blackbird-op-linux-03e678ee968ae54b79c1580c2935895bd863ad95.zip
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>
Diffstat (limited to 'drivers/net/netxen')
-rw-r--r--drivers/net/netxen/netxen_nic_hw.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/netxen/netxen_nic_hw.c b/drivers/net/netxen/netxen_nic_hw.c
index e2d2a2fdbe19..821cff68b3f3 100644
--- a/drivers/net/netxen/netxen_nic_hw.c
+++ b/drivers/net/netxen/netxen_nic_hw.c
@@ -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;
}
OpenPOWER on IntegriCloud