Skip to contentSkip to conversation

NetMOS 9805 ParPort interface

PATCH In review Thomas Richter 3 participants 5 messages Aug 5, 2004 – Aug 24, 2004

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 NetMOS 9805 ParPort interface

Hi folks,

here's a tiny patch against parport/parport_pc.c for kernel 2.4.26. It adds support for the NetMOS 9805 chip, used in several popular parallel port extension cards available here in germany. The patch below has been found working in a beige G3 Mac and a Canon BJC just fine.

parport_pc.c renamed from parport_pc_old.c +3 -0
@@ -2692,6 +2692,7 @@
 	syba_2p_epp,
 	syba_1p_ecp,
 	titan_010l,
+	titan_1284p1,
 	titan_1284p2,
 	avlab_1p,
 	avlab_2p,
@@ -2759,6 +2760,7 @@
 	/* syba_2p_epp AP138B */	{ 2, { { 0, 0x078 }, { 0, 0x178 }, } },
 	/* syba_1p_ecp W83787 */	{ 1, { { 0, 0x078 }, } },
 	/* titan_010l */		{ 1, { { 3, -1 }, } },
+	/* titan_1284p1 */              { 1, { { 0, 1 }, } },
 	/* titan_1284p2 */		{ 2, { { 0, 1 }, { 2, 3 }, } },
 	/* avlab_1p		*/	{ 1, { { 0, 1}, } },
 	/* avlab_2p		*/	{ 2, { { 0, 1}, { 2, 3 },} },
@@ -2826,6 +2828,7 @@
 	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, syba_1p_ecp },
 	{ PCI_VENDOR_ID_TITAN, PCI_DEVICE_ID_TITAN_010L,
 	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, titan_010l },
+	{ 0x9710, 0x9805, 0x1000, 0x0010, 0, 0, titan_1284p1 },
 	{ 0x9710, 0x9815, 0x1000, 0x0020, 0, 0, titan_1284p2 },
 	/* PCI_VENDOR_ID_AVLAB/Intek21 has another bunch of cards ...*/
 	{ 0x14db, 0x2120, PCI_ANY_ID, PCI_ANY_ID, 0, 0, avlab_1p}, /* AFAVLAB_TK9902 */

The same patch should also apply to more modern kernels since it just adds some PCI ids.

Similar patches for other NetMOS products might be easy since they're all documented; I could add a couple of PCI Ids to the parport_pc - I just don't have the hardware for testing.

So long,
Thomas

#1 lore raw
Quoted 7 lines · Thomas Richter

Hi folks,

here's a tiny patch against parport/parport_pc.c for kernel 2.4.26. It adds support for the NetMOS 9805 chip, used in several popular parallel port extension cards available here in germany. The patch below has been found working in a beige G3 Mac and a Canon BJC just fine.

Hi Thomas,

Looks good, I've queued it for 2.4.28-pre.

Care to write a v2.6 version of it ?

Most of NetMos support has been merged recently in v2.4.27 and v2.6.7/v2.6.8.

Thanks!

Quoted 33 lines
parport_pc.c renamed from parport_pc_old.c +3 -0
@@ -2692,6 +2692,7 @@
 	syba_2p_epp,
 	syba_1p_ecp,
 	titan_010l,
+	titan_1284p1,
 	titan_1284p2,
 	avlab_1p,
 	avlab_2p,
@@ -2759,6 +2760,7 @@
 	/* syba_2p_epp AP138B */	{ 2, { { 0, 0x078 }, { 0, 0x178 }, } },
 	/* syba_1p_ecp W83787 */	{ 1, { { 0, 0x078 }, } },
 	/* titan_010l */		{ 1, { { 3, -1 }, } },
+	/* titan_1284p1 */              { 1, { { 0, 1 }, } },
 	/* titan_1284p2 */		{ 2, { { 0, 1 }, { 2, 3 }, } },
 	/* avlab_1p		*/	{ 1, { { 0, 1}, } },
 	/* avlab_2p		*/	{ 2, { { 0, 1}, { 2, 3 },} },
@@ -2826,6 +2828,7 @@
 	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, syba_1p_ecp },
 	{ PCI_VENDOR_ID_TITAN, PCI_DEVICE_ID_TITAN_010L,
 	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, titan_010l },
+	{ 0x9710, 0x9805, 0x1000, 0x0010, 0, 0, titan_1284p1 },
 	{ 0x9710, 0x9815, 0x1000, 0x0020, 0, 0, titan_1284p2 },
 	/* PCI_VENDOR_ID_AVLAB/Intek21 has another bunch of cards ...*/
 	{ 0x14db, 0x2120, PCI_ANY_ID, PCI_ANY_ID, 0, 0, avlab_1p}, /* AFAVLAB_TK9902 */

The same patch should also apply to more modern kernels since it just adds some PCI ids.

Similar patches for other NetMOS products might be easy since they're all documented; I could add a couple of PCI Ids to the parport_pc - I just don't have the hardware for testing.

#2 lore raw
In reply to Thomas Richter
Quoted 7 lines · Thomas Richter

Hi folks,

here's a tiny patch against parport/parport_pc.c for kernel 2.4.26. It adds support for the NetMOS 9805 chip, used in several popular parallel port extension cards available here in germany. The patch below has been found working in a beige G3 Mac and a Canon BJC just fine.

Thomas,

I just applied this to v2.4 tree.

However your new ID's haven't made their way through v2.6, I can't find em in 2.6.8.1-mm4.

#3 lore raw
Quoted 10 lines · Marcelo Tosatti
Quoted 7 lines · Thomas Richter

Hi folks,

here's a tiny patch against parport/parport_pc.c for kernel 2.4.26. It adds support for the NetMOS 9805 chip, used in several popular parallel port extension cards available here in germany. The patch below has been found working in a beige G3 Mac and a Canon BJC just fine.

Quoted 6 lines

Thomas,

I just applied this to v2.4 tree.

However your new ID's haven't made their way through v2.6, I can't find em in 2.6.8.1-mm4.

I was kinda hoping to be sent a patch which compiles successfully.

#4 lore raw

Hi Andrew, hi Marcelo,

sorry, my time is currently pretty limited.

So here we go:

i) Apply the following to drivers/parport_pc.c:

/* snip */

parport_pc.c renamed from parport_pc.c.old +16 -0
@@ -2636,6 +2636,10 @@
 	netmos_9805,
 	netmos_9815,
 	netmos_9855,
+	netmos_9735,
+	netmos_9835,
+	netmos_9755,
+	netmos_9715
 };
 
 
@@ -2709,6 +2713,10 @@
 	/* netmos_9805 */               { 1, { { 0, -1 }, } }, /* untested */
 	/* netmos_9815 */               { 2, { { 0, -1 }, { 2, -1 }, } }, /* untested */
 	/* netmos_9855 */               { 2, { { 0, -1 }, { 2, -1 }, } }, /* untested */
+	/* netmos_9735 */               { 1, { { 2, 3 }, } },  /* untested */
+	/* netmos_9835 */               { 1, { { 2, 3 }, } },  /* untested */
+        /* netmos_9755 */               { 2, { { 0, 1 }, { 2, 3 },} }, /* untested */
+        /* netmos_9715 */               { 2, { { 0, 1 }, { 2, 3 },} }, /* untested */
 };
 
 static struct pci_device_id parport_pc_pci_tbl[] = {
@@ -2786,6 +2794,14 @@
 	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, netmos_9815 },
 	{ PCI_VENDOR_ID_NETMOS, PCI_DEVICE_ID_NETMOS_9855,
 	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, netmos_9855 },
+	{ 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_9755,
+	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, netmos_9755 },
+	{ PCI_VENDOR_ID_NETMOS, PCI_DEVICE_ID_NETMOS_9715,
+	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, netmos_9715 },
 	{ 0, } /* terminate list */
 };
 MODULE_DEVICE_TABLE(pci,parport_pc_pci_tbl);

/* snip */

and the following to include/linux/pci_ids.h:

/* snip */

pci_ids.h renamed from pci_ids.h.old +2 -0
@@ -2313,6 +2313,8 @@
 #define PCI_DEVICE_ID_NETMOS_9815	0x9815
 #define PCI_DEVICE_ID_NETMOS_9835	0x9835
 #define PCI_DEVICE_ID_NETMOS_9855	0x9855
+#define PCI_DEVICE_ID_NETMOS_9755	0x9755
+#define PCI_DEVICE_ID_NETMOS_9715	0x9715
 
 #define PCI_SUBVENDOR_ID_EXSYS		0xd84d
 #define PCI_SUBDEVICE_ID_EXSYS_4014	0x4014

/* snip */

NetMOS 9805 support is already in the kernel, this patch adds the support for the missing 9735,9855,9755 and 9715 chips.

And another remark: The 9735 and 9835 seem to be chips with serial *and* parallel interfaces, so I suppose they are already claimed somewhere in the serial driver. I don't know whether this causes any problems. I'm sorry that I can't test, I've only a 9805 here. Any idea how these "dual" chips have to be handled by the kernel?

So long,
Thomas