Skip to contentSkip to conversation

PCI: quirks, don't mark one netmos as class other

PATCH Applied Jiri Slaby 3 participants 8 messages Dec 8, 2008 – Feb 13, 2009

Subsystems (2)
lore
Share & tools
lore
author
#1 lore raw

PATCH 2/2 8250_pci: add support for netmos 9835

In reply to Jiri Slaby
---
 drivers/serial/8250_pci.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
drivers/serial/8250_pci.c +8 -0
index 1948c81..766cfac 100644
@@ -600,6 +600,10 @@ static int pci_netmos_init(struct pci_dev *dev)
 	/* subdevice 0x00PS means <P> parallel, <S> serial */
 	unsigned int num_serial = dev->subsystem_device & 0xf;
 
+	if (dev->subsystem_vendor == PCI_VENDOR_ID_IBM &&
+			dev->subsystem_device == 0x0299)
+		return 0;
+
 	if (num_serial == 0)
 		return -ENODEV;
 	return num_serial;
@@ -3091,6 +3095,10 @@ static struct pci_device_id serial_pci_tbl[] = {
 		0,
 		pbn_b0_8_115200 },
 
+	{	PCI_VENDOR_ID_NETMOS, PCI_DEVICE_ID_NETMOS_9835,
+		PCI_VENDOR_ID_IBM, 0x0299,
+		0, 0, pbn_b0_bt_2_115200 },
+
 	/*
 	 * These entries match devices with class COMMUNICATION_SERIAL,
 	 * COMMUNICATION_MODEM or COMMUNICATION_MULTISERIAL
Signature · 1 line
1.6.0.5

Jiri Slaby

author
#0 lore raw

PATCH 1/2 PCI: quirks, don't mark one netmos as class other

Let it as serial, since it doesn't have subdevice in the form of 0x00PS.

---
 drivers/pci/quirks.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
drivers/pci/quirks.c +5 -1
index 400d868..4d42c16 100644
@@ -1585,9 +1585,13 @@ static void __devinit quirk_netmos(struct pci_dev *dev)
 	 * of parallel ports and <S> is the number of serial ports.
 	 */
 	switch (dev->device) {
+	case PCI_DEVICE_ID_NETMOS_9835:
+		/* Well, this rule doesn't hold for the following 9835 device */
+		if (dev->subsystem_vendor == PCI_VENDOR_ID_IBM &&
+				dev->subsystem_device == 0x0299)
+			return;
 	case PCI_DEVICE_ID_NETMOS_9735:
 	case PCI_DEVICE_ID_NETMOS_9745:
-	case PCI_DEVICE_ID_NETMOS_9835:
 	case PCI_DEVICE_ID_NETMOS_9845:
 	case PCI_DEVICE_ID_NETMOS_9855:
 		if ((dev->class >> 8) == PCI_CLASS_COMMUNICATION_SERIAL &&
Signature · 1 line
1.6.0.5
author
#2 lore raw

PATCH 2/2 8250_pci: add support for netmos 9835

In reply to Jiri Slaby

Most of netmos 9835 hardware is handled by parport-serial. IBM introduces a device which doesn't have any parallel ports and have screwed subdevice PCI id (not corresponding to port numbers).

Handle this device (9710:9835 1014:0299) properly.

---
 drivers/serial/8250_pci.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
drivers/serial/8250_pci.c +8 -0
index 1948c81..766cfac 100644
@@ -600,6 +600,10 @@ static int pci_netmos_init(struct pci_dev *dev)
 	/* subdevice 0x00PS means <P> parallel, <S> serial */
 	unsigned int num_serial = dev->subsystem_device & 0xf;
 
+	if (dev->subsystem_vendor == PCI_VENDOR_ID_IBM &&
+			dev->subsystem_device == 0x0299)
+		return 0;
+
 	if (num_serial == 0)
 		return -ENODEV;
 	return num_serial;
@@ -3091,6 +3095,10 @@ static struct pci_device_id serial_pci_tbl[] = {
 		0,
 		pbn_b0_8_115200 },
 
+	{	PCI_VENDOR_ID_NETMOS, PCI_DEVICE_ID_NETMOS_9835,
+		PCI_VENDOR_ID_IBM, 0x0299,
+		0, 0, pbn_b0_bt_2_115200 },
+
 	/*
 	 * These entries match devices with class COMMUNICATION_SERIAL,
 	 * COMMUNICATION_MODEM or COMMUNICATION_MULTISERIAL
Signature · 1 line
1.6.0.5
author
#4 lore raw
Quoted 7 lines · Jesse Barnes
Quoted 4 lines · Jiri Slaby

Let it as serial, since it doesn't have subdevice in the form of 0x00PS.

Applied to my linux-next branch, thanks.

Hi, did this get lost by a chance? I don't see it in your -next branch anymore. Neither in any other branch nor upstream.

BTW I got:
This patch was dropped because it was merged into mainline or a subsystem tree from Andrew, so it had to be somewhere, I suppose...

#5 lore raw
Quoted 7 lines · On Sun, 08 Feb 2009 22:58:39 +0100 Jiri Slaby <[email protected]> wrote:
Quoted 6 lines · Jesse Barnes
Quoted 4 lines · Jiri Slaby

Let it as serial, since it doesn't have subdevice in the form of 0x00PS.

Quoted 8 lines
Quoted 1 line

Applied to my linux-next branch, thanks.

Hi, did this get lost by a chance? I don't see it in your -next branch anymore. Neither in any other branch nor upstream.

BTW I got:
This patch was dropped because it was merged into mainline or a subsystem tree from Andrew, so it had to be somewhere, I suppose...

yes, it got lost. I resurrected it.

#6 lore raw
Quoted 11 lines · Andrew Morton
Quoted 10 lines · On Sun, 08 Feb 2009 22:58:39 +0100 Jiri Slaby <[email protected]> wrote:
Quoted 8 lines · Jesse Barnes
Quoted 5 lines · Jiri Slaby

Let it as serial, since it doesn't have subdevice in the form of 0x00PS.

Applied to my linux-next branch, thanks.

Quoted 8 lines
Quoted 6 lines

Hi, did this get lost by a chance? I don't see it in your -next branch anymore. Neither in any other branch nor upstream.

BTW I got:
This patch was dropped because it was merged into mainline or a subsystem tree from Andrew, so it had to be somewhere, I suppose...

yes, it got lost. I resurrected it.

Sorry I must have been thinking about another patch when I replied; the contents don't look familiar. Anyway I'll pick it up now.

Thanks,

Signature · 1 line
Jesse Barnes, Intel Open Source Technology Center