patch for netmos based serial devices

[email protected] Mon, 1 Dec 2003 17:02:54 +0100
Newsgroups gmane.linux.wolk.devel
Message-ID <H000006500002ee8.1070294573.amethyst.csc.net@MHS>
patch for netmos based serial devices.txt (text/plain, 408 B)
Hi all,

I recently aquired a serial card based on the netmos 9845 chipset which boasted linux support. Sadly the chip is currently not supported in 2.4.20. I found the necessary patches on the internet and ported them to wolk 4.10-pre7.

The patch is based on work by RedHat and a mail found on LKML from Sept. 2003 sent by [email protected].

Mit freundlichen Gruessen / With kind regards,

Olaf Unterkofler
netmos.patch (application/octet-stream, 3.5 KB)
--- test/linux-2.4.20-wolk4.10-pre7-fullkernel/drivers/parport/parport_serial.c	2002-09-27 23:25:51.000000000 +0200
+++ linux/drivers/parport/parport_serial.c	2003-11-25 19:26:39.000000000 +0100
@@ -32,6 +32,9 @@
 enum parport_pc_pci_cards {
 	titan_110l = 0,
 	titan_210l,
+	netmos_9735,
+	netmos_9835,
+	netmos_9845,
 	avlab_1s1p,
 	avlab_1s1p_650,
 	avlab_1s1p_850,
@@ -70,6 +73,9 @@
 } cards[] __devinitdata = {
 	/* titan_110l */		{ 1, { { 3, -1 }, } },
 	/* titan_210l */		{ 1, { { 3, -1 }, } },
+	/* netmos_9735 (not tested) */	{ 1, { { 2, -1 }, } },
+	/* netmos_9835 */		{ 1, { { 2, -1 }, } },
+	/* netmos_9845 */		{ 1, { { 4, -1 }, } },
 	/* avlab_1s1p     */		{ 1, { { 1, 2}, } },
 	/* avlab_1s1p_650 */		{ 1, { { 1, 2}, } },
 	/* avlab_1s1p_850 */		{ 1, { { 1, 2}, } },
@@ -92,6 +98,12 @@
 	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, titan_110l },
 	{ PCI_VENDOR_ID_TITAN, PCI_DEVICE_ID_TITAN_210L,
 	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, titan_210l },
+	{ PCI_VENDOR_ID_NETMOS, PCI_DEVICE_ID_NETMOS_9735,
+	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, netmos_9735 },
+	{ PCI_VENDOR_ID_NETMOS, PCI_DEVICE_ID_NETMOS_9835,
+	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, netmos_9835 },
+	{ PCI_VENDOR_ID_NETMOS, PCI_DEVICE_ID_NETMOS_9845,
+	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, netmos_9845 },
 	/* PCI_VENDOR_ID_AVLAB/Intek21 has another bunch of cards ...*/
 	{ 0x14db, 0x2110, PCI_ANY_ID, PCI_ANY_ID, 0, 0, avlab_1s1p},
 	{ 0x14db, 0x2111, PCI_ANY_ID, PCI_ANY_ID, 0, 0, avlab_1s1p_650},
@@ -171,6 +183,9 @@
 
 /* titan_110l */	{ SPCI_FL_BASE1 | SPCI_FL_BASE_TABLE, 1, 921600 },
 /* titan_210l */	{ SPCI_FL_BASE1 | SPCI_FL_BASE_TABLE, 2, 921600 },
+/* netmos_9735 (n/t)*/	{ SPCI_FL_BASE0 | SPCI_FL_BASE_TABLE, 2, 115200 },
+/* netmos_9835 */	{ SPCI_FL_BASE0 | SPCI_FL_BASE_TABLE, 2, 115200 },
+/* netmos_9845 */	{ SPCI_FL_BASE0 | SPCI_FL_BASE_TABLE, 4, 115200, 0x100 },
 /* avlab_1s1p (n/t) */	{ SPCI_FL_BASE0 | SPCI_FL_BASE_TABLE, 1, 115200 },
 /* avlab_1s1p_650 (nt)*/{ SPCI_FL_BASE0 | SPCI_FL_BASE_TABLE, 1, 115200 },
 /* avlab_1s1p_850 (nt)*/{ SPCI_FL_BASE0 | SPCI_FL_BASE_TABLE, 1, 115200 },
--- test/linux-2.4.20-wolk4.10-pre7-fullkernel/include/linux/pci_ids.h	2003-10-09 17:24:37.000000000 +0200
+++ linux/include/linux/pci_ids.h	2003-11-25 19:26:39.000000000 +0100
@@ -1908,8 +1908,13 @@
 #define PCI_DEVICE_ID_HOLTEK_6565	0x6565
 
 #define PCI_VENDOR_ID_NETMOS		0x9710
+#define PCI_DEVICE_ID_NETMOS_9705	0x9705
 #define PCI_DEVICE_ID_NETMOS_9735	0x9735
+#define PCI_DEVICE_ID_NETMOS_9805	0x9805
+#define PCI_DEVICE_ID_NETMOS_9815	0x9815
 #define PCI_DEVICE_ID_NETMOS_9835	0x9835
+#define PCI_DEVICE_ID_NETMOS_9845	0x9845
+#define PCI_DEVICE_ID_NETMOS_9855	0x9855
 
 #define PCI_SUBVENDOR_ID_EXSYS		0xd84d
 #define PCI_SUBDEVICE_ID_EXSYS_4014	0x4014
--- test/linux-2.4.20-wolk4.10-pre7-fullkernel/drivers/char/serial.c	2003-10-09 17:24:24.000000000 +0200
+++ linux/drivers/char/serial.c	2003-11-25 21:08:34.000000000 +0100
@@ -4414,6 +4414,8 @@
 	pbn_computone_4,
 	pbn_computone_6,
 	pbn_computone_8,
+
+	netmos_9845,
 };
 
 static struct pci_board pci_boards[] __devinitdata = {
@@ -4521,6 +4523,8 @@
 		0x40, 2, NULL, 0x200 },
 	{ SPCI_FL_BASE0, 8, 921600, /* IOMEM */		   /* pbn_computone_8 */
 		0x40, 2, NULL, 0x200 },
+
+	{ SPCI_FL_BASE0|SPCI_FL_BASE_TABLE, 6, 115200 },   /* netmos_9845 */
 };
 
 /*
@@ -4963,6 +4967,11 @@
 		pbn_dci_pccom8 },
 #endif
 
+       /* netmos_9845 */
+	{ PCI_VENDOR_ID_NETMOS, PCI_DEVICE_ID_NETMOS_9845,
+	  PCI_ANY_ID, PCI_ANY_ID, 0, 0,
+	  netmos_9845 },
+
        { PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID,
 	 PCI_CLASS_COMMUNICATION_SERIAL << 8, 0xffff00, },
        { PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID,