summaryrefslogtreecommitdiffstats
path: root/drivers/net/qlcnic/qlcnic_init.c
diff options
context:
space:
mode:
authorRajesh K Borundia <rajesh.borundia@qlogic.com>2010-06-17 04:56:41 +0200
committerDavid S. Miller <davem@davemloft.net>2010-06-17 17:57:56 +0200
commitef71ff833acfd3795c3af1bb800ac186561508ef (patch)
treefa285765677574d4aafb42c9fbbc32443a8e4597 /drivers/net/qlcnic/qlcnic_init.c
parentqlcnic: seperate interrupt for TX (diff)
downloadlinux-ef71ff833acfd3795c3af1bb800ac186561508ef.tar.xz
linux-ef71ff833acfd3795c3af1bb800ac186561508ef.zip
qlcnic: fix race in tx stop queue
There is a race between netif_stop_queue and netif_stopped_queue check. So check once again if buffers are available to avoid race. With above logic we can also get rid of tx lock in process_cmd_ring. Signed-off-by: Rajesh K Borundia <rajesh.borundia@qlogic.com> Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/qlcnic/qlcnic_init.c')
-rw-r--r--drivers/net/qlcnic/qlcnic_init.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/qlcnic/qlcnic_init.c b/drivers/net/qlcnic/qlcnic_init.c
index 2bd00d54dd3f..058ce61501c3 100644
--- a/drivers/net/qlcnic/qlcnic_init.c
+++ b/drivers/net/qlcnic/qlcnic_init.c
@@ -181,7 +181,9 @@ skip_rds:
tx_ring = adapter->tx_ring;
vfree(tx_ring->cmd_buf_arr);
+ tx_ring->cmd_buf_arr = NULL;
kfree(adapter->tx_ring);
+ adapter->tx_ring = NULL;
}
int qlcnic_alloc_sw_resources(struct qlcnic_adapter *adapter)