aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty/serial/8250
diff options
context:
space:
mode:
authorSean Young <sean@mess.org>2013-04-07 15:47:18 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-04-08 14:30:04 -0400
commitc12f9ea28e9fbe7b1f4cefc953bee33298370683 (patch)
tree914490bb91ef1ab8c9cd5081940e6a4ae9337d7e /drivers/tty/serial/8250
parent1f66396682a0be92e1c141bff4b006d7654832e1 (diff)
Revert "tty/8250_pnp: serial port detection regression since v3.7"
This reverts commit 77e372a3d82e5e4878ce1962207edd766773cc76. Checking for disabled resources board breaks detection pnp on another board "AMI UEFI implementation (Version: 0406 Release Date: 06/06/2012)". I'm working with the reporter of the original bug to write and test a better fix. https://bugzilla.redhat.com/show_bug.cgi?id=928246 Signed-off-by: Sean Young <sean@mess.org> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial/8250')
-rw-r--r--drivers/tty/serial/8250/8250_pnp.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/tty/serial/8250/8250_pnp.c b/drivers/tty/serial/8250/8250_pnp.c
index b3455a970a1d..35d9ab95c5cb 100644
--- a/drivers/tty/serial/8250/8250_pnp.c
+++ b/drivers/tty/serial/8250/8250_pnp.c
@@ -429,7 +429,6 @@ serial_pnp_probe(struct pnp_dev *dev, const struct pnp_device_id *dev_id)
429{ 429{
430 struct uart_8250_port uart; 430 struct uart_8250_port uart;
431 int ret, line, flags = dev_id->driver_data; 431 int ret, line, flags = dev_id->driver_data;
432 struct resource *res = NULL;
433 432
434 if (flags & UNKNOWN_DEV) { 433 if (flags & UNKNOWN_DEV) {
435 ret = serial_pnp_guess_board(dev); 434 ret = serial_pnp_guess_board(dev);
@@ -440,12 +439,11 @@ serial_pnp_probe(struct pnp_dev *dev, const struct pnp_device_id *dev_id)
440 memset(&uart, 0, sizeof(uart)); 439 memset(&uart, 0, sizeof(uart));
441 if (pnp_irq_valid(dev, 0)) 440 if (pnp_irq_valid(dev, 0))
442 uart.port.irq = pnp_irq(dev, 0); 441 uart.port.irq = pnp_irq(dev, 0);
443 if ((flags & CIR_PORT) && pnp_port_valid(dev, 2)) 442 if ((flags & CIR_PORT) && pnp_port_valid(dev, 2)) {
444 res = pnp_get_resource(dev, IORESOURCE_IO, 2); 443 uart.port.iobase = pnp_port_start(dev, 2);
445 else if (pnp_port_valid(dev, 0)) 444 uart.port.iotype = UPIO_PORT;
446 res = pnp_get_resource(dev, IORESOURCE_IO, 0); 445 } else if (pnp_port_valid(dev, 0)) {
447 if (pnp_resource_enabled(res)) { 446 uart.port.iobase = pnp_port_start(dev, 0);
448 uart.port.iobase = res->start;
449 uart.port.iotype = UPIO_PORT; 447 uart.port.iotype = UPIO_PORT;
450 } else if (pnp_mem_valid(dev, 0)) { 448 } else if (pnp_mem_valid(dev, 0)) {
451 uart.port.mapbase = pnp_mem_start(dev, 0); 449 uart.port.mapbase = pnp_mem_start(dev, 0);