From nobody@FreeBSD.org  Thu Jan 10 03:44:55 2008
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 961A216A417
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 10 Jan 2008 03:44:55 +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 859BF13C43E
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 10 Jan 2008 03:44:55 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.2/8.14.2) with ESMTP id m0A3hn8c094214
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 10 Jan 2008 03:43:49 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.2/8.14.1/Submit) id m0A3hn19094213;
	Thu, 10 Jan 2008 03:43:49 GMT
	(envelope-from nobody)
Message-Id: <200801100343.m0A3hn19094213@www.freebsd.org>
Date: Thu, 10 Jan 2008 03:43:49 GMT
From: Gavin Stone-Tolcher <g.stone-tolcher@its.uq.edu.au>
To: freebsd-gnats-submit@FreeBSD.org
Subject: [PATCH] support for Moxa Technologies CP-104EL PCI Express (4 port serial card)
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         119515
>Category:       kern
>Synopsis:       [puc] [patch] support for Moxa Technologies CP-104EL PCI Express (4 port serial card)
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Thu Jan 10 03:50:01 UTC 2008
>Closed-Date:    Tue Feb 26 09:34:16 UTC 2008
>Last-Modified:  Tue Feb 26 09:34:16 UTC 2008
>Originator:     Gavin Stone-Tolcher
>Release:        7.0-STABLE
>Organization:
The University of Queensland
>Environment:
FreeBSD gst.its.uq.edu.au 7.0-PRERELEASE FreeBSD 7.0-PRERELEASE #16: Thu Jan 10 12:54:53 EST 2008     xxxx@xxx.its.uq.edu.au:/usr/obj/usr/src/sys/xxx  i386
>Description:
The Moxa Technologies CP-104EL PCI Express 4 port Serial card 

would appear to use the same MOXA controller as their PCI cards 

with the addition of a PCI Express to PCI bridge chip:



It uses a different device id to the PCI cards and is not recongnised 
by the puc device without adding support.

After adding support gives:

pciconf -lv

pcib3@pci0:32:0:0:      class=0x060400 card=0x00000000 chip=0x811110b5 rev=0x21 hdr=0x01

    vendor     = 'PLX Technology Inc.'

    device     = 'PEX 8111 PCI Express-to-PCI Bridge'

    class      = bridge

    subclass   = PCI-PCI

puc0@pci0:33:0:0:       class=0x070002 card=0x10431393 chip=0x10431393 rev=0x00 hdr=0x00

    vendor     = 'Moxa Technologies Co Ltd'

    class      = simple comms

    subclass   = UART



dmesg

pcib2: <ACPI PCI-PCI bridge> irq 20 at device 28.0 on pci0

pci32: <ACPI PCI bus> on pcib2

pcib3: <ACPI PCI-PCI bridge> irq 16 at device 0.0 on pci32

pci33: <ACPI PCI bus> on pcib3

puc0: <Moxa Technologies, Smartio CP-104EL/PCIe> port 0x1040-0x105f,0x1000-0x103f,0x1060-0x106f irq 16 at device 0.0 on pci33

puc0: [FILTER]

uart0: <16950 or compatible> on puc0

uart0: [FILTER]

uart1: <16950 or compatible> on puc0

uart1: [FILTER]

uart2: <16950 or compatible> on puc0

uart2: [FILTER]

uart3: <16950 or compatible> on puc0

uart3: [FILTER]



devinfo -u



        pcib2

          pci32

            pcib3

              pci33

                puc0

                    I/O ports:

                        0x1000-0x103f

                        0x1040-0x105f

                        0x1060-0x106f

                  uart0

                      puc0 I/O port mapping:

                          4096-4103

                      puc0 port numbers:

                          1

                  uart1

                      puc0 I/O port mapping:

                          4104-4111

                      puc0 port numbers:

                          2

                  uart2

                      puc0 I/O port mapping:

                          4112-4119

                      puc0 port numbers:

                          3

                  uart3

                      puc0 I/O port mapping:

                          4120-4127

                      puc0 port numbers:

                          4



Accessing /dev/cuau0-3 with a modem attached appears to work fine.

>How-To-Repeat:
Install CP-104EL card.

Add puc device to kernel config, build kernel, install kernel, reboot.

dmesg 
Jan  9 17:46:17 xxx kernel: pci33: <simple comms, UART> at device 0.0 (no driver attached)
>Fix:
Add:
        {   0x1393, 0x1043, 0xffff, 0,
            "Moxa Technologies, Smartio CP-104EL/PCIe",
            DEFAULT_RCLK * 8,
            PUC_PORT_4S, 0x18, 0, 8,
        },

to /usr/src/sys/dev/puc/pucdata.c.

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->patched 
State-Changed-By: maxim 
State-Changed-When: Sat Jan 12 19:14:45 UTC 2008 
State-Changed-Why:  
Committed to HEAD.  Thanks! 

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

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/119515: commit references a PR
Date: Sat, 12 Jan 2008 19:14:36 +0000 (UTC)

 maxim       2008-01-12 19:14:30 UTC
 
   FreeBSD src repository
 
   Modified files:
     sys/dev/puc          pucdata.c 
   Log:
   o Add Moxa Technologies CP-104EL PCI Express 4 port Serial card.
   
   PR:             kern/119515
   Submitted by:   Gavin Stone-Tolcher
   MFC after:      1 month
   
   Revision  Changes    Path
   1.60      +6 -0      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: patched->closed 
State-Changed-By: maxim 
State-Changed-When: Tue Feb 26 09:32:05 UTC 2008 
State-Changed-Why:  
Merged to RELENG_7. 

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