* Patch 2.4.18-pre9-SERIAL:Address in use error, mem based cards
@ 2002-02-11 9:08 Roman Kurakin
0 siblings, 0 replies; only message in thread
From: Roman Kurakin @ 2002-02-11 9:08 UTC (permalink / raw)
To: linux-kernel
[-- Attachment #1: Type: text/plain, Size: 372 bytes --]
Hi,
I have found a bug. It is in support of serial cards which uses memory
for I/O
insted of ports. I made a patch for serial.c and fix one place, but
probably the
problem like this one could be somewhere else.
Description:
If you try to use setserial with such cards you will get "Address in
use" (-EADDRINUSE)
Best regards,
Kurakin Roman
[-- Attachment #2: serial-2.4.18.pch --]
[-- Type: text/plain, Size: 841 bytes --]
--- 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;
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2002-02-11 9:08 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-02-11 9:08 Patch 2.4.18-pre9-SERIAL:Address in use error, mem based cards Roman Kurakin
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.