Re: [PATCH] new device support for forcedeth.c fourth try

From: Jeff Garzik
Date: Tue Jun 22 2004 - 09:43:22 EST


Roland Dreier wrote:
"Jeff" == Jeff Garzik <jgarzik@xxxxxxxxx> writes:


> Andi Kleen wrote:
>> Carl-Daniel Hailfinger <c-d.hailfinger.kernel.2004@xxxxxxx>
>> writes:

>>> Known Bug: You will get a "bad: scheduling while atomic"
>>> message because of the msleep(500) in PHY reset.

>>> Any suggestions how I can avoid this message? Using
>>> mdelay(500) has its share of problems too, because it will
>>> cause lost time.

>> Use schedule_work() to push it into a worker thread.

> Agreed. This is what I am moving net drivers to, for slow
> path stuff like chip reset or twiddling the phy.

In this case is it possible to use schedule_delayed_work() to avoid
stalling keventd for half a second?

Certainly. Won't work in a 2.4.x backport, though.

This reminds me, I'm tempted to create a "you can sleep for a while in it" workqueue, to avoid tying up keventd.

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/