* [patch] serial: compare mapbase and not membase in find_port
@ 2006-01-01 15:12 Gyorgy Jeney
2006-01-04 18:12 ` Russell King
0 siblings, 1 reply; 2+ messages in thread
From: Gyorgy Jeney @ 2006-01-01 15:12 UTC (permalink / raw)
To: rmk+serial; +Cc: linux-serial, Bjorn Helgaas, linux-kernel
From: Gyorgy Jeney
If the 8250_early driver uses bt_ioremap, find_port() is unable to find the
correct device since the address returned by ioremap is different to that
returned by bt_ioremap for the same address. Since no more than one device
occupies the same physical address, compareing the physical addresses should
be safe.
Signed-off-by: Gyorgy Jeney <nog.lkml@gmail.com>
nog.
--- drivers/serial/8250.c 2005-10-28 02:02:08.000000000 +0200
+++ ../../linux-2.6.14/drivers/serial/8250.c 2006-01-01 10:27:39.000000000 +0100
@@ -2229,7 +2229,7 @@ static int __init find_port(struct uart_
port = &serial8250_ports[line].port;
if (p->iotype == port->iotype &&
p->iobase == port->iobase &&
- p->membase == port->membase)
+ p->mapbase == port->mapbase)
return line;
}
return -ENODEV;
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [patch] serial: compare mapbase and not membase in find_port
2006-01-01 15:12 [patch] serial: compare mapbase and not membase in find_port Gyorgy Jeney
@ 2006-01-04 18:12 ` Russell King
0 siblings, 0 replies; 2+ messages in thread
From: Russell King @ 2006-01-04 18:12 UTC (permalink / raw)
To: Gyorgy Jeney; +Cc: linux-serial, Bjorn Helgaas, linux-kernel
On Sun, Jan 01, 2006 at 04:12:31PM +0100, Gyorgy Jeney wrote:
> From: Gyorgy Jeney
>
> If the 8250_early driver uses bt_ioremap, find_port() is unable to find the
> correct device since the address returned by ioremap is different to that
> returned by bt_ioremap for the same address. Since no more than one device
> occupies the same physical address, compareing the physical addresses should
> be safe.
Really, this should be using uart_match_port(). Fixed to use that.
(And in combination with Ben's patch from November time, it works out
to do the right thing.)
--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of: 2.6 Serial core
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-01-04 18:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-01-01 15:12 [patch] serial: compare mapbase and not membase in find_port Gyorgy Jeney
2006-01-04 18:12 ` Russell King
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).