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

From: Andi Kleen
Date: Tue Jun 22 2004 - 05:25:18 EST


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.
While letting a worker thread sleep for 500ms is also not nice,
it's better than doing it in an interrupt. The best but also
most complicated solution is to set up a timer using add_timer
for this, but this quickly gets you into state machine hell.

-Andi

-
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/