From: Roman Kurakin <rik@cronyx.ru>
To: marcelo@conectiva.com.br
Cc: linux-kernel@vger.kernel.org
Subject: [Fwd: Patch 2.4.18-pre9-SERIAL:Address in use error, mem based cards]
Date: Fri, 22 Feb 2002 19:47:40 +0300 [thread overview]
Message-ID: <3C76762C.1010606@cronyx.ru> (raw)
[-- Attachment #1: Type: text/plain, Size: 1538 bytes --]
On Wed, Nov 14, 2001 at 01:02:47PM +0300, Roman Kurakin wrote:
>> 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.
>
I've got this fish caught in the my serial driver rewrite - the driver
always handles the requesting and freeing of the resources. If it is
unable to request the resources, then you will receive a suitable error
when trying to configure two ports.
Please note that I'm not about to take on maintainence of the current
serial.c driver, except where I spot obvious bugs.
I'd recommend that you pass this one to Marcelo to incorporate (only
after he's got his feet on the ground again. 8)) It looks sensible.
--
Russell King (rmk@arm.linux.org.uk) The developer of ARM Linux
http://www.arm.linux.org.uk/personal/aboutme.html
-------- Original Message --------
Subject: Patch 2.4.18-pre9-SERIAL:Address in use error, mem based cards
Date: Mon, 11 Feb 2002 12:08:07 +0300
From: Roman Kurakin <rik@cronyx.ru>
To: linux-kernel@vger.kernel.org
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-1.pch --]
[-- Type: text/plain, Size: 842 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;
}
reply other threads:[~2002-02-22 16:47 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3C76762C.1010606@cronyx.ru \
--to=rik@cronyx.ru \
--cc=linux-kernel@vger.kernel.org \
--cc=marcelo@conectiva.com.br \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox