NetBSD Problem Report #37566

From martin@duskware.de  Wed Dec 19 06:31:35 2007
Return-Path: <martin@duskware.de>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by narn.NetBSD.org (Postfix) with ESMTP id 9F22163B8A2
	for <gnats-bugs@gnats.netbsd.org>; Wed, 19 Dec 2007 06:31:35 +0000 (UTC)
Message-Id: <20071219031024.DE33E63B904@narn.NetBSD.org>
Date: Wed, 19 Dec 2007 03:10:24 +0000 (UTC)
From: h-masuda@ootani.nagata.kobe.jp
Reply-To: h-masuda@ootani.nagata.kobe.jp
To: netbsd-bugs-owner@NetBSD.org
Subject: OX16PCI954 based cards have mis-match COM_FREQ in pucdata.c
X-Send-Pr-Version: www-1.0

>Number:         37566
>Category:       kern
>Synopsis:       OX16PCI954 based cards have mis-match COM_FREQ in pucdata.c
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    msaitoh
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Dec 19 06:35:00 +0000 2007
>Closed-Date:    Thu Jul 08 19:05:50 +0000 2010
>Last-Modified:  Thu Jul 08 19:05:50 +0000 2010
>Originator:     MASUDA Hideo
>Release:        NetBSD 3.1_STABLE (i386)
>Organization:
>Environment:
NetBSD serial1 3.1_STABLE NetBSD 3.1_STABLE (SERIAL1) #1: Mon Nov 19 23:19:56 JST 2007  h-masuda@serial1:/usr/netbsd-3/src/sys/arch/i386/compile/SERIAL1 i386

>Description:
Install "IO-DATA RS-232C RSA-PCI2/P4" into my PC. dmesg(1) says as following:

puc0 at pci1 dev 5 function 0: Oxford Semiconductor OX16PCI954 UARTs (com, com,
com, com)
com3 at puc0 port 0: interrupting at irq 5
com3: st16650a, working fifo
com4 at puc0 port 1: interrupting at irq 5
com4: st16650a, working fifo
com5 at puc0 port 2: interrupting at irq 5
com5: st16650a, working fifo
com6 at puc0 port 3: interrupting at irq 5
com6: st16650a, working fifo
puc1 at pci1 dev 5 function 1: Oxford Semiconductor OX16PCI954 Parallel port (lpt)
lpt3 at puc1 port 0: interrupting at irq 5

 I want to connect the NetBSD/sparc machine with serial console via com3.

| # cu -l /dev/dty03 -s 9600
| Connected.

then, no response from the target. but

| # cu -l /dev/dty03 -s 1200
| Connected.
| 
| NetBSD/sparc (madoka) (console)
| 
| login:

I can communicate with the server of 9600bps setting.

>How-To-Repeat:
See Full Description.

>Fix:
I apply the following patch, it will work fine. This can be applied for netbsd-4 and -current.

Index: pucdata.c
===================================================================
RCS file: /cvs/cvsroot/src/sys/dev/pci/pucdata.c,v
retrieving revision 1.40.2.4
diff -u -r1.40.2.4 pucdata.c
--- pucdata.c   20 Nov 2006 15:49:38 -0000      1.40.2.4
+++ pucdata.c   19 Dec 2007 02:55:08 -0000
@@ -890,10 +890,22 @@
            {   0x1415, 0x9501, 0,      0       },
            {   0xffff, 0xffff, 0,      0       },
            {
-               { PUC_PORT_TYPE_COM, 0x10, 0x00, COM_FREQ },
-               { PUC_PORT_TYPE_COM, 0x10, 0x08, COM_FREQ },
-               { PUC_PORT_TYPE_COM, 0x10, 0x10, COM_FREQ },
-               { PUC_PORT_TYPE_COM, 0x10, 0x18, COM_FREQ },
+               { PUC_PORT_TYPE_COM, 0x10, 0x00, COM_FREQ * 8 },
+               { PUC_PORT_TYPE_COM, 0x10, 0x08, COM_FREQ * 8 },
+               { PUC_PORT_TYPE_COM, 0x10, 0x10, COM_FREQ * 8 },
+               { PUC_PORT_TYPE_COM, 0x10, 0x18, COM_FREQ * 8 },
+           },
+       },

>Release-Note:

>Audit-Trail:
From: MASUDA Hideo <h-masuda@ootani.nagata.kobe.jp>
To: gnats-bugs@NetBSD.org
Cc: h-masuda@ootani.nagata.kobe.jp
Subject: Re: kern/37566: OX16PCI954 based cards have mis-match COM_FREQ in
 pucdata.c
Date: Wed, 19 Dec 2007 18:25:11 +0900

 Hi,

 gnats-admin@netbsd.org wrote:
 > Thank you very much for your problem report.
 > It has the internal identification `kern/37566'.
 > The individual assigned to look at your
 > report is: kern-bug-people. 
 > 
 >> Category:       kern
 >> Responsible:    kern-bug-people
 >> Synopsis:       OX16PCI954 based cards have mis-match COM_FREQ in pucdata.c
 >> Arrival-Date:   Wed Dec 19 06:35:00 +0000 2007

  I have one advice that Subsystem vendor ID and Subsystem ID are
 required. My revised patch is as following:

 Index: pucdata.c
 ===================================================================
 RCS file: /ftp/pub/NetBSD-cvs/main/src/sys/dev/pci/pucdata.c,v
 retrieving revision 1.40.2.4
 diff -u -r1.40.2.4 pucdata.c
 --- pucdata.c   20 Nov 2006 15:49:38 -0000      1.40.2.4
 +++ pucdata.c   19 Dec 2007 09:20:49 -0000
 @@ -866,6 +866,32 @@
          * I/O Flex PCI I/O Card Model-223 with 4 serial and 1 parallel ports.
          */

 +/* */
 +       /* I-O DATA RSA-PCI2 four/eight(1-4) UARTs based on OX16PCI954 */
 +       {   "IO-DATA RSA-PCI2/P4 or P8 (1-4) UARTs",
 +           {   0x1415, 0x9501, 0x10fc, 0xd007  },
 +           {   0xffff, 0xffff, 0xffff, 0xffff  },
 +           {
 +               { PUC_PORT_TYPE_COM, 0x10, 0x00, COM_FREQ * 8 },
 +               { PUC_PORT_TYPE_COM, 0x10, 0x08, COM_FREQ * 8 },
 +               { PUC_PORT_TYPE_COM, 0x10, 0x10, COM_FREQ * 8 },
 +               { PUC_PORT_TYPE_COM, 0x10, 0x18, COM_FREQ * 8 },
 +           },
 +       },
 +
 +       /* I-O DATA RSA-PCI2 eight(5-8) UARTs base on OX16PCI954 */
 +       {   "IO-DATA RSA-PCI2/P8 (5-8) UARTs",
 +           {   0x1415, 0x9511, 0x10fc, 0xd007  },
 +           {   0xffff, 0xffff, 0xffff, 0xffff  },
 +           {
 +               { PUC_PORT_TYPE_COM, 0x10, 0x00, COM_FREQ * 8},
 +               { PUC_PORT_TYPE_COM, 0x10, 0x08, COM_FREQ * 8},
 +               { PUC_PORT_TYPE_COM, 0x10, 0x10, COM_FREQ * 8},
 +               { PUC_PORT_TYPE_COM, 0x10, 0x18, COM_FREQ * 8},
 +           },
 +       },
 +/* */
 +
         /* Oxford Semiconductor OX16PCI952 PCI `950 UARTs - 128 byte FIFOs */
         {   "Oxford Semiconductor OX16PCI952 UARTs",
             {   0x1415, 0x9521, 0,      0       },

 Best Regards.
 -- 
 MASUDA Hideo (h-masuda@ootani.nagata.kobe.jp)

Responsible-Changed-From-To: kern-bug-people->msaitoh
Responsible-Changed-By: msaitoh@NetBSD.org
Responsible-Changed-When: Mon, 05 Jul 2010 09:51:28 +0000
Responsible-Changed-Why:
mine.


State-Changed-From-To: open->closed
State-Changed-By: msaitoh@NetBSD.org
State-Changed-When: Thu, 08 Jul 2010 19:05:50 +0000
State-Changed-Why:
Fixed in -current. Thanks.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.