NetBSD Problem Report #57202

From www@netbsd.org  Sat Jan 28 21:22:11 2023
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 496091A9239
	for <gnats-bugs@gnats.NetBSD.org>; Sat, 28 Jan 2023 21:22:11 +0000 (UTC)
Message-Id: <20230128212209.98B6D1A923A@mollari.NetBSD.org>
Date: Sat, 28 Jan 2023 21:22:09 +0000 (UTC)
From: hakan.engvall@gmail.com
Reply-To: hakan.engvall@gmail.com
To: gnats-bugs@NetBSD.org
Subject: puc(4) missing support for EXAR XR17V354
X-Send-Pr-Version: www-1.0

>Number:         57202
>Category:       kern
>Synopsis:       puc(4) missing support for EXAR XR17V354
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    thorpej
>State:          feedback
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Sat Jan 28 21:25:00 +0000 2023
>Closed-Date:    
>Last-Modified:  Sat Feb 03 11:35:01 +0000 2024
>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.

>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: kern-bug-people->thorpej
Responsible-Changed-By: thorpej@NetBSD.org
Responsible-Changed-When: Sun, 29 Jan 2023 15:01:42 +0000
Responsible-Changed-Why:
Take.


From: "Jason R Thorpe" <thorpej@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/57202 CVS commit: src/sys/dev/pci
Date: Sun, 29 Jan 2023 15:07:32 +0000

 Module Name:	src
 Committed By:	thorpej
 Date:		Sun Jan 29 15:07:32 UTC 2023

 Modified Files:
 	src/sys/dev/pci: pcidevs

 Log Message:
 Add ID for the EXAR XR17V354 PCIe UART.

 From Håkan Engvall.
 PR kern/57202


 To generate a diff of this commit:
 cvs rdiff -u -r1.1476 -r1.1477 src/sys/dev/pci/pcidevs

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: "Jason R Thorpe" <thorpej@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/57202 CVS commit: src/sys/dev/pci
Date: Sun, 29 Jan 2023 15:08:03 +0000

 Module Name:	src
 Committed By:	thorpej
 Date:		Sun Jan 29 15:08:03 UTC 2023

 Modified Files:
 	src/sys/dev/pci: pcidevs.h pcidevs_data.h

 Log Message:
 Regen for EXAR XR17V354.

 PR kern/57202


 To generate a diff of this commit:
 cvs rdiff -u -r1.1457 -r1.1458 src/sys/dev/pci/pcidevs.h
 cvs rdiff -u -r1.1456 -r1.1457 src/sys/dev/pci/pcidevs_data.h

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: "Jason R Thorpe" <thorpej@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/57202 CVS commit: src
Date: Sun, 29 Jan 2023 15:17:51 +0000

 Module Name:	src
 Committed By:	thorpej
 Date:		Sun Jan 29 15:17:51 UTC 2023

 Modified Files:
 	src/share/man/man4: puc.4
 	src/sys/dev/pci: pucdata.c

 Log Message:
 Add and entry for the EXAR XR17V354 4-port UART.

 From Håkan Engvall.
 PR kern/57202


 To generate a diff of this commit:
 cvs rdiff -u -r1.43 -r1.44 src/share/man/man4/puc.4
 cvs rdiff -u -r1.113 -r1.114 src/sys/dev/pci/pucdata.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: open->feedback
State-Changed-By: thorpej@NetBSD.org
State-Changed-When: Sun, 29 Jan 2023 15:26:52 +0000
State-Changed-Why:
Committed to -current, pullups requested for netbsd-9 and netbsd-10.
Feel free to send patches for the 2- and 8-port variant, too, and
I'll add them.


From: "Martin Husemann" <martin@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/57202 CVS commit: [netbsd-9] src/sys/dev/pci
Date: Mon, 30 Jan 2023 11:32:22 +0000

 Module Name:	src
 Committed By:	martin
 Date:		Mon Jan 30 11:32:22 UTC 2023

 Modified Files:
 	src/sys/dev/pci [netbsd-9]: pcidevs

 Log Message:
 Pull up following revision(s) (requested by thorpej in ticket #1580):

 	sys/dev/pci/pcidevs: revision 1.1477

 Add ID for the EXAR XR17V354 PCIe UART.
 PR kern/57202


 To generate a diff of this commit:
 cvs rdiff -u -r1.1383.2.14 -r1.1383.2.15 src/sys/dev/pci/pcidevs

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: "Martin Husemann" <martin@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/57202 CVS commit: [netbsd-9] src
Date: Mon, 30 Jan 2023 11:35:16 +0000

 Module Name:	src
 Committed By:	martin
 Date:		Mon Jan 30 11:35:16 UTC 2023

 Modified Files:
 	src/share/man/man4 [netbsd-9]: puc.4
 	src/sys/dev/pci [netbsd-9]: pucdata.c

 Log Message:
 Pull up following revision(s) (requested by thorpej in ticket #1580):

 	share/man/man4/puc.4: revision 1.44
 	sys/dev/pci/pucdata.c: revision 1.114

 Add and entry for the EXAR XR17V354 4-port UART.
 From Hakan Engvall.
 PR kern/57202


 To generate a diff of this commit:
 cvs rdiff -u -r1.41.2.1 -r1.41.2.2 src/share/man/man4/puc.4
 cvs rdiff -u -r1.104.2.2 -r1.104.2.3 src/sys/dev/pci/pucdata.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: "Martin Husemann" <martin@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/57202 CVS commit: [netbsd-10] src/sys/dev/pci
Date: Mon, 30 Jan 2023 11:43:35 +0000

 Module Name:	src
 Committed By:	martin
 Date:		Mon Jan 30 11:43:35 UTC 2023

 Modified Files:
 	src/sys/dev/pci [netbsd-10]: pcidevs

 Log Message:
 Pull up following revision(s) (requested by thorpej in ticket #61):

 	sys/dev/pci/pcidevs: revision 1.1477

 Add ID for the EXAR XR17V354 PCIe UART.
 PR kern/57202


 To generate a diff of this commit:
 cvs rdiff -u -r1.1471.2.1 -r1.1471.2.2 src/sys/dev/pci/pcidevs

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: "Martin Husemann" <martin@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/57202 CVS commit: [netbsd-10] src
Date: Mon, 30 Jan 2023 11:44:39 +0000

 Module Name:	src
 Committed By:	martin
 Date:		Mon Jan 30 11:44:39 UTC 2023

 Modified Files:
 	src/share/man/man4 [netbsd-10]: puc.4
 	src/sys/dev/pci [netbsd-10]: pucdata.c

 Log Message:
 Pull up following revision(s) (requested by thorpej in ticket #61):

 	share/man/man4/puc.4: revision 1.44
 	sys/dev/pci/pucdata.c: revision 1.114

 Add and entry for the EXAR XR17V354 4-port UART.
 From Hakan Engvall.
 PR kern/57202


 To generate a diff of this commit:
 cvs rdiff -u -r1.43 -r1.43.2.1 src/share/man/man4/puc.4
 cvs rdiff -u -r1.113 -r1.113.4.1 src/sys/dev/pci/pucdata.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: =?UTF-8?Q?H=C3=A5kan_Engvall?= <hakan.engvall@gmail.com>
To: gnats-bugs@netbsd.org
Cc: thorpej@netbsd.org, netbsd-bugs@netbsd.org, gnats-admin@netbsd.org
Subject: Re: kern/57202 (puc(4) missing support for EXAR XR17V354)
Date: Tue, 31 Jan 2023 12:12:17 -0500

 --000000000000c9aa3905f3926faa
 Content-Type: multipart/alternative; boundary="000000000000c9aa3805f3926fa8"

 --000000000000c9aa3805f3926fa8
 Content-Type: text/plain; charset="UTF-8"

 Attached are the patches for the 2-and 8-port variants. The patch for
 pcidevs also fixes a small typo in the code committed.

 I just compiled a kernel with these patches and did a quick test with
 tip(1), all successful.

 On Sun, Jan 29, 2023 at 10:26 AM <thorpej@netbsd.org> wrote:

 > Synopsis: puc(4) missing support for EXAR XR17V354
 >
 > State-Changed-From-To: open->feedback
 > State-Changed-By: thorpej@NetBSD.org
 > State-Changed-When: Sun, 29 Jan 2023 15:26:52 +0000
 > State-Changed-Why:
 > Committed to -current, pullups requested for netbsd-9 and netbsd-10.
 > Feel free to send patches for the 2- and 8-port variant, too, and
 > I'll add them.
 >
 >
 >
 >

 --000000000000c9aa3805f3926fa8
 Content-Type: text/html; charset="UTF-8"
 Content-Transfer-Encoding: quoted-printable

 <div dir=3D"ltr"><div>Attached are the patches for the 2-and 8-port variant=
 s. The patch for pcidevs also fixes a small typo in the code committed.<br>=
 <br></div><div>I just compiled a kernel with these patches and did a quick =
 test with tip(1), all successful.<br></div></div><br><div class=3D"gmail_qu=
 ote"><div dir=3D"ltr" class=3D"gmail_attr">On Sun, Jan 29, 2023 at 10:26 AM=
  &lt;<a href=3D"mailto:thorpej@netbsd.org">thorpej@netbsd.org</a>&gt; wrote=
 :<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.=
 8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Synopsis: puc(=
 4) missing support for EXAR XR17V354<br>
 <br>
 State-Changed-From-To: open-&gt;feedback<br>
 State-Changed-By: thorpej@NetBSD.org<br>
 State-Changed-When: Sun, 29 Jan 2023 15:26:52 +0000<br>
 State-Changed-Why:<br>
 Committed to -current, pullups requested for netbsd-9 and netbsd-10.<br>
 Feel free to send patches for the 2- and 8-port variant, too, and<br>
 I&#39;ll add them.<br>
 <br>
 <br>
 <br>
 </blockquote></div>

 --000000000000c9aa3805f3926fa8--
 --000000000000c9aa3905f3926faa
 Content-Type: application/octet-stream; name="patch-share_man_man4_puc.4"
 Content-Disposition: attachment; filename="patch-share_man_man4_puc.4"
 Content-Transfer-Encoding: base64
 Content-ID: <f_ldkhx7z30>
 X-Attachment-Id: f_ldkhx7z30

 SW5kZXg6IHB1Yy40Cj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
 PT09PT09PT09PT09PT09PT09PT09PT0KUkNTIGZpbGU6IC9jdnNyb290L3NyYy9zaGFyZS9tYW4v
 bWFuNC9wdWMuNCx2CnJldHJpZXZpbmcgcmV2aXNpb24gMS40MS4yLjIKZGlmZiAtdSAtcjEuNDEu
 Mi4yIHB1Yy40Ci0tLSBwdWMuNAkzMCBKYW4gMjAyMyAxMTozNToxNSAtMDAwMAkxLjQxLjIuMgor
 KysgcHVjLjQJMzEgSmFuIDIwMjMgMTc6MDA6MDIgLTAwMDAKQEAgLTg5LDcgKzg5LDkgQEAKIC5J
 dCBUbiAiRVhBUiBYUjE3RDE1MiAoMiBwb3J0IHNlcmlhbCkiCiAuSXQgVG4gIkVYQVIgWFIxN0Qx
 NTQgKDQgcG9ydCBzZXJpYWwpIgogLkl0IFRuICJFWEFSIFhSMTdEMTU4ICg4IHBvcnQgc2VyaWFs
 KSIKKy5JdCBUbiAiRVhBUiBYUjE3VjM1MiAoMiBwb3J0IHNlcmlhbCkiCiAuSXQgVG4gIkVYQVIg
 WFIxN1YzNTQgKDQgcG9ydCBzZXJpYWwpIgorLkl0IFRuICJFWEFSIFhSMTdWMzU4ICg4IHBvcnQg
 c2VyaWFsKSIKIC5JdCBUbiAiRXhzeXMgRVgtNDEwOTggKDQgcG9ydCBzZXJpYWwpIgogLkl0IFRu
 ICJJQk0gNDgxMCBTdXJlUE9TIDMwMCBTZXJpZXMgU0NDICg0IHBvcnQgc2VyaWFsKSIKIC5JdCBU
 biAiSW5ub1N5cyBLZXlzcGFuIFNYIFBybyAoNCBwb3J0IHNlcmlhbCkiCg==
 --000000000000c9aa3905f3926faa
 Content-Type: application/octet-stream; name="patch-sys_dev_pci_pucdata.c"
 Content-Disposition: attachment; filename="patch-sys_dev_pci_pucdata.c"
 Content-Transfer-Encoding: base64
 Content-ID: <f_ldkhx7zo2>
 X-Attachment-Id: f_ldkhx7zo2

 SW5kZXg6IHB1Y2RhdGEuYwo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
 PT09PT09PT09PT09PT09PT09PT09PT09PT09ClJDUyBmaWxlOiAvY3Zzcm9vdC9zcmMvc3lzL2Rl
 di9wY2kvcHVjZGF0YS5jLHYKcmV0cmlldmluZyByZXZpc2lvbiAxLjEwNC4yLjMKZGlmZiAtdSAt
 cjEuMTA0LjIuMyBwdWNkYXRhLmMKLS0tIHB1Y2RhdGEuYwkzMCBKYW4gMjAyMyAxMTozNToxNSAt
 MDAwMAkxLjEwNC4yLjMKKysrIHB1Y2RhdGEuYwkzMSBKYW4gMjAyMyAxNjo1NzoxMyAtMDAwMApA
 QCAtNDQ0LDcgKzQ0NCwxOCBAQAogCQl7IFBVQ19QT1JUX1RZUEVfQ09NLCBQQ0lfQkFSMCwgMHgw
 NjAwLCBDT01fRlJFUSAqIDggfSwKIAkgICAgfSwKIAl9LAotCXsgICAiRVhBUiBYUjE3RDE1NCIs
 CisKKwkvKiBUaGUgWFIxN1YzNVsyNDhdIHVzZSB0aGUgMTI1TUh6IFBDSWUgY2xvY2sgYXMgcmVm
 ZXJlbmNlIGNsb2NrLiAqLworCXsgICAiRVhBUiBYUjE3VjM1MiIsCisJICAgIHsJUENJX1ZFTkRP
 Ul9FWEFSLCBQQ0lfUFJPRFVDVF9FWEFSX1hSMTdWMzUyLCAwLCAgICAgIDAgICAgICAgfSwKKwkg
 ICAgeyAgIDB4ZmZmZiwgMHhmZmZmLCAwLCAgICAgIDAgICAgICAgfSwKKwkgICAgeworCQl7IFBV
 Q19QT1JUX1RZUEVfQ09NLCBQQ0lfQkFSMCwgMHgwMDAwLCAxMjUwMDAwMDAgfSwKKwkJeyBQVUNf
 UE9SVF9UWVBFX0NPTSwgUENJX0JBUjAsIDB4MDQwMCwgMTI1MDAwMDAwIH0sCisJICAgIH0sCisJ
 fSwKKworCXsgICAiRVhBUiBYUjE3VjM1NCIsCiAJICAgIHsJUENJX1ZFTkRPUl9FWEFSLCBQQ0lf
 UFJPRFVDVF9FWEFSX1hSMTdWMzU0LCAwLCAgICAgIDAgICAgICAgfSwKIAkgICAgeyAgIDB4ZmZm
 ZiwgMHhmZmZmLCAwLCAgICAgIDAgICAgICAgfSwKIAkgICAgewpAQCAtNDU1LDYgKzQ2NiwyMSBA
 QAogCSAgICB9LAogCX0sCiAKKwl7ICAgIkVYQVIgWFIxN1YzNTgiLAorCSAgICB7CVBDSV9WRU5E
 T1JfRVhBUiwgUENJX1BST0RVQ1RfRVhBUl9YUjE3VjM1OCwgMCwgICAgICAwICAgICAgIH0sCisJ
 ICAgIHsgICAweGZmZmYsIDB4ZmZmZiwgMCwgICAgICAwICAgICAgIH0sCisJICAgIHsKKwkJeyBQ
 VUNfUE9SVF9UWVBFX0NPTSwgUENJX0JBUjAsIDB4MDAwMCwgMTI1MDAwMDAwIH0sCisJCXsgUFVD
 X1BPUlRfVFlQRV9DT00sIFBDSV9CQVIwLCAweDA0MDAsIDEyNTAwMDAwMCB9LAorCQl7IFBVQ19Q
 T1JUX1RZUEVfQ09NLCBQQ0lfQkFSMCwgMHgwODAwLCAxMjUwMDAwMDAgfSwKKwkJeyBQVUNfUE9S
 VF9UWVBFX0NPTSwgUENJX0JBUjAsIDB4MGMwMCwgMTI1MDAwMDAwIH0sCisJCXsgUFVDX1BPUlRf
 VFlQRV9DT00sIFBDSV9CQVIwLCAweDEwMDAsIDEyNTAwMDAwMCB9LAorCQl7IFBVQ19QT1JUX1RZ
 UEVfQ09NLCBQQ0lfQkFSMCwgMHgxNDAwLCAxMjUwMDAwMDAgfSwKKwkJeyBQVUNfUE9SVF9UWVBF
 X0NPTSwgUENJX0JBUjAsIDB4MTgwMCwgMTI1MDAwMDAwIH0sCisJCXsgUFVDX1BPUlRfVFlQRV9D
 T00sIFBDSV9CQVIwLCAweDFjMDAsIDEyNTAwMDAwMCB9LAorCSAgICB9LAorCX0sCisKIAkvKgog
 CSAqIE11bHRpLVRlY2ggSVNJNTYzNFBDSS80IDQtcG9ydCBtb2RlbSBib2FyZC4KIAkgKiBIYXMg
 YSA0LWNoYW5uZWwgRXhhciBYUjE3QzE1NCBVQVJULCBidXQgd2l0aCBib2d1cyBwcm9kdWN0IElE
 IGluIGl0cwo=
 --000000000000c9aa3905f3926faa
 Content-Type: application/octet-stream; name=patch-sys_dev_pci_pcidevs
 Content-Disposition: attachment; filename=patch-sys_dev_pci_pcidevs
 Content-Transfer-Encoding: base64
 Content-ID: <f_ldkhx7zi1>
 X-Attachment-Id: f_ldkhx7zi1

 SW5kZXg6IHBjaWRldnMKPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
 PT09PT09PT09PT09PT09PT09PT09PT09PQpSQ1MgZmlsZTogL2N2c3Jvb3Qvc3JjL3N5cy9kZXYv
 cGNpL3BjaWRldnMsdgpyZXRyaWV2aW5nIHJldmlzaW9uIDEuMTM4My4yLjE1CmRpZmYgLXUgLXIx
 LjEzODMuMi4xNSBwY2lkZXZzCi0tLSBwY2lkZXZzCTMwIEphbiAyMDIzIDExOjMyOjIyIC0wMDAw
 CTEuMTM4My4yLjE1CisrKyBwY2lkZXZzCTMxIEphbiAyMDIzIDE2OjU1OjIxIC0wMDAwCkBAIC0z
 MjA1LDcgKzMyMDUsOSBAQAogcHJvZHVjdCBFWEFSIFhSMTdEMTUyCTB4MDE1MglkdWFsLWNoYW5u
 ZWwgVW5pdmVyc2FsIFBDSSBVQVJUCiBwcm9kdWN0IEVYQVIgWFIxN0QxNTQJMHgwMTU0CXF1YWQt
 Y2hhbm5lbCBVbml2ZXJzYWwgUENJIFVBUlQKIHByb2R1Y3QgRVhBUiBYUjE3RDE1OAkweDAxNTgJ
 b2N0YWwtY2hhbm5lbCBVbml2ZXJzYWwgUENJIFVBUlQKK3Byb2R1Y3QgRVhBUiBYUjE3VjM1Mgkw
 eDAzNTIJZHVhbC1jaGFubmVsIFVuaXZlcnNhbCBQQ0llIFVBUlQKIHByb2R1Y3QgRVhBUiBYUjE3
 VjM1NAkweDAzNTQJcXVhZC1jaGFubmVsIFVuaXZlcnNhbCBQQ0llIFVBUlQKK3Byb2R1Y3QgRVhB
 UiBYUjE3VjM1OAkweDAzNTgJb2N0YWwtY2hhbm5lbCBVbml2ZXJzYWwgUENJZSBVQVJUCiAKIC8q
 IEZPUkUgcHJvZHVjdHMgKi8KIHByb2R1Y3QgRk9SRSBQQ0EyMDAJMHgwMjEwCUFUTSBQQ0EtMjAw
 Cg==
 --000000000000c9aa3905f3926faa--

From: =?UTF-8?Q?Carl_H=c3=a5kan_Engvall?= <hakan.engvall@gmail.com>
To: gnats-bugs@netbsd.org, thorpej@netbsd.org, netbsd-bugs@netbsd.org,
 gnats-admin@netbsd.org
Cc: 
Subject: Re: kern/57202 (puc(4) missing support for EXAR XR17V354)
Date: Tue, 31 Jan 2023 16:10:29 -0500

 I'm sorry about the base64 encoding. Here are the patches in plain text. 
 These add support for EXAR XR17V35[248] based cards and correct a small 
 typo in the code committed to HEAD, netbsd-9, and netbsd-10. Only a 
 XR17V354 based card has been tested.

 Index: puc.4
 ===================================================================
 RCS file: /cvsroot/src/share/man/man4/puc.4,v
 retrieving revision 1.41.2.2
 diff -u -r1.41.2.2 puc.4
 --- puc.4    30 Jan 2023 11:35:15 -0000    1.41.2.2
 +++ puc.4    31 Jan 2023 17:00:02 -0000
 @@ -89,7 +89,9 @@
   .It Tn "EXAR XR17D152 (2 port serial)"
   .It Tn "EXAR XR17D154 (4 port serial)"
   .It Tn "EXAR XR17D158 (8 port serial)"
 +.It Tn "EXAR XR17V352 (2 port serial)"
   .It Tn "EXAR XR17V354 (4 port serial)"
 +.It Tn "EXAR XR17V358 (8 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)"


 Index: pcidevs
 ===================================================================
 RCS file: /cvsroot/src/sys/dev/pci/pcidevs,v
 retrieving revision 1.1383.2.15
 diff -u -r1.1383.2.15 pcidevs
 --- pcidevs    30 Jan 2023 11:32:22 -0000    1.1383.2.15
 +++ pcidevs    31 Jan 2023 16:55:21 -0000
 @@ -3205,7 +3205,9 @@
   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 XR17V352    0x0352    dual-channel Universal PCIe UART
   product EXAR XR17V354    0x0354    quad-channel Universal PCIe UART
 +product EXAR XR17V358    0x0358    octal-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.3
 diff -u -r1.104.2.3 pucdata.c
 --- pucdata.c    30 Jan 2023 11:35:15 -0000    1.104.2.3
 +++ pucdata.c    31 Jan 2023 16:57:13 -0000
 @@ -444,7 +444,18 @@
           { PUC_PORT_TYPE_COM, PCI_BAR0, 0x0600, COM_FREQ * 8 },
           },
       },
 -    {   "EXAR XR17D154",
 +
 +    /* The XR17V35[248] use the 125MHz PCIe clock as reference clock. */
 +    {   "EXAR XR17V352",
 +        {    PCI_VENDOR_EXAR, PCI_PRODUCT_EXAR_XR17V352, 0, 0       },
 +        {   0xffff, 0xffff, 0,      0       },
 +        {
 +        { PUC_PORT_TYPE_COM, PCI_BAR0, 0x0000, 125000000 },
 +        { PUC_PORT_TYPE_COM, PCI_BAR0, 0x0400, 125000000 },
 +        },
 +    },
 +
 +    {   "EXAR XR17V354",
           {    PCI_VENDOR_EXAR, PCI_PRODUCT_EXAR_XR17V354, 0, 0       },
           {   0xffff, 0xffff, 0,      0       },
           {
 @@ -455,6 +466,21 @@
           },
       },

 +    {   "EXAR XR17V358",
 +        {    PCI_VENDOR_EXAR, PCI_PRODUCT_EXAR_XR17V358, 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 },
 +        { PUC_PORT_TYPE_COM, PCI_BAR0, 0x1000, 125000000 },
 +        { PUC_PORT_TYPE_COM, PCI_BAR0, 0x1400, 125000000 },
 +        { PUC_PORT_TYPE_COM, PCI_BAR0, 0x1800, 125000000 },
 +        { PUC_PORT_TYPE_COM, PCI_BAR0, 0x1c00, 125000000 },
 +        },
 +    },
 +
       /*
        * Multi-Tech ISI5634PCI/4 4-port modem board.
        * Has a 4-channel Exar XR17C154 UART, but with bogus product ID 
 in its

From: Carl Hakan Engvall <hakan.engvall@gmail.com>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: kern/57202
Date: Wed, 6 Sep 2023 23:04:12 -0400

 I'll try a third time to provide the additional patches. These are 
 against CVS tag netbsd-0 (NetBSD-9.3_STABLE) per 8/12/2023. These add 
 support for EXAR XR17V35[248] based cards and correct a small typo in 
 the code committed previously.

 Index: share/man/man4/puc.4
 ===================================================================
 RCS file: /cvsroot/src/share/man/man4/puc.4,v
 retrieving revision 1.41.2.2
 diff -u -r1.41.2.2 puc.4
 --- share/man/man4/puc.4        30 Jan 2023 11:35:15 -0000 1.41.2.2
 +++ share/man/man4/puc.4        7 Sep 2023 02:52:43 -0000
 @@ -89,7 +89,9 @@
   .It Tn "EXAR XR17D152 (2 port serial)"
   .It Tn "EXAR XR17D154 (4 port serial)"
   .It Tn "EXAR XR17D158 (8 port serial)"
 +.It Tn "EXAR XR17V352 (2 port serial)"
   .It Tn "EXAR XR17V354 (4 port serial)"
 +.It Tn "EXAR XR17V358 (8 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)"

 Index: sys/dev/pci/pcidevs
 ===================================================================
 RCS file: /cvsroot/src/sys/dev/pci/pcidevs,v
 retrieving revision 1.1383.2.17
 diff -u -r1.1383.2.17 pcidevs
 --- sys/dev/pci/pcidevs 29 Jul 2023 10:30:37 -0000 1.1383.2.17
 +++ sys/dev/pci/pcidevs 7 Sep 2023 02:52:54 -0000
 @@ -3222,7 +3222,9 @@
   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 XR17V352  0x0352  dual-channel Universal PCIe UART
   product EXAR XR17V354  0x0354  quad-channel Universal PCIe UART
 +product EXAR XR17V358  0x0358  octal-channel Universal PCIe UART

   /* FORE products */
   product FORE PCA200    0x0210  ATM PCA-200

 Index: sys/dev/pci/pucdata.c
 ===================================================================
 RCS file: /cvsroot/src/sys/dev/pci/pucdata.c,v
 retrieving revision 1.104.2.3
 diff -u -r1.104.2.3 pucdata.c
 --- sys/dev/pci/pucdata.c       30 Jan 2023 11:35:15 -0000 1.104.2.3
 +++ sys/dev/pci/pucdata.c       7 Sep 2023 02:52:56 -0000
 @@ -444,7 +444,18 @@
                  { PUC_PORT_TYPE_COM, PCI_BAR0, 0x0600, COM_FREQ * 8 },
              },
          },
 -       {   "EXAR XR17D154",
 +
 +       /* The XR17V35[248] use the 125MHz PCIe clock as reference clock. */
 +       {   "EXAR XR17V352",
 +           {   PCI_VENDOR_EXAR, PCI_PRODUCT_EXAR_XR17V352, 0,      
 0       },
 +           {   0xffff, 0xffff, 0,      0       },
 +           {
 +               { PUC_PORT_TYPE_COM, PCI_BAR0, 0x0000, 125000000 },
 +               { PUC_PORT_TYPE_COM, PCI_BAR0, 0x0400, 125000000 },
 +           },
 +       },
 +
 +       {   "EXAR XR17V354",
              {   PCI_VENDOR_EXAR, PCI_PRODUCT_EXAR_XR17V354, 0,      
 0       },
              {   0xffff, 0xffff, 0,      0       },
              {
 @@ -455,6 +466,21 @@
              },
          },

 +       {   "EXAR XR17V358",
 +           {   PCI_VENDOR_EXAR, PCI_PRODUCT_EXAR_XR17V358, 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 },
 +               { PUC_PORT_TYPE_COM, PCI_BAR0, 0x1000, 125000000 },
 +               { PUC_PORT_TYPE_COM, PCI_BAR0, 0x1400, 125000000 },
 +               { PUC_PORT_TYPE_COM, PCI_BAR0, 0x1800, 125000000 },
 +               { PUC_PORT_TYPE_COM, PCI_BAR0, 0x1c00, 125000000 },
 +           },
 +       },
 +
          /*
           * Multi-Tech ISI5634PCI/4 4-port modem board.
           * Has a 4-channel Exar XR17C154 UART, but with bogus product 
 ID in its

From: "Martin Husemann" <martin@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/57202 CVS commit: [netbsd-8] src/sys/dev/pci
Date: Sat, 3 Feb 2024 11:30:32 +0000

 Module Name:	src
 Committed By:	martin
 Date:		Sat Feb  3 11:30:32 UTC 2024

 Modified Files:
 	src/sys/dev/pci [netbsd-8]: pcidevs

 Log Message:
 Pull up following revision(s) (requested by msaitoh in ticket #1931):

 	sys/dev/pci/pcidevs: revision 1.1477
 	sys/dev/pci/pcidevs: revision 1.1494
 	sys/dev/pci/pcidevs: revision 1.1498
 	sys/dev/pci/pcidevs: revision 1.1499
 	sys/dev/pci/pcidevs: revision 1.1500
 	sys/dev/pci/pcidevs: revision 1.1501
 	sys/dev/pci/pcidevs: revision 1.1502

 Add ID for the EXAR XR17V354 PCIe UART.
 From Hakan Engvall.
 PR kern/57202

 pcidevs: Add missing I225/I226 series devices

 pcidevs: Add Mellanox ConnectX-6 Lx.

 add some newer Areca boards in prep for updating driver

 Add Intel C26[26] eSPI.

 Update Intel Raptor Lake devices.

 Add Intel I219-{LM,V}(20,21)


 To generate a diff of this commit:
 cvs rdiff -u -r1.1289.2.30 -r1.1289.2.31 src/sys/dev/pci/pcidevs

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.47 2022/09/11 19:34:41 kim Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2024 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.