diff options
author | Ron Mercer <ron.mercer@qlogic.com> | 2009-09-29 08:39:22 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-09-30 20:03:07 -0700 |
commit | fd21cf52df990aea2c2403c35129b6501206422d (patch) | |
tree | 2bf99bfe851b8bce42c7c15dee694038b8944924 /drivers/net/qlge/qlge_main.c | |
parent | fbcbe56cf4c6e880c1902cc066168f79ec5c2b27 (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/qlge_main.c')
-rw-r--r-- | drivers/net/qlge/qlge_main.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/qlge/qlge_main.c b/drivers/net/qlge/qlge_main.c index 7783c5db81d..32e4f577d1b 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) { int status = 0; - status = ql_sem_spinlock(qdev, SEM_RT_IDX_MASK); + /* Clear all the entries in the routing table. */ + status = ql_clear_routing_entries(qdev); if (status) return status; - /* Clear all the entries in the routing table. */ - status = ql_clear_routing_entries(qdev); + status = ql_sem_spinlock(qdev, SEM_RT_IDX_MASK); if (status) - goto exit; + return status; status = ql_set_routing_reg(qdev, RT_IDX_ALL_ERR_SLOT, RT_IDX_ERR, 1); if (status) { |