From: Jose Alonso <alonso@estadao.com.br>
To: linux-kernel@vger.kernel.org
Subject: pcmcia/serial release of memory I/O twice
Date: Tue, 09 Mar 2004 13:09:10 -0300 [thread overview]
Message-ID: <1078848549.3230.18.camel@laptop> (raw)
I am using a pcmcia modem (linux-2.6.3) and when I unplug the
card the kernel warns:
"kernel: Trying to free nonexistent resource <000003e8-000003ef>"
The allocation of I/O address is done in:
module serial_cs:
simple_config:
pcmcia_request_io ---> allocate I/O address
setup_serial ... serial8250_request_port ---> doesn't allocate I/O
(UPF_RESOURCES is not set)
The release of I/O address is done in:
module serial_cs:
serial_remove:
unregister_serial ... serial8250_release_port ---> release I/O
pcmcia_release_io ---> release again the I/O
I suggest the patch bellow:
--- drivers/serial/8250.c.ORIG 2004-02-18 00:57:14.000000000 -0300
+++ drivers/serial/8250.c 2004-02-27 13:31:41.000000000 -0300
@@ -1670,6 +1670,8 @@
struct uart_8250_port *up = (struct uart_8250_port *)port;
unsigned long start, offset = 0, size = 0;
+ if (!(up->port.flags & UPF_RESOURCES))
+ return;
if (up->port.type == PORT_RSA) {
offset = UART_RSA_BASE << up->port.regshift;
size = 8;
--
alonso
reply other threads:[~2004-03-09 16:09 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=1078848549.3230.18.camel@laptop \
--to=alonso@estadao.com.br \
--cc=linux-kernel@vger.kernel.org \
/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
all inboxes | Powered by JetHome®