Re: Backport of a 2.6.x USB driver to 2.4.32 - help needed

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jesper Juhl wrote:
On 06/06/06, Heiko Gerstung <[email protected]> wrote:
Hi!

Short Version (tm): I try to backport a USB driver (rtl8150.c) from
2.6.15.x to 2.4.32 and have no idea how to substitue two functions:
in_atomic() and schedule_timeout_uninterruptible() ... I really would
appreciate any help, because I am no kernel hacker at all ...

in_atomic() is used to test if the kernel is in a state where sleeping
is allowed or not. The 2.4.x kernel is not preemptive and has quite
coarse grained SMP support (the BKL "Big Kernel Lock"), it didin't
need in_atomic() in the same way as 2.6.x does.

There's little difference in the need for it, 2.4 just doesn't have it. I don't see a call to that function in that driver's code though?


schedule_timeout_uninterruptible() is used to sleep on a wait-queue,
which 2.4.x does not have.

Huh? 2.4 did have wait queues, but that call has nothing to do with them. You should be able to replace it with:

set_current_state( TASK_UNINTERRUPTIBLE );
schedule_timeout( timeout );

--
Robert Hancock      Saskatoon, SK, Canada
To email, remove "nospam" from [email protected]
Home Page: http://www.roberthancock.com/

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

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux