From nobody@FreeBSD.org  Mon Nov  8 03:50:19 2010
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 1912C106566C
	for <freebsd-gnats-submit@FreeBSD.org>; Mon,  8 Nov 2010 03:50:19 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id 065E48FC0A
	for <freebsd-gnats-submit@FreeBSD.org>; Mon,  8 Nov 2010 03:50:19 +0000 (UTC)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.3/8.14.3) with ESMTP id oA83oIOA050491
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 8 Nov 2010 03:50:18 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.3/8.14.3/Submit) id oA83oIaD050490;
	Mon, 8 Nov 2010 03:50:18 GMT
	(envelope-from nobody)
Message-Id: <201011080350.oA83oIaD050490@www.freebsd.org>
Date: Mon, 8 Nov 2010 03:50:18 GMT
From: Hans Fiedler <hans@hermes.louisville.edu>
To: freebsd-gnats-submit@FreeBSD.org
Subject: [puc] [patch] SIIG Cyber 2S PCIe not working correcty with puc driver
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         152034
>Category:       kern
>Synopsis:       [puc] [patch] SIIG Cyber 2S PCIe not working correcty with puc driver
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    jhb
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon Nov 08 04:00:18 UTC 2010
>Closed-Date:    Wed Jun 08 21:29:57 UTC 2011
>Last-Modified:  Wed Jun 08 21:29:57 UTC 2011
>Originator:     Hans Fiedler
>Release:        8.1-STABLE
>Organization:
University of Louisville
>Environment:
FreeBSD netwatch.louisville.edu 8.1-STABLE FreeBSD 8.1-STABLE #7: Thu Oct 14 20:00:36 EDT 2010     syshans@distribution8.louisville.edu:/usr/obj/usr/src/sys/X3250  amd64


>Description:
The SIIG Cyber 2S PCIe (JJ-E20011) port serial card doesn't seem to function
correctly.  Changing the 'DEFAULT_RCLK *10'seems to get it working correctly.
before patching pucdata.c shows this

devinfo -v

        pcib2 pnpinfo vendor=0x8086 device=0x2940 subvendor=0x1014 subdevice=0x0377 class=0x060400 at slot=28 function=0 handle=\_SB_.PCI0.EXP1
          pci8
            pcib3 pnpinfo vendor=0x104c device=0x8231 subvendor=0x0000 subdevice=0x0000 class=0x060400 at slot=0 function=0 handle=\_SB_.PCI0.EXP1.PXS1
              pci9
                puc0 pnpinfo vendor=0x1415 device=0x950a subvendor=0x131f subdevice=0x2030 class=0x070006 at slot=0 function=0
                  uart2
                  uart3
                  uart4
                  uart5
                unknown pnpinfo vendor=0x1415 device=0x9510 subvendor=0x131f subdevice=0x0000 class=0x070101 at slot=0 function=1

and pciconf -lv

puc0@pci0:9:0:0:        class=0x070006 card=0x2030131f chip=0x950a1415 rev=0x00 hdr=0x00
    vendor     = 'Oxford Semiconductor Ltd - now part of PLX Technology'
    device     = 'OX16PCI954 Dual PCI UART (??)'
    class      = simple comms
    subclass   = UART
none1@pci0:9:0:1:       class=0x070101 card=0x0000131f chip=0x95101415 rev=0x00 hdr=0x00
    vendor     = 'Oxford Semiconductor Ltd - now part of PLX Technology'
    device     = 'PCI Interface (disabled) (OX16PCI954)'
    class      = simple comms
    subclass   = parallel port

after, and the ports seem to be working OK

devinfo -v

        pcib2 pnpinfo vendor=0x8086 device=0x2940 subvendor=0x1014 subdevice=0x0377 class=0x060400 at slot=28 function=0 handle=\_SB_.PCI0.EXP1
          pci8
            pcib3 pnpinfo vendor=0x104c device=0x8231 subvendor=0x0000 subdevice=0x0000 class=0x060400 at slot=0 function=0 handle=\_SB_.PCI0.EXP1.PXS1
              pci9
                puc0 pnpinfo vendor=0x1415 device=0x950a subvendor=0x131f subdevice=0x2030 class=0x070006 at slot=0 function=0
                  uart2
                  uart3
                  uart4
                  uart5
                unknown pnpinfo vendor=0x1415 device=0x9510 subvendor=0x131f subdevice=0x0000 class=0x070101 at slot=0 function=1

pciconf -vl

puc0@pci0:9:0:0:        class=0x070006 card=0x2030131f chip=0x950a1415 rev=0x00 hdr=0x00
    vendor     = 'Oxford Semiconductor Ltd - now part of PLX Technology'
    device     = 'OX16PCI954 Dual PCI UART (??)'
    class      = simple comms
    subclass   = UART
none1@pci0:9:0:1:       class=0x070101 card=0x0000131f chip=0x95101415 rev=0x00 hdr=0x00
    vendor     = 'Oxford Semiconductor Ltd - now part of PLX Technology'
    device     = 'PCI Interface (disabled) (OX16PCI954)'
    class      = simple comms
    subclass   = parallel port

>How-To-Repeat:
The problem is repeatable in that two ports on the same system can communicate OK, but to external device the data rate of off.
>Fix:
I have a patch I'm attaching, I included the the above devinfo and pciconf as I expect a better solution is to add another device entry, instead if changing the existing info.  Changing the DEFAULT_RCLK on this entry did fix the problem for this device.

Patch attached with submission follows:

*** pucdata.c-ORIG      Wed Oct 13 14:50:51 2010
--- pucdata.c   Sun Nov  7 22:41:15 2010
***************
*** 639,645 ****

        {   0x1415, 0x950a, 0xffff, 0,
            "Oxford Semiconductor OX16PCI954 UARTs",
!           DEFAULT_RCLK,
            PUC_PORT_4S, 0x10, 0, 8,
        },

--- 639,645 ----

        {   0x1415, 0x950a, 0xffff, 0,
            "Oxford Semiconductor OX16PCI954 UARTs",
!           DEFAULT_RCLK * 10,
            PUC_PORT_4S, 0x10, 0, 8,
        },


>Release-Note:
>Audit-Trail:

From: John Baldwin <jhb@FreeBSD.org>
To: bug-followup@FreeBSD.org, hans@hermes.louisville.edu
Cc:  
Subject: Re: kern/152034: [puc] [patch] SIIG Cyber 2S PCIe not working correcty
 with puc driver
Date: Thu, 28 Apr 2011 15:32:31 -0400

 Please try this patch.  Also, does your adapter actually have 4 serial 
 ports or only 2?
 
 Index: pucdata.c
 ===================================================================
 --- pucdata.c	(revision 221182)
 +++ pucdata.c	(working copy)
 @@ -638,12 +638,26 @@ const struct puc_cfg puc_pci_devices[] = {
   	    PUC_PORT_4S, 0x10, 0, 8,
   	},
 
 +	/* PR: kern/147583 */
 +	{   0x1415, 0x9501, 0x131f, 0x2052,
 +	    "SIIG Quartet Serial 850",
 +	    DEFAULT_RCLK * 10,
 +	    PUC_PORT_4S, 0x10, 0, 8,
 +	},
 +
   	{   0x1415, 0x9501, 0xffff, 0,
   	    "Oxford Semiconductor OX16PCI954 UARTs",
   	    DEFAULT_RCLK,
   	    PUC_PORT_4S, 0x10, 0, 8,
   	},
 
 +	/* PR: kern/152034 */
 +	{   0x1415, 0x950a, 0x131f, 0x2030,
 +	    "SIIG Cyber 2S PCIe",
 +	    DEFAULT_RCLK * 10,
 +	    PUC_PORT_2S, 0x10, 0, 8,
 +	},
 +
   	{   0x1415, 0x950a, 0xffff, 0,
   	    "Oxford Semiconductor OX16PCI954 UARTs",
   	    DEFAULT_RCLK,
 
 -- 
 John Baldwin

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/152034: commit references a PR
Date: Thu, 19 May 2011 11:41:22 +0000 (UTC)

 Author: jhb
 Date: Thu May 19 11:41:12 2011
 New Revision: 222093
 URL: http://svn.freebsd.org/changeset/base/222093
 
 Log:
   Add support for the SIIG Cyber 2S PCIe adapter.  It is based on an
   Oxford Semiconductor OX16PCI954 but uses only two ports with a non-default
   clock rate.
   
   PR:		kern/152034
   Tested by:	Hans Fiedler  hans of hermes louisville edu
   MFC after:	1 week
 
 Modified:
   head/sys/dev/puc/pucdata.c
 
 Modified: head/sys/dev/puc/pucdata.c
 ==============================================================================
 --- head/sys/dev/puc/pucdata.c	Thu May 19 07:09:13 2011	(r222092)
 +++ head/sys/dev/puc/pucdata.c	Thu May 19 11:41:12 2011	(r222093)
 @@ -656,6 +656,12 @@ const struct puc_cfg puc_pci_devices[] =
  	    PUC_PORT_4S, 0x10, 0, 8,
  	},
  
 +	{   0x1415, 0x950a, 0x131f, 0x2030,
 +	    "SIIG Cyber 2S PCIe",
 +	    DEFAULT_RCLK * 10,
 +	    PUC_PORT_2S, 0x10, 0, 8,
 +	},
 +
  	{   0x1415, 0x950a, 0xffff, 0,
  	    "Oxford Semiconductor OX16PCI954 UARTs",
  	    DEFAULT_RCLK,
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: open->patched 
State-Changed-By: jhb 
State-Changed-When: Thu May 19 12:22:50 UTC 2011 
State-Changed-Why:  
Committed to HEAD. 


Responsible-Changed-From-To: freebsd-bugs->jhb 
Responsible-Changed-By: jhb 
Responsible-Changed-When: Thu May 19 12:22:50 UTC 2011 
Responsible-Changed-Why:  
Committed to HEAD. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=152034 
State-Changed-From-To: patched->closed 
State-Changed-By: jhb 
State-Changed-When: Wed Jun 8 21:29:25 UTC 2011 
State-Changed-Why:  
Fix merged to 8. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=152034 
>Unformatted:
