aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/qlge
diff options
context:
space:
mode:
authorRon Mercer <ron.mercer@qlogic.com>2009-09-29 04:39:22 -0400
committerDavid S. Miller <davem@davemloft.net>2009-09-30 23:03:07 -0400
commitfd21cf52df990aea2c2403c35129b6501206422d (patch)
tree2bf99bfe851b8bce42c7c15dee694038b8944924 /drivers/net/qlge
parentfbcbe56cf4c6e880c1902cc066168f79ec5c2b27 (diff)
qlge: Fix out of sync hardware semaphore.
ql_clear_routing_entries() takes/gives it's own hardware semaphore since it is called from more than one place. ql_route_initialize() should make this call and THEN take it's own semaphore before doing it's work. Signed-off-by: Ron Mercer <ron.mercer@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/qlge')
-rw-r--r--drivers/net/qlge/qlge_main.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/qlge/qlge_main.c b/drivers/net/qlge/qlge_main.c
index 7783c5db81dc..32e4f577d1b6 100644
--- a/drivers/net/qlge/qlge_main.c
+++ b/drivers/net/qlge/qlge_main.c
@@ -3142,14 +3142,14 @@ static int ql_route_initialize(struct ql_adapter *qdev)
3142{ 3142{
3143 int status = 0; 3143 int status = 0;
3144 3144
3145 status = ql_sem_spinlock(qdev, SEM_RT_IDX_MASK); 3145 /* Clear all the entries in the routing table. */
3146 status = ql_clear_routing_entries(qdev);
3146 if (status) 3147 if (status)
3147 return status; 3148 return status;
3148 3149
3149 /* Clear all the entries in the routing table. */ 3150 status = ql_sem_spinlock(qdev, SEM_RT_IDX_MASK);
3150 status = ql_clear_routing_entries(qdev);
3151 if (status) 3151 if (status)
3152 goto exit; 3152 return status;
3153 3153
3154 status = ql_set_routing_reg(qdev, RT_IDX_ALL_ERR_SLOT, RT_IDX_ERR, 1); 3154 status = ql_set_routing_reg(qdev, RT_IDX_ALL_ERR_SLOT, RT_IDX_ERR, 1);
3155 if (status) { 3155 if (status) {