Re: [PARPORT] Re: problems with parallel port IRQ detection

Tim Waugh (tim@cyberelk.demon.co.uk)
Mon, 9 Feb 1998 21:54:31 +0000 (GMT)


On Sun, 8 Feb 1998, Chris Smith wrote:

> Philip Blundell <Philip.Blundell@pobox.com> writes:
>
> | Thanks. I understood that much already. The problem is that I don't know
> | how the contents of the "configB" register is defined and I have no idea
> | whether the bits in question really do constitute a valid magic number to
> | derive an IRQ from.
>
> The Microsoft ECP spec is at http://www.fapo.com/files/ecp_reg.pdf.

Thanks for the URL.

Here is a patch that hopefully fixes the ECP interrupt detection routine.
I don't have ECP myself so I can't test it -- could anyone who does let me
know if it works for them?

Thanks,
Tim.
*/

--- linux/drivers/misc/parport_pc.c~ Mon Feb 9 21:45:31 1998
+++ linux/drivers/misc/parport_pc.c Mon Feb 9 21:51:35 1998
@@ -683,15 +683,29 @@

irq = (parport_pc_read_configb(pb) >> 3) & 0x07;

+ /* Bits 5:3 of configB (intrLine) mean:
+ * 111: interrupt 5
+ * 110: interrupt 15
+ * 101: interrupt 14
+ * 100: interrupt 11
+ * 011: interrupt 10
+ * 010: interrupt 9
+ * 001: interrupt 7
+ * 000: jumpered
+ */
switch(irq){
- case 2:
- irq = 9;
+ case 0:
+ irq = PARPORT_IRQ_NONE;
+ break;
+ case 1:
+ irq = 7;
+ break;
+ case 5:
+ case 6:
+ irq += 9;
break;
case 7:
irq = 5;
- break;
- case 0:
- irq = PARPORT_IRQ_NONE;
break;
default:
irq += 7;

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu