diff options
author | Dhananjay Phadke <dhananjay@netxen.com> | 2009-01-15 05:49:43 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-01-15 05:49:43 +0100 |
commit | 03e678ee968ae54b79c1580c2935895bd863ad95 (patch) | |
tree | 537fa189202b60b14c76151cd819be88fdec3f79 /drivers | |
parent | netxen: cleanup mac list on driver unload (diff) | |
download | linux-03e678ee968ae54b79c1580c2935895bd863ad95.tar.xz 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')
-rw-r--r-- | drivers/net/netxen/netxen_nic_hw.c | 4 |
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; } |