Skip to content

Commit

Permalink
qlge: Fix out of sync hardware semaphore.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Ron Mercer authored and David S. Miller committed Oct 1, 2009
1 parent fbcbe56 commit fd21cf5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions drivers/net/qlge/qlge_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit fd21cf5

Please sign in to comment.