[hsflinux] HSF Driver Development for linux-2.5.x
Antonino Daplas
adaplas at pol.net
Tue Jan 20 01:56:32 EST 2004
On Sat, 2002-10-26 at 23:25, Antonino Daplas wrote:
> Hi,
>
> Beginning linux-2.5.40, task queues were removed and replaced by
> workqueues. Converting the HSF driver to use workqueues instead of task
> queues is not difficult. Unfortunately, they are available only for
> GPL'ed modules.
>
> The question then, is there a way to work around this? I have already
> seen one complaint about this in the kernel mailing list concerning
> nVidia drivers.
>
> Tony
>
To answer my own question, there is an exportable function,
schedule_work(), which is available to non-GPL'ed drivers. The only
caveat is that the driver will not be able to create its own workqueue
(similar to the old task queue), but a default one, similar to the old
keventd, will be available.
Attached is a patch for hsflinmodem-5.03.03.L3mbsibeta02101001 that
allows the driver to utilize workqueues instead. In my case, it's quite
stable with linux-2.5.44 and linux-2.4.19, gcc-3.2, with Conexant HSF
(127a:1025 (rev 01)) modem and preemption enabled.
Changes:
Converted task queues to workqueues.
Since workqueues handle running of the queued task/work, the mdmthrd
function is not necessary (I think??) -- ie no need for
run_task_queue().
Fixes kmalloc() occasionally complaining when the GFP_KERNEL flag is
used. Ie. OSContextAllowsSleeping() is always false -- not sure if this
is a correct fix.
Tony
-------------- next part --------------
A non-text attachment was scrubbed...
Name: hsflinmodem-5.03.03.L3mbsibeta02101001-2.5.40.diff
Type: text/x-patch
Size: 8677 bytes
Desc: not available
Url : http://www.linuxant.com/pipermail/hsflinux/attachments/20021027/e73ea0f9/hsflinmodem-5.03.03.L3mbsibeta02101001-2.5.40.bin
More information about the hsflinux
mailing list