2002-02-22 16:47:35

by Roman Kurakin

[permalink] [raw]
Subject: [Fwd: Patch 2.4.18-pre9-SERIAL:Address in use error, mem based cards]

--- serial.c.orig Mon Feb 11 11:54:21 2002
+++ serial.c Mon Feb 11 11:55:44 2002
@@ -2084,6 +2084,7 @@
unsigned int i,change_irq,change_port;
int retval = 0;
unsigned long new_port;
+ unsigned long new_mem;

if (copy_from_user(&new_serial,new_info,sizeof(new_serial)))
return -EFAULT;
@@ -2094,6 +2095,8 @@
if (HIGH_BITS_OFFSET)
new_port += (unsigned long) new_serial.port_high << HIGH_BITS_OFFSET;

+ new_mem = new_serial.iomem_base;
+
change_irq = new_serial.irq != state->irq;
change_port = (new_port != ((int) state->port)) ||
(new_serial.hub6 != state->hub6);
@@ -2134,6 +2137,7 @@
for (i = 0 ; i < NR_PORTS; i++)
if ((state != &rs_table[i]) &&
(rs_table[i].port == new_port) &&
+ (rs_table[i].iomem_base == new_mem) &&
rs_table[i].type)
return -EADDRINUSE;
}


Attachments:
serial-2.4.18-1.pch (842.00 B)