NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

kern/54149: NetMOS NM9912 pucdata.c entries



>Number:         54149
>Category:       kern
>Synopsis:       8.0 doesn't recognize the NetMOS NM9912
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Wed May 01 22:30:00 +0000 2019
>Originator:     Mouse
>Release:        NetBSD 8.0
>Organization:
	Dis-
>Environment:
System: NetBSD Aaeon.Rodents-Montreal.ORG 8.0 NetBSD 8.0 (MAQ) #1: Wed May  1 17:05:41 EDT 2019
Architecture: amd64
Machine: amd64
>Description:
	I have a work machine with 8.0.  It has no built-in parallel
	port; we gave it one with a NetMOS NM9912 board.  8.0 failed to
	recognize this until I added it to pucdata.c.  Looking at
	http://cvsweb.NetBSD.org/bsdweb.cgi/src/sys/dev/pci/pucdata.c?rev=1.103&content-type=text/x-cvsweb-markup&only_with_tag=MAIN
	makes me think -current is similarly afflicted.

	I'm marking this non-critical/medium, but for our use it's
	actually critical/high; the machine is not usable for our
	purposes without the parallel port.  But we have this in our
	own source tree, where it works, so our immediate need is
	satisfied.
>How-To-Repeat:
	Plug such a NetMOS board in.  Boot 8.0.  Notice that it reports
	its usual "not configured" lines for it, even though inspection
	reveals that the vendor and product values are present in
	pcidevs.
>Fix:
	(Note: the serial ports attach for me with this patch, but I
	have not tested them; the hardware we have does not bring them
	out to connectors.)

	diff --git a/sys/dev/pci/pucdata.c b/sys/dev/pci/pucdata.c
	index 89f8f57..2271052 100644
	--- a/sys/dev/pci/pucdata.c
	+++ b/sys/dev/pci/pucdata.c
	@@ -3079,5 +3079,23 @@ const struct puc_device_description puc_devices[] = {
	 	    },
	 	},
	 
	+	/*
	+	 * NetMOS boards
	+	 */
	+	{ "NetMos NM9912 Dual PCI-E UART and 1284 Printer Port",
	+	    {   PCI_VENDOR_NETMOS, PCI_PRODUCT_NETMOS_NM9912, 0, 0x1000 },
	+	    {   0xffff, 0xffff, 0, 0xffff },
	+	    {
	+		{ PUC_PORT_TYPE_COM, 0x10, 0x0000, 0 },
	+	    },
	+	},
	+	{ "NetMos NM9912 Dual PCI-E UART and 1284 Printer Port",
	+	    {   PCI_VENDOR_NETMOS, PCI_PRODUCT_NETMOS_NM9912, 0, 0x2000 },
	+	    {   0xffff, 0xffff, 0, 0xffff },
	+	    {
	+		{ PUC_PORT_TYPE_LPT, 0x10, 0x0000, 0 },
	+	    },
	+	},
	+
	 	{ .name = NULL },
	 };

	With this patch, I see

	puc0 at pci3 dev 0 function 0: NetMos NM9912 Dual PCI-E UART and 1284 Printer Port (com)
	com2 at puc0 port 0 (16550-compatible): ioaddr 0xd030, interrupting at ioapic0 pin 16
	com2: ns16550a, working fifo
	puc1 at pci3 dev 0 function 1: NetMos NM9912 Dual PCI-E UART and 1284 Printer Port (com)
	com3 at puc1 port 0 (16550-compatible): ioaddr 0xd020, interrupting at ioapic0 pin 17
	com3: ns16550a, working fifo
	puc2 at pci3 dev 0 function 2: NetMos NM9912 Dual PCI-E UART and 1284 Printer Port (lpt)
	lpt2 at puc2 port 0: ioaddr 0xd010, interrupting at ioapic0 pin 18

/~\ The ASCII				  Mouse
\ / Ribbon Campaign
 X  Against HTML		mouse%rodents-montreal.org@localhost
/ \ Email!	     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B



Home | Main Index | Thread Index | Old Index