* [RFC patch] fallback to "no irq" hack for case of no pnp_irq allocated for 8250_pnp
@ 2007-10-17 2:50 Luming Yu
2007-10-17 4:40 ` Matthew Wilcox
2007-10-17 10:49 ` Alan Cox
0 siblings, 2 replies; 3+ messages in thread
From: Luming Yu @ 2007-10-17 2:50 UTC (permalink / raw)
To: linux-ia64; +Cc: linux-kernel
[-- Attachment #1: Type: text/plain, Size: 503 bytes --]
Hello list,
There is a "ttyS1 irq is -1" problem observed on tiger4 which cause
the serial port broken.
It is because that there is __no__ ACPI IRQ resource assigned for the
serial port. So the value of the IRQ for the port is never changed
since it got initialized to -1. The attached patch falls back to the
"no irq" hack for this case. It works for me. Please review and test.
Thanks,
Luming
Signed-off-by: Yu Luming <luming.yu@intel.com>
8250_pnp.c | 3 +++
1 files changed, 3 insertions(+)
[-- Attachment #2: 8250_pnp.patch --]
[-- Type: application/octet-stream, Size: 451 bytes --]
--- 2.6/drivers/serial/8250_pnp.c.orig 2007-10-16 14:18:19.000000000 +0800
+++ 2.6/drivers/serial/8250_pnp.c 2007-10-16 14:18:30.000000000 +0800
@@ -431,6 +431,9 @@
memset(&port, 0, sizeof(struct uart_port));
port.irq = pnp_irq(dev, 0);
+ /* No irq is assigned for the port, fallback to "no irq" hack */
+ if (port.irq == -1)
+ port.irq = 0;
if (pnp_port_valid(dev, 0)) {
port.iobase = pnp_port_start(dev, 0);
port.iotype = UPIO_PORT;
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [RFC patch] fallback to "no irq" hack for case of no pnp_irq allocated for 8250_pnp
2007-10-17 2:50 [RFC patch] fallback to "no irq" hack for case of no pnp_irq allocated for 8250_pnp Luming Yu
@ 2007-10-17 4:40 ` Matthew Wilcox
2007-10-17 10:49 ` Alan Cox
1 sibling, 0 replies; 3+ messages in thread
From: Matthew Wilcox @ 2007-10-17 4:40 UTC (permalink / raw)
To: Luming Yu; +Cc: linux-ia64, linux-kernel
On Wed, Oct 17, 2007 at 10:50:53AM +0800, Luming Yu wrote:
> There is a "ttyS1 irq is -1" problem observed on tiger4 which cause
> the serial port broken.
> It is because that there is __no__ ACPI IRQ resource assigned for the
> serial port. So the value of the IRQ for the port is never changed
> since it got initialized to -1. The attached patch falls back to the
> "no irq" hack for this case. It works for me. Please review and test.
Seems reasonable to me. Although arguably pnp_irq is broken, since
Linus has decreed that 0 means no irq on Linux.
--
Intel are signing my paycheques ... these opinions are still mine
"Bill, look, we understand that you're interested in selling us this
operating system, but compare it to ours. We can't possibly take such
a retrograde step."
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [RFC patch] fallback to "no irq" hack for case of no pnp_irq allocated for 8250_pnp
2007-10-17 2:50 [RFC patch] fallback to "no irq" hack for case of no pnp_irq allocated for 8250_pnp Luming Yu
2007-10-17 4:40 ` Matthew Wilcox
@ 2007-10-17 10:49 ` Alan Cox
1 sibling, 0 replies; 3+ messages in thread
From: Alan Cox @ 2007-10-17 10:49 UTC (permalink / raw)
To: Luming Yu; +Cc: linux-ia64, linux-kernel
> Signed-off-by: Yu Luming <luming.yu@intel.com>
>
> 8250_pnp.c | 3 +++
> 1 files changed, 3 insertions(+)
Should really fix pnp_irq() to use zero to mean none as the kernel
intends. If that causes other complications then this hack will do for
now I guess.
Alan
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-10-17 10:46 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-17 2:50 [RFC patch] fallback to "no irq" hack for case of no pnp_irq allocated for 8250_pnp Luming Yu
2007-10-17 4:40 ` Matthew Wilcox
2007-10-17 10:49 ` Alan Cox
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox