Commit 38f1bfa6 authored by David S. Miller's avatar David S. Miller Committed by Linus Torvalds

[SPARC64]: Fix IRQ setting in sunsu serial driver.

up->irq was just duplicating up->port.irq so
delete the former and only use the latter.  We
were not initializing up->port.irq so this would
cause port shutdown crashes when synchronize_irq()
was called.

Based upon a bug report and patch from
RChan <rspchan@starhub.net.sg>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 611c94d1
......@@ -95,7 +95,6 @@ struct uart_sunsu_port {
enum su_type su_type;
unsigned int type_probed; /* XXX Stupid */
int port_node;
unsigned int irq;
#ifdef CONFIG_SERIO
struct serio *serio;
......@@ -684,14 +683,14 @@ static int sunsu_startup(struct uart_port *port)
}
if (up->su_type != SU_PORT_PORT) {
retval = request_irq(up->irq, sunsu_kbd_ms_interrupt,
retval = request_irq(up->port.irq, sunsu_kbd_ms_interrupt,
SA_SHIRQ, su_typev[up->su_type], up);
} else {
retval = request_irq(up->irq, sunsu_serial_interrupt,
retval = request_irq(up->port.irq, sunsu_serial_interrupt,
SA_SHIRQ, su_typev[up->su_type], up);
}
if (retval) {
printk("su: Cannot register IRQ %d\n", up->irq);
printk("su: Cannot register IRQ %d\n", up->port.irq);
return retval;
}
......@@ -779,7 +778,7 @@ static void sunsu_shutdown(struct uart_port *port)
*/
(void) serial_in(up, UART_RX);
free_irq(up->irq, up);
free_irq(up->port.irq, up);
}
static void
......@@ -1078,7 +1077,7 @@ static void sunsu_autoconfig(struct uart_sunsu_port *up)
* This is correct on both architectures.
*/
up->port.mapbase = dev->resource[0].start;
up->irq = dev->irqs[0];
up->port.irq = dev->irqs[0];
goto ebus_done;
}
}
......@@ -1091,7 +1090,7 @@ static void sunsu_autoconfig(struct uart_sunsu_port *up)
/* Same on sparc64. Cool architecure... */
up->port.membase = (char *) isa_dev->resource.start;
up->port.mapbase = isa_dev->resource.start;
up->irq = isa_dev->irq;
up->port.irq = isa_dev->irq;
goto ebus_done;
}
}
......@@ -1133,7 +1132,7 @@ static void sunsu_autoconfig(struct uart_sunsu_port *up)
/*
* There is no intr property on MrCoffee, so hardwire it.
*/
up->irq = IRQ_4M(13);
up->port.irq = IRQ_4M(13);
#endif
ebus_done:
......@@ -1303,7 +1302,7 @@ static int __init sunsu_kbd_ms_init(struct uart_sunsu_port *up, int channel)
printk(KERN_INFO "su%d at 0x%p (irq = %s) is a %s\n",
channel,
up->port.membase, __irq_itoa(up->irq),
up->port.membase, __irq_itoa(up->port.irq),
sunsu_type(&up->port));
#ifdef CONFIG_SERIO
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment