NetBSD-Bugs archive

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

kern/57202: puc(4) missing support for EXAR XR17V354



>Number:         57202
>Category:       kern
>Synopsis:       puc(4) missing support for EXAR XR17V354
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Sat Jan 28 21:25:00 +0000 2023
>Originator:     Håkan Engvall
>Release:        NetBSD9_STABLE
>Organization:
>Environment:
NetBSD syn.local 9.3_STABLE NetBSD 9.3_STABLE (SYN) #1: Mon Jan 23 22:47:21 EST 2023  root@syn.local:/usr/src/sys/arch/i386/compile/SYN i386
>Description:
The puc(4) communication card driver is missing support for communication cards based on EXAR XR17V354 (and related XR17V352 and XR17V358).  The card I'm using is a mini PCIe card from IOCREST. FreeBSD has support for XR17V352 and XR17V358 and I used the same parameters for my card based on XR17V354.
>How-To-Repeat:
Install the card and it does not configure correctly during boot.
>Fix:
The following patches against NetBSD9.3_STABLE per Jan 23, 2023 allows the card to configure and function with the tip(1) command.

Index: pcidevs
===================================================================
RCS file: /cvsroot/src/sys/dev/pci/pcidevs,v
retrieving revision 1.1383.2.14
diff -u -r1.1383.2.14 pcidevs
--- pcidevs     18 Jan 2023 19:26:30 -0000      1.1383.2.14
+++ pcidevs     28 Jan 2023 20:59:27 -0000
@@ -3205,6 +3205,7 @@
 product EXAR XR17D152  0x0152  dual-channel Universal PCI UART
 product EXAR XR17D154  0x0154  quad-channel Universal PCI UART
 product EXAR XR17D158  0x0158  octal-channel Universal PCI UART
+product EXAR XR17V354  0x0354  quad-channel Universal PCIe UART
 
 /* FORE products */
 product FORE PCA200    0x0210  ATM PCA-200


Index: pucdata.c
===================================================================
RCS file: /cvsroot/src/sys/dev/pci/pucdata.c,v
retrieving revision 1.104.2.2
diff -u -r1.104.2.2 pucdata.c
--- pucdata.c   3 Dec 2021 18:11:41 -0000       1.104.2.2
+++ pucdata.c   28 Jan 2023 21:03:05 -0000
@@ -445,6 +445,17 @@
            },
        },
 
+       {   "EXAR XR17v354",
+           {   PCI_VENDOR_EXAR, PCI_PRODUCT_EXAR_XR17V354, 0,      0       },
+           {   0xffff, 0xffff, 0,      0       },
+           {
+               { PUC_PORT_TYPE_COM, PCI_BAR0, 0x0000, 125000000 },
+               { PUC_PORT_TYPE_COM, PCI_BAR0, 0x0400, 125000000 },
+               { PUC_PORT_TYPE_COM, PCI_BAR0, 0x0800, 125000000 },
+               { PUC_PORT_TYPE_COM, PCI_BAR0, 0x0c00, 125000000 },
+           },
+       },
+
        /*
         * Multi-Tech ISI5634PCI/4 4-port modem board.
         * Has a 4-channel Exar XR17C154 UART, but with bogus product ID in its


Index: puc.4
===================================================================
RCS file: /cvsroot/src/share/man/man4/puc.4,v
retrieving revision 1.41.2.1
diff -u -r1.41.2.1 puc.4
--- puc.4       3 Dec 2021 18:11:41 -0000       1.41.2.1
+++ puc.4       28 Jan 2023 21:17:05 -0000
@@ -89,6 +89,7 @@
 .It Tn "EXAR XR17D152 (2 port serial)"
 .It Tn "EXAR XR17D154 (4 port serial)"
 .It Tn "EXAR XR17D158 (8 port serial)"
+.It Tn "EXAR XR17V354 (4 port serial)"
 .It Tn "Exsys EX-41098 (4 port serial)"
 .It Tn "IBM 4810 SurePOS 300 Series SCC (4 port serial)"
 .It Tn "InnoSys Keyspan SX Pro (4 port serial)"


I have been running my system with these changes for the last year under several iterations of NetBSD9_STABLE and have tested it with NetBSD-current in October 2022.  All testing have been successful.

Even though I have only tested these changes with the card I have, the same clock freq and port addresses should be applicable for cards based XR17V352 and XR17V358 according to the datasheet.

If there any test cases I can run to verify these patches, please let me know.



Home | Main Index | Thread Index | Old Index