Messages in this thread Patch in this message | | | Date | Fri, 23 Jan 1998 13:43:10 +0100 (CET) | From | "Krzysztof G. Baranowski" <> | Subject | Re: [2.1.80] ftape fdc-io.c broken |
| |
On Thu, 22 Jan 1998, Fire Dragon wrote: >building ftape's fdc-io.c as a module or into the kernel brings out the >following errors. I would have attached a patch to fix it, but I do not >have the time at the moment to track this down yet. If config information >is needed from the .config file, let me know exactly what else is needed. Hope this helps. Compiled but untested.
Kris -- Krzysztof G. Baranowski - President of the Harmless Manyacs' Club "Smith & Wesson - The original point and click interface..." http://www.knm.org.pl/ <prezes@manjak.knm.org.pl>
--- linux-2.1.80/drivers/char/ftape/lowlevel/fdc-io.c-old Fri Jan 23 13:34:52 1998 +++ linux/drivers/char/ftape/lowlevel/fdc-io.c Fri Jan 23 13:39:00 1998 @@ -385,7 +385,7 @@ int fdc_interrupt_wait(unsigned int time) { struct wait_queue wait = {current, NULL}; - int current_blocked = current->blocked; + sigset_t old_sigmask; static int resetting = 0; TRACE_FUN(ft_t_fdc_dma); @@ -401,14 +401,23 @@ /* timeout time will be up to USPT microseconds too long ! */ current->timeout = jiffies + (1000 * time + FT_USPT - 1) / FT_USPT; current->state = TASK_INTERRUPTIBLE; - current->blocked = _BLOCK_ALL; /* isn't this already set by the - * high level routines? - */ + + spin_lock_irq(¤t->sigmask_lock); + old_sigmask = current->blocked; + siginitset(¤t->blocked, _BLOCK_ALL); + recalc_sigpending(current); + spin_unlock_irq(¤t->sigmask_lock); + add_wait_queue(&ftape_wait_intr, &wait); while (!ft_interrupt_seen && current->state != TASK_RUNNING) { schedule(); /* sets TASK_RUNNING on timeout */ } - current->blocked = current_blocked; /* restore */ + + spin_lock_irq(¤t->sigmask_lock); + current->blocked = old_sigmask; + recalc_sigpending(current); + spin_unlock_irq(¤t->sigmask_lock); + remove_wait_queue(&ftape_wait_intr, &wait); /* the following IS necessary. True: as well * wake_up_interruptible() as the schedule() set TASK_RUNNING
| |