[Linux-parport] NetMos nm9855 patch

Joerg Wunsch joerg.wunsch at hno.atmel.com
Fri May 20 10:58:43 EDT 2005


As Joerg Wunsch wrote:

> I tried to hack up a 2.6.8-24 kernel to recognize my NetMos 9855
> serial ports that way.  The ports are now recognized appropriately:

> May 19 10:59:02 sv10drdev kernel: ttyS4 at I/O 0xb000 (irq = 9) is a 16550A
...

> Anyway, all my access attempts to ttyS4 through ttyS7 yield an EIO.
> 
> Does anyone have an idea where to continue debugging this?

Turned out IRQ sharing was not enabled.  I'd appreciate if a patch
like the following one would remind the innocent administrator of his
mistake, as it's a bit queer the driver probes correctly yet fails to
open the device then.  Yes, I know *why* this happens (IRQ allocation
deferred until device open time), but it took me quite a while to find
out about that, and I'd like to spare other people that effort.

--- ./drivers/serial/8250.c.orig	2005-05-19 14:43:48.000000000 +0200
+++ ./drivers/serial/8250.c	2005-05-19 17:52:56.000000000 +0200
@@ -1142,8 +1142,13 @@
 
 		ret = request_irq(up->port.irq, serial8250_interrupt,
 				  irq_flags, "serial", i);
-		if (ret < 0)
+		if (ret < 0) {
+			if (irq_flags == 0 && ret == EBUSY)
+				printk(KERN_INFO
+				       "8250: IRQ %d chaining failed, needs IRQ sharing?\n",
+				       up->port.irq);
 			serial_do_unlink(i, up);
+		}
 	}
 
 	return ret;

-- 
cheers, J"org Wunsch

Contractor for Atmel Dresden, Germany
Never trust an operating system you don't have sources for. ;-)



More information about the Linux-parport mailing list