diff options
author | Sucheta Chakraborty <sucheta.chakraborty@qlogic.com> | 2010-05-16 21:22:12 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-05-17 20:30:55 -0400 |
commit | 78ad38923094a479453f5b02b37a012377a36f34 (patch) | |
tree | 10e56f34699d12e94ad0e97ea6499b839a332578 /drivers/net/qlcnic/qlcnic_main.c | |
parent | 4d5bdb384813f1928016661f28fd45f8327c081d (diff) |
qlcnic: fix internal loopback test
Reset/set DEV_UP bit during allocation and deallocation of resources.
Signed-off-by: Sucheta Chakraborty <sucheta.chakraborty@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_main.c')
-rw-r--r-- | drivers/net/qlcnic/qlcnic_main.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/qlcnic/qlcnic_main.c b/drivers/net/qlcnic/qlcnic_main.c index b076474389b9..dde1e8aaf20e 100644 --- a/drivers/net/qlcnic/qlcnic_main.c +++ b/drivers/net/qlcnic/qlcnic_main.c | |||
@@ -870,6 +870,7 @@ void qlcnic_diag_free_res(struct net_device *netdev, int max_sds_rings) | |||
870 | struct qlcnic_host_sds_ring *sds_ring; | 870 | struct qlcnic_host_sds_ring *sds_ring; |
871 | int ring; | 871 | int ring; |
872 | 872 | ||
873 | clear_bit(__QLCNIC_DEV_UP, &adapter->state); | ||
873 | if (adapter->diag_test == QLCNIC_INTERRUPT_TEST) { | 874 | if (adapter->diag_test == QLCNIC_INTERRUPT_TEST) { |
874 | for (ring = 0; ring < adapter->max_sds_rings; ring++) { | 875 | for (ring = 0; ring < adapter->max_sds_rings; ring++) { |
875 | sds_ring = &adapter->recv_ctx.sds_rings[ring]; | 876 | sds_ring = &adapter->recv_ctx.sds_rings[ring]; |
@@ -920,6 +921,7 @@ int qlcnic_diag_alloc_res(struct net_device *netdev, int test) | |||
920 | qlcnic_enable_int(sds_ring); | 921 | qlcnic_enable_int(sds_ring); |
921 | } | 922 | } |
922 | } | 923 | } |
924 | set_bit(__QLCNIC_DEV_UP, &adapter->state); | ||
923 | 925 | ||
924 | return 0; | 926 | return 0; |
925 | } | 927 | } |