Commit fd21cf52 authored by Ron Mercer's avatar Ron Mercer Committed by David S. Miller

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: default avatarRon Mercer <ron.mercer@qlogic.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent fbcbe56c
...@@ -3142,14 +3142,14 @@ static int ql_route_initialize(struct ql_adapter *qdev) ...@@ -3142,14 +3142,14 @@ static int ql_route_initialize(struct ql_adapter *qdev)
{ {
int status = 0; 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) if (status)
return status; return status;
/* Clear all the entries in the routing table. */ status = ql_sem_spinlock(qdev, SEM_RT_IDX_MASK);
status = ql_clear_routing_entries(qdev);
if (status) if (status)
goto exit; return status;
status = ql_set_routing_reg(qdev, RT_IDX_ALL_ERR_SLOT, RT_IDX_ERR, 1); status = ql_set_routing_reg(qdev, RT_IDX_ALL_ERR_SLOT, RT_IDX_ERR, 1);
if (status) { if (status) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment