mirror of
https://github.com/FEX-Emu/linux.git
synced 2024-12-28 12:25:31 +00:00
Revert "tty/8250_pnp: serial port detection regression since v3.7"
This reverts commit 77e372a3d8
.
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>
This commit is contained in:
parent
1f66396682
commit
c12f9ea28e
@ -429,7 +429,6 @@ serial_pnp_probe(struct pnp_dev *dev, const struct pnp_device_id *dev_id)
|
||||
{
|
||||
struct uart_8250_port uart;
|
||||
int ret, line, flags = dev_id->driver_data;
|
||||
struct resource *res = NULL;
|
||||
|
||||
if (flags & UNKNOWN_DEV) {
|
||||
ret = serial_pnp_guess_board(dev);
|
||||
@ -440,12 +439,11 @@ serial_pnp_probe(struct pnp_dev *dev, const struct pnp_device_id *dev_id)
|
||||
memset(&uart, 0, sizeof(uart));
|
||||
if (pnp_irq_valid(dev, 0))
|
||||
uart.port.irq = pnp_irq(dev, 0);
|
||||
if ((flags & CIR_PORT) && pnp_port_valid(dev, 2))
|
||||
res = pnp_get_resource(dev, IORESOURCE_IO, 2);
|
||||
else if (pnp_port_valid(dev, 0))
|
||||
res = pnp_get_resource(dev, IORESOURCE_IO, 0);
|
||||
if (pnp_resource_enabled(res)) {
|
||||
uart.port.iobase = res->start;
|
||||
if ((flags & CIR_PORT) && pnp_port_valid(dev, 2)) {
|
||||
uart.port.iobase = pnp_port_start(dev, 2);
|
||||
uart.port.iotype = UPIO_PORT;
|
||||
} else if (pnp_port_valid(dev, 0)) {
|
||||
uart.port.iobase = pnp_port_start(dev, 0);
|
||||
uart.port.iotype = UPIO_PORT;
|
||||
} else if (pnp_mem_valid(dev, 0)) {
|
||||
uart.port.mapbase = pnp_mem_start(dev, 0);
|
||||
|
Loading…
Reference in New Issue
Block a user