]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
netxen: Fix bug in Tx completion path.
authorManish Chopra <manish.chopra@qlogic.com>
Tue, 30 Sep 2014 07:56:36 +0000 (03:56 -0400)
committerDavid S. Miller <davem@davemloft.net>
Tue, 30 Sep 2014 20:22:44 +0000 (16:22 -0400)
o Driver is not updating sw_consumer while processing Tx completion
  when interface is going down. Due to this interface down path gets
  stuck forever waiting for NAPI to complete.

Signed-off-by: Manish Chopra <manish.chopra@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c

index ae4ec7b3bfd3fcf0161f97fdac9501d51b9d252f..5c4068353f664e8924f832c3d681ec41f53465c6 100644 (file)
@@ -1794,9 +1794,9 @@ int netxen_process_cmd_ring(struct netxen_adapter *adapter)
                        break;
        }
 
-       if (count && netif_running(netdev)) {
-               tx_ring->sw_consumer = sw_consumer;
+       tx_ring->sw_consumer = sw_consumer;
 
+       if (count && netif_running(netdev)) {
                smp_mb();
 
                if (netif_queue_stopped(netdev) && netif_carrier_ok(netdev))