[PARPORT] Re: keeping up appearances

Joerg Dorchain (dorchain@wirbel.com)
Mon, 22 Feb 1999 13:57:41 +0100

On Fri, Feb 19, 1999 at 09:15:53PM +0000, Philip Blundell wrote:
> The functional change is to fix up the most obviously broken bits of IRQ
> handling so that shared interrupts have a chance of working. As Joerg
> pointed out it's unacceptable for the parport code to go calling
> disable_irq() because it doesn't know what else might be using the same
> irq number. With the advent of PCI based parallel port cards this is no
> longer just an m68k problem, it will bite people on PCs as well.
> Fortunately, the parport layer has always had the `enable_irq' and
> `disable_irq' methods to deal with exactly this issue; it's just a case of
> pressing them into service.
> This means that if you have a driver that can generate interrupts (ie
> port->irq != PARPORT_IRQ_NONE) you *must* provide valid functions for these
> two methods. Leaving them at NULL will cause a crash. Can the m68k people
> take a look and see whether this deals with your concerns?

For both amiga (internal and mfc3), the functions are there and can be
used. Iīd guess it is not difficult to implement them for atari.
But you wonīt gain much from disabling irq sources. the function is
still in the chain of irq handlers, only the check if there was an
interrupt from this source will be negative of course.
When there character for input or output, they wonīt be dealt with until
a function (currently the interrupt function) does it.

Thus, for normal use, interrupt are necessary, so you canīt disable them.
When the device is unused, there arenīt any interrupts anyway.

The only possibility where switching irqs off in the middle of an
operation could be necessary is when a high-level device "robs" the
hardware from another driver that is currently using it to install
its own (high-lvel) irq routine.



-- To unsubscribe, send mail to: linux-parport-request@torque.net --
-- with the single word "unsubscribe" in the body of the message. --

This archive was generated by hypermail 2.0b3 on Mon 22 Feb 1999 - 08:12:22 EST