Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0857e9d7 authored by Ron Mercer's avatar Ron Mercer Committed by David S. Miller
Browse files

qlge: Fix schedule while atomic issue.



There is no need to sleep while waiting for the hardware
semaphore to become available.

Signed-off-by: default avatarRon Mercer <ron.mercer@qlogic.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 697cdc46
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -126,12 +126,12 @@ static int ql_sem_trylock(struct ql_adapter *qdev, u32 sem_mask)

int ql_sem_spinlock(struct ql_adapter *qdev, u32 sem_mask)
{
	unsigned int seconds = 3;
	unsigned int wait_count = 30;
	do {
		if (!ql_sem_trylock(qdev, sem_mask))
			return 0;
		ssleep(1);
	} while (--seconds);
		udelay(100);
	} while (--wait_count);
	return -ETIMEDOUT;
}