lkml.org 
[lkml]   [2002]   [Jun]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] Serial driver iomem fixes

This patch was written by Alex Williamson. It fixes a few bugs in the
serial driver that are related to iomem. Please apply for 2.4.

diff -urNX ../dontdiff linux-ia64/drivers/char/serial.c linux-generic/drivers/char/serial.c
--- linux-ia64/drivers/char/serial.c Sat May 18 11:58:49 2002
+++ linux-generic/drivers/char/serial.c Tue May 28 09:42:58 2002
@@ -2133,6 +2137,7 @@
if (new_serial.type) {
for (i = 0 ; i < NR_PORTS; i++)
if ((state != &rs_table[i]) &&
+ (rs_table[i].io_type == SERIAL_IO_PORT) &&
(rs_table[i].port == new_port) &&
rs_table[i].type)
return -EADDRINUSE;
@@ -2195,7 +2200,7 @@


check_and_exit:
- if (!state->port || !state->type)
+ if ((!state->port && !state->iomem_base) || !state->type)
return 0;
if (info->flags & ASYNC_INITIALIZED) {
if (((old_state.flags & ASYNC_SPD_MASK) !=
@@ -5486,7 +5652,7 @@
&& (state->port != 0 || state->iomem_base != 0))
state->irq = detect_uart_irq(state);
if (state->io_type == SERIAL_IO_MEM) {
- printk(KERN_INFO"ttyS%02d%s at 0x%px (irq = %d) is a %s\n",
+ printk(KERN_INFO"ttyS%02d%s at 0x%p (irq = %d) is a %s\n",
state->line + SERIAL_DEV_OFFSET,
(state->flags & ASYNC_FOURPORT) ? " FourPort" : "",
state->iomem_base, state->irq,
--
Revolutions do not require corporate support.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:26    [from the cache]
©2003-2011 Jasper Spaans