[Linux-parport] Patch for parport_serial.c / netmos 9845

Michael Schwingen michael at schwingen.org
Mon Jul 21 03:23:42 PDT 2014


Hi,

is this the right place to submit patches for
drivers/parport/parport_serial.c?

I have a Netmos 9845-based PCI card with 4 serial and 1 parallel port, where
the parallel port is not detected by the kernel, because the parallel port
is at BAR 5 instead of BAR 2 as the generic netmos_9xx5_combo entry assumes.

The attached patch adds a fixed entry for this configuration - this works
and should have minimal impact on other 9845-based cards, however, I wonder
if there is a way to auto-detect the correct PCI BARs for one or two
parallel ports.

cu
Michael




Netmos 9845-based card with 4 serial and 1 parallel port is
mis-detected, because the parallel port is at BAR 5 instead of BAR 2
as netmos_9xx5_combo entry assumes.

Signed-off-by: Michael Schwingen <michael at schwingen.org>
---


diff -ur linux-3.15.6-orig/drivers/parport/parport_serial.c linux-3.15.6/drivers/parport/parport_serial.c
--- linux-3.15.6-orig/drivers/parport/parport_serial.c	2014-07-18 01:23:31.000000000 +0200
+++ linux-3.15.6/drivers/parport/parport_serial.c	2014-07-21 11:33:54.004069286 +0200
@@ -31,6 +31,7 @@
 	titan_110l = 0,
 	titan_210l,
 	netmos_9xx5_combo,
+	netmos_9845_4p,
 	netmos_9855,
 	netmos_9855_2p,
 	netmos_9900,
@@ -117,6 +118,7 @@
 	/* titan_110l */		{ 1, { { 3, -1 }, } },
 	/* titan_210l */		{ 1, { { 3, -1 }, } },
 	/* netmos_9xx5_combo */		{ 1, { { 2, -1 }, }, netmos_parallel_init },
+	/* netmos_9845_4p */		{ 1, { { 5, -1 }, }, netmos_parallel_init },
 	/* netmos_9855 */		{ 1, { { 0, -1 }, }, netmos_parallel_init },
 	/* netmos_9855_2p */		{ 2, { { 0, -1 }, { 2, -1 }, } },
 	/* netmos_9900 */		{1, { { 3, 4 }, }, netmos_parallel_init },
@@ -168,6 +170,8 @@
 	{ PCI_VENDOR_ID_NETMOS, PCI_DEVICE_ID_NETMOS_9835,
 	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, netmos_9xx5_combo },
 	{ PCI_VENDOR_ID_NETMOS, PCI_DEVICE_ID_NETMOS_9845,
+	  0x1000, 0x0014, 0, 0, netmos_9845_4p },
+	{ PCI_VENDOR_ID_NETMOS, PCI_DEVICE_ID_NETMOS_9845,
 	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, netmos_9xx5_combo },
 	{ PCI_VENDOR_ID_NETMOS, PCI_DEVICE_ID_NETMOS_9855,
 	  0x1000, 0x0020, 0, 0, netmos_9855_2p },
@@ -291,6 +295,12 @@
 		.flags		= FL_BASE0 | FL_BASE_BARS,
 		.num_ports	= 1,
 		.base_baud	= 115200,
+		.uart_offset	= 8,
+	},
+	[netmos_9845_4p] = {
+		.flags		= FL_BASE0 | FL_BASE_BARS,
+		.num_ports	= 1,
+		.base_baud	= 115200,
 		.uart_offset	= 8,
 	},
 	[netmos_9855] = {



More information about the Linux-parport mailing list