From: Ron Mercer Date: Fri, 9 Jan 2009 11:31:52 +0000 (+0000) Subject: qlge: Fix schedule while atomic issue. X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=0857e9d73feea0125280dcd431cee84f6cb3b4e2;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git qlge: Fix schedule while atomic issue. There is no need to sleep while waiting for the hardware semaphore to become available. Signed-off-by: Ron Mercer Signed-off-by: David S. Miller --- diff --git a/drivers/net/qlge/qlge_main.c b/drivers/net/qlge/qlge_main.c index 9931cf7b6ad6..543a4135ae04 100644 --- a/drivers/net/qlge/qlge_main.c +++ b/drivers/net/qlge/qlge_main.c @@ -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; }