diff options
author | Dhananjay Phadke <dhananjay@netxen.com> | 2009-01-14 23:49:43 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-01-14 23:49:43 -0500 |
commit | 03e678ee968ae54b79c1580c2935895bd863ad95 (patch) | |
tree | 537fa189202b60b14c76151cd819be88fdec3f79 /drivers/net/netxen | |
parent | 06e9d9f9783860fe4c602ef491f47211804ccc96 (diff) |
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.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, | |||
503 | 503 | ||
504 | i = 0; | 504 | i = 0; |
505 | 505 | ||
506 | netif_tx_lock_bh(adapter->netdev); | ||
507 | |||
506 | producer = adapter->cmd_producer; | 508 | producer = adapter->cmd_producer; |
507 | do { | 509 | do { |
508 | cmd_desc = &cmd_desc_arr[i]; | 510 | cmd_desc = &cmd_desc_arr[i]; |
@@ -527,6 +529,8 @@ netxen_send_cmd_descs(struct netxen_adapter *adapter, | |||
527 | 529 | ||
528 | netxen_nic_update_cmd_producer(adapter, adapter->cmd_producer); | 530 | netxen_nic_update_cmd_producer(adapter, adapter->cmd_producer); |
529 | 531 | ||
532 | netif_tx_unlock_bh(adapter->netdev); | ||
533 | |||
530 | return 0; | 534 | return 0; |
531 | } | 535 | } |
532 | 536 | ||