NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
kern/44956: add support for Qinheng PCI cards to the puc driver
>Number: 44956
>Category: kern
>Synopsis: add support for Qinheng PCI cards to the puc driver
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: kern-bug-people
>State: open
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Wed May 11 20:20:01 +0000 2011
>Originator: Dave Tyson
>Release: NetBSD 5.99.51
>Organization:
Wirral Caving Group
>Environment:
NetBSD tester.anduin.org.uk 5.99.51 NetBSD 5.99.51 (GENERIC) #4: Tue May 10
22:09:55 BST 2011
root%tester.anduin.org.uk@localhost:/usr/obj/sys/arch/i386/compile/GENERIC i386
Architecture: i386
Machine: i386
>Description:
The popular PCI serial/parallel port cards using the CH353 chip from
Nanjing Qinheng Electronics Co are not supported by the current puc
driver
>How-To-Repeat:
Insert a serial card using the Qinheng chipset, boot machine, notice
the card is not configured
>Fix:
Patch pcidevs and regen:
$ diff -u /usr/src/sys/dev/pci/pcidevs.orig /usr/src/sys/dev/pci/pcidevs
--- /usr/src/sys/dev/pci/pcidevs.orig 2011-05-02 15:06:50.000000000 +0100
+++ /usr/src/sys/dev/pci/pcidevs 2011-05-10 21:11:07.000000000 +0100
@@ -631,6 +631,7 @@
vendor 3DLABS 0x3d3d 3D Labs
vendor AVANCE2 0x4005 Avance Logic (2nd PCI Vendor ID)
vendor ADDTRON 0x4033 Addtron Technology
+vendor QINHENG 0x4348 Nanjing QinHeng Electronics
vendor ICOMPRESSION 0x4444 Conexant (iCompression)
vendor INDCOMPSRC 0x494f Industrial Computer Source
vendor NETVIN 0x4a14 NetVin
Patch pucdata.c and rebuild kernel:
$ diff -u /usr/src/sys/dev/pci/pucdata.c.orig /usr/src/sys/dev/pci/pucdata.c
--- /usr/src/sys/dev/pci/pucdata.c.orig 2011-05-02 15:23:24.000000000 +0100
+++ /usr/src/sys/dev/pci/pucdata.c 2011-05-10 21:48:19.000000000 +0100
@@ -1294,6 +1294,34 @@
},
},
+ /*
+ * Nanjing QinHeng Electronics
+ * Products based on CH353 chip which can be
+ * configured to provide various combinations
+ * including 2 serial ports and a parallel port
+ * or 4 serial ports (using a CH432 parallel to
+ * 2 serial port converter. Product codes from
+ * documentation (and physical 2 port serial card)
+ */
+ { "Nanjing QinHeng Electronics 2S",
+ { PCI_VENDOR_QINHENG, 0x3253, PCI_VENDOR_QINHENG, 0x3253 },
+ { 0xffff, 0xffff, 0xffff, 0xffff },
+ {
+ { PUC_PORT_TYPE_COM, 0x10, 0x00, COM_FREQ },
+ { PUC_PORT_TYPE_COM, 0x14, 0x00, COM_FREQ },
+ },
+ },
+
+ { "Nanjing QinHeng Electronics 2S, 1P",
+ { PCI_VENDOR_QINHENG, 0x7053, PCI_VENDOR_QINHENG, 0x7053 },
+ { 0xffff, 0xffff, 0xffff, 0xffff },
+ {
+ { PUC_PORT_TYPE_COM, 0x10, 0x00, COM_FREQ },
+ { PUC_PORT_TYPE_COM, 0x14, 0x00, COM_FREQ },
+ { PUC_PORT_TYPE_LPT, 0x18, 0x00, 0x00 },
+ },
+ },
+
/* VScom PCI-200: 2S */
{ "VScom PCI-200",
{ PCI_VENDOR_PLX, 0x1103, PCI_VENDOR_PLX, 0x1103 },
After reboot the serial ports are detected and work for the 2 port serial card:
puc0 at pci2 dev 11 function 0: Nanjing QinHeng Electronics 2S (com, com)
com3 at puc0 port 0: interrupting at ioapic0 pin 23
com3: ns16550a, working fifo
com4 at puc0 port 1: interrupting at ioapic0 pin 23
com4: ns16550a, working fifo
Home |
Main Index |
Thread Index |
Old Index