]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
netxen: hold tx lock while sending firmware commands
authorDhananjay Phadke <dhananjay@netxen.com>
Thu, 15 Jan 2009 04:49:43 +0000 (20:49 -0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 15 Jan 2009 04:49:43 +0000 (20:49 -0800)
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>
drivers/net/netxen/netxen_nic_hw.c

index e2d2a2fdbe19c4cd825d41560f142de5a8df9332..821cff68b3f302c9fa7260215583e113e971b051 100644 (file)
@@ -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;
 }