Hi All,
I found that setserial in serial_core.c does not update all port
variables. It _does_ update the type variable properly but fails to update
the fixfosize that the driver uses. This causes the driver to fail after
setserial to another device i.e. 8250 or 16450.
This patch solves that for the devices which are served by 8250.c. There
is a deeper problem though, setserial does not properly update all port
variables. Maybe the prot drivers should have their own
.setserial entry in the table and handle the details themselves.
--- drivers/serial/8250.c.orig 2007-06-11 20:37:06.000000000 +0200
+++ drivers/serial/8250.c 2007-06-19 14:50:49.000000000 +0200
@@ -1791,8 +1791,6 @@ static int serial8250_startup(struct uar
up->bugs &= ~UART_BUG_TXEN;
}
- spin_unlock_irqrestore(&up->port.lock, flags);
-
/*
* Finally, enable interrupts. Note: Modem status interrupts
* are set via set_termios(), which will be occurring imminently
@@ -1801,6 +1799,8 @@ static int serial8250_startup(struct uar
up->ier = UART_IER_RLSI | UART_IER_RDI;
serial_outp(up, UART_IER, up->ier);
+ spin_unlock_irqrestore(&up->port.lock, flags);
+
if (up->port.flags & UPF_FOURPORT) {
unsigned int icp;
/*
@@ -1830,10 +1830,10 @@ static void serial8250_shutdown(struct u
/*
* Disable interrupts from this port
*/
+ spin_lock_irqsave(&up->port.lock, flags);
up->ier = 0;
serial_outp(up, UART_IER, 0);
- spin_lock_irqsave(&up->port.lock, flags);
if (up->port.flags & UPF_FOURPORT) {
/* reset interrupts on the AST Fourport board */
inb((up->port.iobase & 0xfe0) | 0x1f);
regards
Kees
-
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html