Re: [PATCH] tty/8250_pnp: serial port detection regression since v3.7
Le 2013-03-04 14:28, Sean Young a écrit : Greg, On Fri, Feb 22, 2013 at 04:27:19PM +, Sean Young wrote: The InsydeH2O BIOS (version dated 09/12/2011) has the following in its pnp resouces for its serial ports: $ cat /sys/bus/pnp/devices/00:0b/resources state = active io disabled irq disabled We do not check if the resources are disabled, and create a bogus ttyS* device. Since commit 835d844d1a28e (8250_pnp: do pnp probe before legacy probe) we get a bogus ttyS0, which prevents the legacy probe from detecting it. Would you mind accepting this patch please -- it fixes a regression I introduced in 3.7. Hi Sean, Thanks for the patch, and thanks for re-pushing it :) This is to inform you that the BIOS update referenced : Version: SC24 BIOS V1.01 Release Date: 01/11/2013 Seems to fix "my" tty detection problem on 3.7 (tested on a 3.7.6 Fedora kernel, with success). I don't think the patch will hurt anyway - I believe it still will prevent other users from a regression. I also confirm that the patched 3.8.0 detects its ttys fine on a BIOS-updated system. Regards, Vincent -- Stop chasing shadows, just enjoy the ride Morcheeba -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] tty/8250_pnp: serial port detection regression since v3.7
Le 2013-03-04 14:28, Sean Young a écrit : Greg, On Fri, Feb 22, 2013 at 04:27:19PM +, Sean Young wrote: The InsydeH2O BIOS (version dated 09/12/2011) has the following in its pnp resouces for its serial ports: $ cat /sys/bus/pnp/devices/00:0b/resources state = active io disabled irq disabled We do not check if the resources are disabled, and create a bogus ttyS* device. Since commit 835d844d1a28e (8250_pnp: do pnp probe before legacy probe) we get a bogus ttyS0, which prevents the legacy probe from detecting it. Would you mind accepting this patch please -- it fixes a regression I introduced in 3.7. Hi Sean, Thanks for the patch, and thanks for re-pushing it :) This is to inform you that the BIOS update referenced : Version: SC24 BIOS V1.01 Release Date: 01/11/2013 Seems to fix my tty detection problem on 3.7 (tested on a 3.7.6 Fedora kernel, with success). I don't think the patch will hurt anyway - I believe it still will prevent other users from a regression. I also confirm that the patched 3.8.0 detects its ttys fine on a BIOS-updated system. Regards, Vincent -- Stop chasing shadows, just enjoy the ride Morcheeba -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] tty/8250_pnp: serial port detection regression since v3.7
Greg, On Fri, Feb 22, 2013 at 04:27:19PM +, Sean Young wrote: > The InsydeH2O BIOS (version dated 09/12/2011) has the following in > its pnp resouces for its serial ports: > > $ cat /sys/bus/pnp/devices/00:0b/resources > state = active > io disabled > irq disabled > > We do not check if the resources are disabled, and create a bogus > ttyS* device. Since commit 835d844d1a28e (8250_pnp: do pnp probe > before legacy probe) we get a bogus ttyS0, which prevents the legacy > probe from detecting it. Would you mind accepting this patch please -- it fixes a regression I introduced in 3.7. Thanks, Sean > Reported-by: Vincent Deffontaines > Tested-by: Vincent Deffontaines > Signed-off-by: Sean Young > Cc: sta...@vger.kernel.org > --- > drivers/tty/serial/8250/8250_pnp.c | 12 +++- > 1 files changed, 7 insertions(+), 5 deletions(-) > > diff --git a/drivers/tty/serial/8250/8250_pnp.c > b/drivers/tty/serial/8250/8250_pnp.c > index 35d9ab9..b3455a9 100644 > --- a/drivers/tty/serial/8250/8250_pnp.c > +++ b/drivers/tty/serial/8250/8250_pnp.c > @@ -429,6 +429,7 @@ 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); > @@ -439,11 +440,12 @@ serial_pnp_probe(struct pnp_dev *dev, const struct > pnp_device_id *dev_id) > memset(, 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)) { > - 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); > + 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; > uart.port.iotype = UPIO_PORT; > } else if (pnp_mem_valid(dev, 0)) { > uart.port.mapbase = pnp_mem_start(dev, 0); > -- > 1.7.2.5 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-serial" in > the body of a message to majord...@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] tty/8250_pnp: serial port detection regression since v3.7
Greg, On Fri, Feb 22, 2013 at 04:27:19PM +, Sean Young wrote: The InsydeH2O BIOS (version dated 09/12/2011) has the following in its pnp resouces for its serial ports: $ cat /sys/bus/pnp/devices/00:0b/resources state = active io disabled irq disabled We do not check if the resources are disabled, and create a bogus ttyS* device. Since commit 835d844d1a28e (8250_pnp: do pnp probe before legacy probe) we get a bogus ttyS0, which prevents the legacy probe from detecting it. Would you mind accepting this patch please -- it fixes a regression I introduced in 3.7. Thanks, Sean Reported-by: Vincent Deffontaines vinc...@gryzor.com Tested-by: Vincent Deffontaines vinc...@gryzor.com Signed-off-by: Sean Young s...@mess.org Cc: sta...@vger.kernel.org --- drivers/tty/serial/8250/8250_pnp.c | 12 +++- 1 files changed, 7 insertions(+), 5 deletions(-) diff --git a/drivers/tty/serial/8250/8250_pnp.c b/drivers/tty/serial/8250/8250_pnp.c index 35d9ab9..b3455a9 100644 --- a/drivers/tty/serial/8250/8250_pnp.c +++ b/drivers/tty/serial/8250/8250_pnp.c @@ -429,6 +429,7 @@ 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); @@ -439,11 +440,12 @@ 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)) { - 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); + 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; uart.port.iotype = UPIO_PORT; } else if (pnp_mem_valid(dev, 0)) { uart.port.mapbase = pnp_mem_start(dev, 0); -- 1.7.2.5 -- To unsubscribe from this list: send the line unsubscribe linux-serial in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] tty/8250_pnp: serial port detection regression since v3.7
The InsydeH2O BIOS (version dated 09/12/2011) has the following in its pnp resouces for its serial ports: $ cat /sys/bus/pnp/devices/00:0b/resources state = active io disabled irq disabled We do not check if the resources are disabled, and create a bogus ttyS* device. Since commit 835d844d1a28e (8250_pnp: do pnp probe before legacy probe) we get a bogus ttyS0, which prevents the legacy probe from detecting it. Reported-by: Vincent Deffontaines Tested-by: Vincent Deffontaines Signed-off-by: Sean Young Cc: sta...@vger.kernel.org --- drivers/tty/serial/8250/8250_pnp.c | 12 +++- 1 files changed, 7 insertions(+), 5 deletions(-) diff --git a/drivers/tty/serial/8250/8250_pnp.c b/drivers/tty/serial/8250/8250_pnp.c index 35d9ab9..b3455a9 100644 --- a/drivers/tty/serial/8250/8250_pnp.c +++ b/drivers/tty/serial/8250/8250_pnp.c @@ -429,6 +429,7 @@ 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); @@ -439,11 +440,12 @@ serial_pnp_probe(struct pnp_dev *dev, const struct pnp_device_id *dev_id) memset(, 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)) { - 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); + 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; uart.port.iotype = UPIO_PORT; } else if (pnp_mem_valid(dev, 0)) { uart.port.mapbase = pnp_mem_start(dev, 0); -- 1.7.2.5 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] tty/8250_pnp: serial port detection regression since v3.7
The InsydeH2O BIOS (version dated 09/12/2011) has the following in its pnp resouces for its serial ports: $ cat /sys/bus/pnp/devices/00:0b/resources state = active io disabled irq disabled We do not check if the resources are disabled, and create a bogus ttyS* device. Since commit 835d844d1a28e (8250_pnp: do pnp probe before legacy probe) we get a bogus ttyS0, which prevents the legacy probe from detecting it. Reported-by: Vincent Deffontaines vinc...@gryzor.com Tested-by: Vincent Deffontaines vinc...@gryzor.com Signed-off-by: Sean Young s...@mess.org Cc: sta...@vger.kernel.org --- drivers/tty/serial/8250/8250_pnp.c | 12 +++- 1 files changed, 7 insertions(+), 5 deletions(-) diff --git a/drivers/tty/serial/8250/8250_pnp.c b/drivers/tty/serial/8250/8250_pnp.c index 35d9ab9..b3455a9 100644 --- a/drivers/tty/serial/8250/8250_pnp.c +++ b/drivers/tty/serial/8250/8250_pnp.c @@ -429,6 +429,7 @@ 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); @@ -439,11 +440,12 @@ 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)) { - 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); + 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; uart.port.iotype = UPIO_PORT; } else if (pnp_mem_valid(dev, 0)) { uart.port.mapbase = pnp_mem_start(dev, 0); -- 1.7.2.5 -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/