Re: Running schedule() in set_multicast_list

Alan Cox (alan@lxorguk.ukuu.org.uk)
Tue, 4 May 1999 20:54:26 +0100 (BST)


> Now, I should really wait for the card to interrupt me and tell me that everything is ok with my command, but calling any type of scheduling panics the kernel (i.e. interruptible_sleep_on_timeout, schedule etc.)
>
> The questions is, have I screwed up (highly likely) or is the kernel in the middle of something clever that doesn't like to be scheduled. If so, I'll have to poll the registers to see when they are set, which I really don't want to do.

The set_multicast_list function is called in 2.2.x from bottom half (ie post
interrupt) context - so it cannot sleep. That makes driving such a card
somewhat more complex.

The driver always has access to the multicast list so you can think of
set_multicast_list as an advisory poke and if need be defer the operation
or retry in another format after an error. You want to fulfill the request
promptly but immediately is not essential.

Alan

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