Subject: [PATCH 1/1] yet another serial chip support for PSBM
From: Denis Lunev <den@parallels.com>
Date: Fri, 25 Feb 2011 15:30:16 +0300
To: Pavel Emelianov <xemul@parallels.com>
CC: "vzlin-dev@lists.sw.ru" <vzlin-dev@lists.sw.ru>, devices <devices@lists.sw.ru>
Message-ID: <4D67A0D8.3020209@parallels.com>



0001-8250_pci-add-support-for-netmos-9835-IBM-devices.patch

From 25cf9bc1fcb085daaeb82b09bab0fb3c40570887 Mon Sep 17 00:00:00 2001
From: Jiri Slaby <jirislaby@gmail.com>
Date: Thu, 15 Jan 2009 13:30:34 +0000
Subject: [PATCH 1/1] 8250_pci: add support for netmos 9835 IBM devices

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.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
---
 drivers/serial/8250_pci.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

--- ./drivers/serial/8250_pci.c.orig	2011-02-18 12:16:21.000000000 +0300
+++ ./drivers/serial/8250_pci.c	2011-02-18 12:26:03.725167308 +0300
@@ -576,6 +576,9 @@ static int pci_netmos_init(struct pci_de
 	/* 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 (dev->device == PCI_DEVICE_ID_NETMOS_9901)
 		return 0;
 	if (num_serial == 0)
@@ -2564,6 +2567,10 @@ static struct pci_device_id serial_pci_t
 		0xA000, 0x1000,
 		0, 0, pbn_b0_1_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
-- 1.7.4.1 
