2013-06-30 13:47:53

by Stefan Seyfried

[permalink] [raw]
Subject: commit 8d2f8cd424 breaks parallel port, regression since 3.9-rc3 / backported to stable (3.4.37)

Hi all,

the following commit:

commit 8d2f8cd424ca0b99001f3ff4f5db87c4e525f366
Author: Wang YanQing <[email protected]>
Date: Fri Mar 1 11:47:20 2013 +0800

serial: 8250_pci: add support for another kind of NetMos Technology PCI 9835 Multi-I/O Controller

01:08.0 Communication controller: NetMos Technology PCI 9835 Multi-I/O Controller (rev 01)
Subsystem: Device [1000:0012]
Control: I/O+ Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
Status: Cap- 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
Interrupt: pin A routed to IRQ 20
Region 0: I/O ports at e050 [size=8]
Region 1: I/O ports at e040 [size=8]
Region 2: I/O ports at e030 [size=8]
Region 3: I/O ports at e020 [size=8]
Region 4: I/O ports at e010 [size=8]
Region 5: I/O ports at e000 [size=16]

Signed-off-by: Wang YanQing <[email protected]>
Cc: stable <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>


breaks my
05:05.0 Communication controller: NetMos Technology PCI 9835 Multi-I/O Controller (rev 01)
05:05.0 0780: 9710:9835 (rev 01)
Subsystem: 1000:0012

which has two serial and one parallel port, driven by parport_serial.

The reason is, that this commit adds the PCI ID to 8250_pci, when it
was handled by parport_serial before.
In my case (openSUSE kernel), 8250 is built in and parport_serial is
built as a module. Unfortunately with the device occupied by 8250,
parport_serial finds no device and thus does not drive the parport.

I bisected this in the stable series after the openSUSE kernel update
(which pulled in the stable kernel update) broke my printing.

Actually the above commit is totally unnecessary: the serial ports
work very well without it, they are just driven by another driver.

Can this please be reverted? I can't see which problem it solves, but
it definitely breaks the additional ports on my multi-i/o board.

Best regards,

Stefan
--
Stefan Seyfried
Linux Consultant & Developer -- GPG Key: 0x731B665B

B1 Systems GmbH
Osterfeldstraße 7 / 85088 Vohburg / http://www.b1-systems.de
GF: Ralph Dehner / Unternehmenssitz: Vohburg / AG: Ingolstadt,HRB 3537


2013-06-30 16:01:41

by Greg KH

[permalink] [raw]
Subject: Re: commit 8d2f8cd424 breaks parallel port, regression since 3.9-rc3 / backported to stable (3.4.37)

On Sun, Jun 30, 2013 at 03:47:44PM +0200, Stefan Seyfried wrote:
> Hi all,
>
> the following commit:
>
> commit 8d2f8cd424ca0b99001f3ff4f5db87c4e525f366
> Author: Wang YanQing <[email protected]>
> Date: Fri Mar 1 11:47:20 2013 +0800
>
> serial: 8250_pci: add support for another kind of NetMos Technology PCI 9835 Multi-I/O Controller
>
> 01:08.0 Communication controller: NetMos Technology PCI 9835 Multi-I/O Controller (rev 01)
> Subsystem: Device [1000:0012]
> Control: I/O+ Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
> Status: Cap- 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
> Interrupt: pin A routed to IRQ 20
> Region 0: I/O ports at e050 [size=8]
> Region 1: I/O ports at e040 [size=8]
> Region 2: I/O ports at e030 [size=8]
> Region 3: I/O ports at e020 [size=8]
> Region 4: I/O ports at e010 [size=8]
> Region 5: I/O ports at e000 [size=16]
>
> Signed-off-by: Wang YanQing <[email protected]>
> Cc: stable <[email protected]>
> Signed-off-by: Greg Kroah-Hartman <[email protected]>
>
>
> breaks my
> 05:05.0 Communication controller: NetMos Technology PCI 9835 Multi-I/O Controller (rev 01)
> 05:05.0 0780: 9710:9835 (rev 01)
> Subsystem: 1000:0012
>
> which has two serial and one parallel port, driven by parport_serial.
>
> The reason is, that this commit adds the PCI ID to 8250_pci, when it
> was handled by parport_serial before.
> In my case (openSUSE kernel), 8250 is built in and parport_serial is
> built as a module. Unfortunately with the device occupied by 8250,
> parport_serial finds no device and thus does not drive the parport.
>
> I bisected this in the stable series after the openSUSE kernel update
> (which pulled in the stable kernel update) broke my printing.
>
> Actually the above commit is totally unnecessary: the serial ports
> work very well without it, they are just driven by another driver.
>
> Can this please be reverted? I can't see which problem it solves, but
> it definitely breaks the additional ports on my multi-i/o board.

Thanks for pointing this out, I missed the fact that parport_serial was
already controlling this device. I'll revert it and get it into the
stable trees after it hits Linus's tree (probably next week some time.)

thanks,

greg k-h

2013-07-01 07:15:22

by Stefan Seyfried

[permalink] [raw]
Subject: 8250_pci: improve code comments and Kconfig help

Hi Greg,

in order to avoid such regressions in the future, a comment in
the source and a note in the Kconfig help text might be useful

This patch is against
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty.git tty-next

Best regards,

Stefan

--
Stefan Seyfried
Linux Consultant & Developer -- GPG Key: 0x731B665B

B1 Systems GmbH
Osterfeldstraße 7 / 85088 Vohburg / http://www.b1-systems.de
GF: Ralph Dehner / Unternehmenssitz: Vohburg / AG: Ingolstadt,HRB 3537

2013-07-01 07:15:34

by Stefan Seyfried

[permalink] [raw]
Subject: [PATCH] 8250_pci: improve code comments and Kconfig help

From: Stefan Seyfried <[email protected]>

The recent regression about NetMos 9835 Multi-I/O boards indicates
that comment pointing to the parport_serial driver could be helpful.

Signed-off-by: Stefan Seyfried <[email protected]>
---
drivers/tty/serial/8250/8250_pci.c | 6 ++++++
drivers/tty/serial/8250/Kconfig | 2 ++
2 files changed, 8 insertions(+)

diff --git a/drivers/tty/serial/8250/8250_pci.c b/drivers/tty/serial/8250/8250_pci.c
index c52948b..c626c4f 100644
--- a/drivers/tty/serial/8250/8250_pci.c
+++ b/drivers/tty/serial/8250/8250_pci.c
@@ -4797,6 +4797,12 @@ static struct pci_device_id serial_pci_tbl[] = {
PCI_VENDOR_ID_IBM, 0x0299,
0, 0, pbn_b0_bt_2_115200 },

+ /*
+ * other NetMos 9835 devices are most likely handled by the
+ * parport_serial driver, check drivers/parport/parport_serial.c
+ * before adding them here.
+ */
+
{ PCI_VENDOR_ID_NETMOS, PCI_DEVICE_ID_NETMOS_9901,
0xA000, 0x1000,
0, 0, pbn_b0_1_115200 },
diff --git a/drivers/tty/serial/8250/Kconfig b/drivers/tty/serial/8250/Kconfig
index a1ba94d..f3b306e 100644
--- a/drivers/tty/serial/8250/Kconfig
+++ b/drivers/tty/serial/8250/Kconfig
@@ -116,6 +116,8 @@ config SERIAL_8250_PCI
This builds standard PCI serial support. You may be able to
disable this feature if you only need legacy serial support.
Saves about 9K.
+ Note that serial ports on NetMos 9835 Multi-I/O cards are handled
+ by the parport_serial driver, enabled with CONFIG_PARPORT_SERIAL.

config SERIAL_8250_HP300
tristate
--
1.8.3.1