Net: qla3xxx, remove sleeping in atomic
authorJiri Slaby <jirislaby@gmail.com>
Sat, 20 Jun 2009 08:20:30 +0000 (01:20 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sat, 20 Jun 2009 08:20:30 +0000 (01:20 -0700)
We cannot sleep in ql_reset_work under spinlock, unlock before sleep,
relock after.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/qla3xxx.c

index 8a823ecc99a90568d55cdd10fd30c72cddb92906..bbc6d4d3cc945b1cdf9f42f1872d7cef231012a6 100644 (file)
@@ -3837,7 +3837,9 @@ static void ql_reset_work(struct work_struct *work)
                                                      16) | ISP_CONTROL_RI));
                        }
 
+                       spin_unlock_irqrestore(&qdev->hw_lock, hw_flags);
                        ssleep(1);
+                       spin_lock_irqsave(&qdev->hw_lock, hw_flags);
                } while (--max_wait_time);
                spin_unlock_irqrestore(&qdev->hw_lock, hw_flags);