Re: Programming the parallel port irq on a shared irq?



On Mon, 28 Mar 2011 21:45:34 +0100, The Natural Philosopher <tnp@xxxxxxxxxxxxxxx> wrote:

unruh wrote:
I wrote a program using the parallel port irq, and ran it on a single
unshared parallel port for years. It uses an edge triggered
(IO-APIC-edge) unshared irq. One one of my machines I have no onboard
parallel port and so had to buy a card which contains one parallel and
two serial ports. The irq in this case is a shared irq -- irq 0x11 with
a IO-APIC-fasteoi. However, this does not work, since there seems no way
with the parallel port to shut off the irq once the irq has been
serviced.

? if its edge triggered, its gone before you even service it.


The nINTA is tied to the nACK line, and, I cannot switch it off (or
rather cannot switch it to 1). as it is tied to the nACK, and that is
delivered by the gps timing line, and cannot be changed by the computer
(it goes on for 100ms ) What happens is that I get an irq storm-- every
3 ms a new irq comes through, which is hardly what I want happening.

I am clearly missing something. Does anyone have any hints or references
I can look at? I have tried googling, but all I find is discussions of
the irq behaviour on an unshared edge triggered, not a shared, level
triggered ( which is what I assume that fasteoi is) parallel port.


why not go for level triggered, assuming you can reset the edge in the ISR?

Why not? Must! Only way to service shared IRQ is to poll each source until
the IRQ is satisfied. Can't do that with edge trigger.

Grant.


The parallel card is a Moschip MCS9835 card-- 2 serial, one parallel,
all sharing one fasteoi interrupt (0x11)

lspci -v gives

04:03.0 Communication controller: NetMos Technology PCI 9835 Multi-I/O
Controller (rev 01)
Subsystem: LSI Logic / Symbios Logic 1P2S
Flags: medium devsel, IRQ 11
I/O ports at 1030 [size=8]
I/O ports at 1028 [size=8]
I/O ports at 1020 [size=8]
I/O ports at 1018 [size=8]
I/O ports at 1010 [size=8]
I/O ports at 1000 [size=16]
----------------------------------------

The first two base addresses are serial, the third is the parallel base
address. I have no idea what the other three are. Usually it is said
that the extended ports for the parallel port are at 0x400 higher than
the base (1020) which does not seem to make sense with the above
addresses.

Reading the MOSCHIP specs for this system gives me no clue.

Note that I do NOT want to use the parport Linux parallel port driver,
since timing is critical, and want the irq to be time stamped
immediately the irq comes through, not after some delay while the irq
comes through, the parport driver is notified and it triggers a polling
select function or something like that-- that takes time before the
timestamp is applied.

understood.


If there is some other newsgroup where I should take this, please let me
know.



its been a long time BUT in the case where you have several possible
causes of the same interrupt, in general you need to examine each source
in turn, and tell it to shut up. After all it may be interrupting
because its got an empty write buffer. Unless you tell it not to.
Assuming you are reading data off it, not writing data to it.



Your best bet is to ID the actual chipset and try and get specs on it.
.



Relevant Pages

  • Re: 5.1-R-p2 crashes on SMP with AMI RAID and Intel 1000/Pro
    ... Most problems were caused by IRQ problems, I gues and I solved them by fiddling around ... :>Sadly, I can offer no help, but I do have a Thunder 2462 (SMP mobo), and I ... :>> Dependend on which devices are switched on or off by BIOS, the kernel ... :>> serial ports, the parallel port, sound and usb to get additional IRQs. ...
    (freebsd-stable)
  • Re: XA1541 on AMD64 x2, further suggestions
    ... taken from the chip itself, ... parallel port, IRQ1, IRQ3 and IRQ12. ... IRQ in your BIOS. ... BIOS does not provide such a configuration option. ...
    (comp.sys.cbm)
  • Re: Programming the parallel port irq on a shared irq?
    ... unshared parallel port for years. ... unshared irq. ... For shared interrupts you set for level triggered and the ISR loops until ... the parport driver is notified and it triggers a polling ...
    (alt.os.linux)
  • Strange BIOS-self-reset and IRQ-conflicts
    ... For my application i dont need the ... parallel port, but many serial ports, so the kernel was built without ... which needs at least one IRQ. ... And the system has heavy communication over the serial ports ...
    (comp.os.linux.embedded)
  • [PATCH] parport: Use the PCI IRQ if offered
    ... PCI parallel port devices can IRQ share so we should stop them hogging the ... printk (KERN_INFO ...
    (Linux-Kernel)