Re: [PATCH] USB: fix Scheduling while atomic warning when resuming.

From: Jeff Garzik
Date: Tue Dec 21 2004 - 22:50:05 EST


Linux Kernel Mailing List wrote:
ChangeSet 1.2215, 2004/12/21 16:25:03-08:00, greg@xxxxxxxxx

[PATCH] USB: fix Scheduling while atomic warning when resuming.

This fixes a warning when resuming the USB EHCI host controller driver.

diff -Nru a/drivers/usb/host/ehci-hub.c b/drivers/usb/host/ehci-hub.c
--- a/drivers/usb/host/ehci-hub.c 2004-12-21 17:04:09 -08:00
+++ b/drivers/usb/host/ehci-hub.c 2004-12-21 17:04:09 -08:00
@@ -122,7 +122,7 @@
writel (temp, &ehci->regs->port_status [i]);
}
i = HCS_N_PORTS (ehci->hcs_params);
- msleep (20);
+ mdelay (20);
while (i--) {
temp = readl (&ehci->regs->port_status [i]);


This is more than a little bit silly.

The entire resume function holds spin_lock_irq() for far longer than a timer tick.

If we are going for a minimalist -rc patch, why not drop the lock, sleep, then reacquire the lock?

This strikes me as a bad change, make in haste for -rc, that will get quickly forgotten (and left as-is) once 2.6.10 is released.

Jeff


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/