From: Sergei Shtylyov <sshtylyov@ru.mvista.com>
To: rmk+serial@arm.linux.org.uk
Cc: tie-fei.zang@freescale.com, linux-serial@vger.kernel.org
Subject: [PATCH] 8250 resourse management fixes
Date: Sat, 09 Sep 2006 22:23:56 +0400 [thread overview]
Message-ID: <450306BC.8050408@ru.mvista.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 340 bytes --]
I think register ranges obviously need to be claimed/released for all UARTs
including those with UPIO_MEM32 and UPIO_TSI iotype.
Also, serial8250_request_rsa_resources() returns false positives with
UPIO_MEM32, UPIO_AU, and UPIO_TSI iotype -- I don't think this makes any sense.
Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
[-- Attachment #2: 8250-resource-management-fixes.patch --]
[-- Type: text/plain, Size: 1367 bytes --]
Index: linux-mips/drivers/serial/8250.c
===================================================================
--- linux-mips.orig/drivers/serial/8250.c
+++ linux-mips/drivers/serial/8250.c
@@ -1949,6 +1949,8 @@ static int serial8250_request_std_resour
case UPIO_AU:
size = 0x100000;
/* fall thru */
+ case UPIO_TSI:
+ case UPIO_MEM32:
case UPIO_MEM:
if (!up->port.mapbase)
break;
@@ -1984,6 +1986,8 @@ static void serial8250_release_std_resou
case UPIO_AU:
size = 0x100000;
/* fall thru */
+ case UPIO_TSI:
+ case UPIO_MEM32:
case UPIO_MEM:
if (!up->port.mapbase)
break;
@@ -2007,17 +2011,15 @@ static int serial8250_request_rsa_resour
{
unsigned long start = UART_RSA_BASE << up->port.regshift;
unsigned int size = 8 << up->port.regshift;
- int ret = 0;
+ int ret = -EINVAL;
switch (up->port.iotype) {
- case UPIO_MEM:
- ret = -EINVAL;
- break;
-
case UPIO_HUB6:
case UPIO_PORT:
start += up->port.iobase;
- if (!request_region(start, size, "serial-rsa"))
+ if (request_region(start, size, "serial-rsa"))
+ ret = 0;
+ else
ret = -EBUSY;
break;
}
@@ -2031,9 +2033,6 @@ static void serial8250_release_rsa_resou
unsigned int size = 8 << up->port.regshift;
switch (up->port.iotype) {
- case UPIO_MEM:
- break;
-
case UPIO_HUB6:
case UPIO_PORT:
release_region(up->port.iobase + offset, size);
reply other threads:[~2006-09-09 18:21 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=450306BC.8050408@ru.mvista.com \
--to=sshtylyov@ru.mvista.com \
--cc=linux-serial@vger.kernel.org \
--cc=rmk+serial@arm.linux.org.uk \
--cc=tie-fei.zang@freescale.com \
/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 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.