From root@home.bluegrass.sk  Wed Nov  5 00:08:51 2003
Return-Path: <root@home.bluegrass.sk>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id C814816A4CE
	for <FreeBSD-gnats-submit@freebsd.org>; Wed,  5 Nov 2003 00:08:51 -0800 (PST)
Received: from home.bluegrass.sk (home.bluegrass.sk [195.168.129.26])
	by mx1.FreeBSD.org (Postfix) with SMTP id 3E85843FFB
	for <FreeBSD-gnats-submit@freebsd.org>; Wed,  5 Nov 2003 00:08:50 -0800 (PST)
	(envelope-from root@home.bluegrass.sk)
Received: (qmail 24376 invoked by uid 0); 5 Nov 2003 08:08:48 -0000
Message-Id: <20031105080848.24375.qmail@home.bluegrass.sk>
Date: 5 Nov 2003 08:08:48 -0000
From: Charlie & <root@home.bluegrass.sk>
Reply-To: Charlie & <root@home.bluegrass.sk>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject:
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         58953
>Category:       kern
>Synopsis:       [puc] [patch] detect NetMOS-based six serial port card
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    mjacob
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Wed Nov 05 00:10:21 PST 2003
>Closed-Date:    Sat Dec 16 02:41:36 GMT 2006
>Last-Modified:  Sat Feb 16 12:10:01 UTC 2008
>Originator:     Charlie &
>Release:        FreeBSD 4.8-STABLE i386
>Organization:
>Environment:
System: FreeBSD home.bluegrass.sk 4.8-STABLE FreeBSD 4.8-STABLE #0: Sat Jun 14 10:29:44 CEST 2003 root@:/usr/src/sys/compile/MILAN i386


	
any FreeBSD, tested with 4.9 stable

>Description:
	

Current puc driver does not recognise NetMOS-based six serial port cards.
Both four and six port cards are treated as four port devices.

>How-To-Repeat:
	

>Fix:

	

Following patch distinguishes four and six port devices.
Tested with both four and six port devices, they appear to work correctly.

--- pucdata.cm  Wed Nov  5 07:35:08 2003
+++ pucdata.c   Sun Sep  7 23:39:22 2003
@@ -834,27 +834,13 @@

        /* NetMos 4S0P PCI: 4S, 0P */
        {   "NetMos NM9845 Quad UART",
-           {   0x9710, 0x9845, 0,      0x0014  },
-           {   0xffff, 0xffff, 0,      0xffff  },
+           {   0x9710, 0x9845, 0,      0       },
+           {   0xffff, 0xffff, 0,      0       },
            {
                { PUC_PORT_TYPE_COM, 0x10, 0x00, COM_FREQ },
                { PUC_PORT_TYPE_COM, 0x14, 0x00, COM_FREQ },
                { PUC_PORT_TYPE_COM, 0x18, 0x00, COM_FREQ },
                { PUC_PORT_TYPE_COM, 0x1c, 0x00, COM_FREQ },
-           },
-       },
-
-       /* NetMos 6S0P PCI: 6S, 0P */
-       {   "NetMos NM9845 Hex UART",
-           {   0x9710, 0x9845, 0,      0x0006  },
-           {   0xffff, 0xffff, 0,      0xffff  },
-           {
-               { PUC_PORT_TYPE_COM, 0x10, 0x00, COM_FREQ },
-               { PUC_PORT_TYPE_COM, 0x14, 0x00, COM_FREQ },
-               { PUC_PORT_TYPE_COM, 0x18, 0x00, COM_FREQ },
-               { PUC_PORT_TYPE_COM, 0x1c, 0x00, COM_FREQ },
-               { PUC_PORT_TYPE_COM, 0x20, 0x00, COM_FREQ },
-               { PUC_PORT_TYPE_COM, 0x24, 0x00, COM_FREQ },
            },
        },

>Release-Note:
>Audit-Trail:
Class-Changed-From-To: sw-bug->change-request 
Class-Changed-By: linimon 
Class-Changed-When: Wed Nov 5 08:24:41 PST 2003 
Class-Changed-Why:  
Reformat to pick up correct synopsis and category. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=58953 
Responsible-Changed-From-To: gnats-admin->freebsd-bugs 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Tue Nov 11 13:32:58 PST 2003 
Responsible-Changed-Why:  
Assign to valid assignee. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=58953 

From: Milan Obuch <bsd@dino.sk>
To: bug-followup@freebsd.org
Cc:  
Subject: Re: kern/58953: [puc] [patch] detect NetMOS-based six serial port card
Date: Fri, 15 Dec 2006 17:31:53 +0100

 The same patch still necessary for 6.2-PRERELEASE...
 
 # diff -u pucdata.c.orig  pucdata.c
 --- pucdata.c.orig      Fri Dec 15 17:31:13 2006
 +++ pucdata.c   Fri Dec 15 17:31:21 2006
 @@ -946,13 +946,27 @@
 
         /* NetMos 4S0P PCI: 4S, 0P */
         {   "NetMos NM9845 Quad UART",
 -           {   0x9710, 0x9845, 0,      0       },
 -           {   0xffff, 0xffff, 0,      0       },
 +           {   0x9710, 0x9845, 0,      0x0014  },
 +           {   0xffff, 0xffff, 0,      0xffff  },
             {
                 { PUC_PORT_TYPE_COM, 0x10, 0x00, COM_FREQ },
                 { PUC_PORT_TYPE_COM, 0x14, 0x00, COM_FREQ },
                 { PUC_PORT_TYPE_COM, 0x18, 0x00, COM_FREQ },
                 { PUC_PORT_TYPE_COM, 0x1c, 0x00, COM_FREQ },
 +           },
 +       },
 +
 +       /* NetMos 6S0P PCI: 6S, 0P */
 +       {   "NetMos NM9845 Hex UART",
 +           {   0x9710, 0x9845, 0,      0x0006  },
 +           {   0xffff, 0xffff, 0,      0xffff  },
 +           {
 +               { PUC_PORT_TYPE_COM, 0x10, 0x00, COM_FREQ },
 +               { PUC_PORT_TYPE_COM, 0x14, 0x00, COM_FREQ },
 +               { PUC_PORT_TYPE_COM, 0x18, 0x00, COM_FREQ },
 +               { PUC_PORT_TYPE_COM, 0x1c, 0x00, COM_FREQ },
 +               { PUC_PORT_TYPE_COM, 0x20, 0x00, COM_FREQ },
 +               { PUC_PORT_TYPE_COM, 0x24, 0x00, COM_FREQ },
             },
         },
Responsible-Changed-From-To: freebsd-bugs->mjacob 
Responsible-Changed-By: mjacob 
Responsible-Changed-When: Fri Dec 15 18:50:11 UTC 2006 
Responsible-Changed-Why:  
I'll look at it. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=58953 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/58953: commit references a PR
Date: Fri, 15 Dec 2006 22:33:20 +0000 (UTC)

 mjacob      2006-12-15 22:31:38 UTC
 
   FreeBSD src repository
 
   Modified files:        (Branch: RELENG_6)
     sys/dev/puc          pucdata.c 
   Log:
   RELENG_6 (5, 4) change to recognize 6 port NetMos
   
   PR:             58953
   Submitted by:   Milan Obuch
   Reviewed by:    marcel
   
   Revision  Changes    Path
   1.51.2.3  +16 -2     src/sys/dev/puc/pucdata.c
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: open->closed 
State-Changed-By: mjacob 
State-Changed-When: Sat Dec 16 02:41:17 UTC 2006 
State-Changed-Why:  
Did the changes to RELENG_{4,5,6} 

http://www.freebsd.org/cgi/query-pr.cgi?pr=58953 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/58953: commit references a PR
Date: Sat, 16 Dec 2006 02:40:52 +0000 (UTC)

 mjacob      2006-12-16 02:40:37 UTC
 
   FreeBSD src repository
 
   Modified files:        (Branch: RELENG_5)
     sys/dev/puc          pucdata.c 
   Log:
   RELENG_6 (5, 4) change to recognize 6 port NetMos
   
   PR:             58953
   Submitted by:   Milan Obuch
   Reviewed by:    marcel
   
   Revision  Changes    Path
   1.45.2.5  +16 -2     src/sys/dev/puc/pucdata.c
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/58953: commit references a PR
Date: Sat, 16 Dec 2006 02:41:13 +0000 (UTC)

 mjacob      2006-12-16 02:41:01 UTC
 
   FreeBSD src repository
 
   Modified files:        (Branch: RELENG_4)
     sys/dev/puc          pucdata.c 
   Log:
   RELENG_6 (5, 4) change to recognize 6 port NetMos
   
   PR:             58953
   Submitted by:   Milan Obuch
   Reviewed by:    marcel
   
   Revision  Changes    Path
   1.2.2.21  +16 -2     src/sys/dev/puc/pucdata.c
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 

From: Fabian Wenk <fabian@wenks.ch>
To: bug-followup@FreeBSD.org, mjacob@FreeBSD.org
Cc:  
Subject: Re: kern/58953: [puc] [patch] detect NetMOS-based six serial port
 card
Date: Sat, 16 Feb 2008 13:05:36 +0100

 This is a multi-part message in MIME format.
 --------------020708020401090508010700
 Content-Type: text/plain; charset=ISO-8859-1; format=flowed
 Content-Transfer-Encoding: 7bit
 
 Hello
 
 After the Upgrade from FreeBSD 6.2-RELEASE to 6.3-RELEASE my 
 NetMOS-based 4 port serial card (ExSys EX-41054 [1]) is not 
 recognized any more.
 
    [1] http://www.exsys.ch/download/catalog/ex_41054.pdf
 
 pciconf -l only showed this, nothing was in dmesg:
 
 none1@pci9:3:0:  class=0x070002 card=0x00041000 chip=0x98459710 
 rev=0x01 hdr=0x00
 
 I reverted some of the patch (see attachment) and now my 4 port 
 serial card is available again:
 
 pciconf -l output:
 puc0@pci9:3:0: class=0x070002 card=0x00041000 chip=0x98459710 
 rev=0x01 hdr=0x00
 
 extract from dmesg:
 puc0: <NetMos NM9845 Quad UART> port 
 0x4030-0x4037,0x4028-0x402f,0x4020-0x4027,0x4018-0x401f,0x4010-0x4017,0x4000-0x400f 
 irq 72 at device 3.0 on pci9
 sio4: <NetMos NM9845 Quad UART> on puc0
 sio4: type 16550A
 sio5: <NetMos NM9845 Quad UART> on puc0
 sio5: type 16550A
 sio6: <NetMos NM9845 Quad UART> on puc0
 sio6: type 16550A
 sio7: <NetMos NM9845 Quad UART> on puc0
 sio7: type 16550A
 
 
 As I do not have a 6 port serial card available, I don't know if 
 this will still work with my "fix".
 
 
 bye
 Fabian
 
 --------------020708020401090508010700
 Content-Type: text/plain; x-mac-type="0"; x-mac-creator="0";
  name="pucdata.c.patch"
 Content-Transfer-Encoding: 7bit
 Content-Disposition: inline;
  filename="pucdata.c.patch"
 
 --- sys/dev/puc/pucdata.c.orig	2008-01-20 11:56:38.000000000 +0100
 +++ sys/dev/puc/pucdata.c	2008-02-16 11:18:18.000000000 +0100
 @@ -946,8 +946,8 @@
  
  	/* NetMos 4S0P PCI: 4S, 0P */
  	{   "NetMos NM9845 Quad UART",
 -	    {	0x9710,	0x9845,	0,	0x0014	},
 -	    {	0xffff,	0xffff,	0,	0xffff	},
 +	    {	0x9710,	0x9845,	0,	0	},
 +	    {	0xffff,	0xffff,	0,	0	},
  	    {
  		{ PUC_PORT_TYPE_COM, 0x10, 0x00, COM_FREQ },
  		{ PUC_PORT_TYPE_COM, 0x14, 0x00, COM_FREQ },
 
 --------------020708020401090508010700--
>Unformatted:
