From f5d10a@internode.on.net  Sun Oct 10 14:54:27 2010
Return-Path: <f5d10a@internode.on.net>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id A772C106566C
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 10 Oct 2010 14:54:27 +0000 (UTC)
	(envelope-from f5d10a@internode.on.net)
Received: from ipmail07.adl2.internode.on.net (ipmail07.adl2.internode.on.net [150.101.137.131])
	by mx1.freebsd.org (Postfix) with ESMTP id 3E3788FC16
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 10 Oct 2010 14:54:26 +0000 (UTC)
Received: from ppp118-208-132-82.lns20.bne1.internode.on.net (HELO pri.jn) ([118.208.132.82])
  by ipmail07.adl2.internode.on.net with SMTP; 11 Oct 2010 01:09:10 +1030
Message-Id: <20101011003557.3590f372.f5d10a@internode.on.net>
Date: Mon, 11 Oct 2010 00:35:57 +1000
From: Joerg Niendorf <f5d10a@internode.on.net>
To: FreeBSD-gnats-submit@freebsd.org
Subject: [patch] Two new Moxa puc(4) devices

>Number:         151365
>Category:       kern
>Synopsis:       [puc] [patch] Two new Moxa puc(4) devices
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    eadler
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sun Oct 10 15:00:06 UTC 2010
>Closed-Date:    Fri Jan 13 03:50:16 UTC 2012
>Last-Modified:  Fri Jan 13 03:50:16 UTC 2012
>Originator:     Joerg Niendorf <f5d10a@internode.on.net>
>Release:        FreeBSD 9.0-CURRENT amd64
>Organization:
none
>Environment:
FreeBSD fbsd.jn.local 9.0-CURRENT FreeBSD 9.0-CURRENT #1: Sun Oct 10 21:44:36 EST 2010
     root@fbsd.jn.local:/usr/obj/usr/src/sys/GENERIC  amd64


>Description:

The below patch adds support for two Moxa puc(4) devices, the
CP-104EL-A and the CP-104JU. I have tested all four ports on both
cards.

Maybe someone can commit the patch. Thanks.

The relevant dmesg output:

puc0: <Moxa Technologies, Smartio CP-104EL-A/PCIe> port 0xc800-0xc83f,0xc400-0xc40f mem 0xfbdff000-0xfbdfffff irq 28 at device 0.0 on pci3
uart2: <16950 or compatible> on puc0
uart3: <16950 or compatible> on puc0
uart4: <16950 or compatible> on puc0
uart5: <16950 or compatible> on puc0

puc1: <Moxa Technologies, Smartio CP-104JU/PCI> port 0xe800-0xe81f,0xe400-0xe43f,0xe000-0xe00f irq 16 at device 6.0 on pci5
uart6: <16950 or compatible> on puc1
uart7: <16950 or compatible> on puc1
uart8: <16950 or compatible> on puc1
uart9: <16950 or compatible> on puc1


>How-To-Repeat:

N/A


>Fix:

Index: pucdata.c
===================================================================
RCS file: /home/ncvs/src/sys/dev/puc/pucdata.c,v
retrieving revision 1.75
diff -u -r1.75 pucdata.c
--- pucdata.c	20 May 2010 13:16:42 -0000	1.75
+++ pucdata.c	10 Oct 2010 08:41:03 -0000
@@ -51,6 +51,7 @@
 static puc_config_f puc_config_cronyx;
 static puc_config_f puc_config_diva;
 static puc_config_f puc_config_icbook;
+static puc_config_f puc_config_moxa;
 static puc_config_f puc_config_quatech;
 static puc_config_f puc_config_syba;
 static puc_config_f puc_config_siig;
@@ -517,12 +518,25 @@
 	    PUC_PORT_4S, 0x18, 0, 8,
 	},
 
+	{   0x1393, 0x1042, 0xffff, 0,
+	    "Moxa Technologies, Smartio CP-104JU/PCI",
+	    DEFAULT_RCLK * 8,
+	    PUC_PORT_4S, 0x18, 0, 8,
+	},
+
 	{   0x1393, 0x1043, 0xffff, 0,
 	    "Moxa Technologies, Smartio CP-104EL/PCIe",
 	    DEFAULT_RCLK * 8,
 	    PUC_PORT_4S, 0x18, 0, 8,
 	},
 
+	{   0x1393, 0x1045, 0xffff, 0,
+	    "Moxa Technologies, Smartio CP-104EL-A/PCIe",
+	    DEFAULT_RCLK * 8,
+	    PUC_PORT_4S, 0x14, 0, -1,
+	    .config_function = puc_config_moxa
+	},
+
 	{   0x1393, 0x1141, 0xffff, 0,
 	    "Moxa Technologies, Industio CP-114",
 	    DEFAULT_RCLK * 8,
@@ -971,6 +985,19 @@
 }
 
 static int
+puc_config_moxa(struct puc_softc *sc, enum puc_cfg_cmd cmd, int port,
+    intptr_t *res)
+{
+	const struct puc_cfg *cfg = sc->sc_cfg;
+	
+	if (cmd == PUC_CFG_GET_OFS && cfg->device == 0x1045) {
+		*res = ((port == 3) ? 7 : port) * 0x200;
+		return 0;
+	}
+	return (ENXIO);
+}
+
+static int
 puc_config_quatech(struct puc_softc *sc, enum puc_cfg_cmd cmd, int port,
     intptr_t *res)
 {
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->eadler 
Responsible-Changed-By: eadler 
Responsible-Changed-When: Sat Oct 15 21:39:58 UTC 2011 
Responsible-Changed-Why:  
Not my field, but I'll nag someone about these PRS 

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

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/151365: commit references a PR
Date: Fri, 11 Nov 2011 22:24:27 +0000 (UTC)

 Author: eadler (ports committer)
 Date: Fri Nov 11 22:24:16 2011
 New Revision: 227457
 URL: http://svn.freebsd.org/changeset/base/227457
 
 Log:
   - add support for CP-104EL-A and CP-104JU to puc
   
   PR:		151365
   Submitted by:	Joerg Niendorf <f5d10a@internode.on.net>
   Approved by:	jhb
 
 Modified:
   head/sys/dev/puc/pucdata.c
 
 Modified: head/sys/dev/puc/pucdata.c
 ==============================================================================
 --- head/sys/dev/puc/pucdata.c	Fri Nov 11 21:57:31 2011	(r227456)
 +++ head/sys/dev/puc/pucdata.c	Fri Nov 11 22:24:16 2011	(r227457)
 @@ -51,6 +51,7 @@ static puc_config_f puc_config_amc;
  static puc_config_f puc_config_diva;
  static puc_config_f puc_config_exar;
  static puc_config_f puc_config_icbook;
 +static puc_config_f puc_config_moxa;
  static puc_config_f puc_config_oxford_pcie;
  static puc_config_f puc_config_quatech;
  static puc_config_f puc_config_syba;
 @@ -518,12 +519,25 @@ const struct puc_cfg puc_pci_devices[] =
  	    PUC_PORT_4S, 0x18, 0, 8,
  	},
  
 +	{   0x1393, 0x1042, 0xffff, 0,
 +	    "Moxa Technologies, Smartio CP-104JU/PCI",
 +	    DEFAULT_RCLK * 8,
 +	    PUC_PORT_4S, 0x18, 0, 8,
 +	},
 +
  	{   0x1393, 0x1043, 0xffff, 0,
  	    "Moxa Technologies, Smartio CP-104EL/PCIe",
  	    DEFAULT_RCLK * 8,
  	    PUC_PORT_4S, 0x18, 0, 8,
  	},
  
 +	{   0x1393, 0x1045, 0xffff, 0,
 +	    "Moxa Technologies, Smartio CP-104EL-A/PCIe",
 +	    DEFAULT_RCLK * 8,
 +	    PUC_PORT_4S, 0x14, 0, -1,
 +		.config_function = puc_config_moxa
 +	},
 +
  	{   0x1393, 0x1120, 0xffff, 0,
  	    "Moxa Technologies, CP-112UL",
  	    DEFAULT_RCLK * 8,
 @@ -1086,6 +1100,19 @@ puc_config_icbook(struct puc_softc *sc, 
  }
  
  static int
 +puc_config_moxa(struct puc_softc *sc, enum puc_cfg_cmd cmd, int port,
 +    intptr_t *res)
 +{
 +	const struct puc_cfg *cfg = sc->sc_cfg;
 +	
 +	if (cmd == PUC_CFG_GET_OFS && cfg->device == 0x1045) {
 +		*res = ((port == 3) ? 7 : port) * 0x200;
 +		return 0;
 +	}
 +	return (ENXIO);
 +}
 +
 +static int
  puc_config_quatech(struct puc_softc *sc, enum puc_cfg_cmd cmd, int port,
      intptr_t *res)
  {
 _______________________________________________
 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: eadler 
State-Changed-When: Fri Nov 11 22:30:53 UTC 2011 
State-Changed-Why:  
committed in head 

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

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/151365: commit references a PR
Date: Thu, 17 Nov 2011 14:06:09 +0000 (UTC)

 Author: eadler (ports committer)
 Date: Thu Nov 17 14:05:59 2011
 New Revision: 227624
 URL: http://svn.freebsd.org/changeset/base/227624
 
 Log:
   Record the merge of r227457, which was done as part of r227565 but not mentioned in the commit log
   
   PR:		kern/142999
   PR:		kern/151365
   Submitted by:	Takefu Kenji <takefu@airport.fm>
   Submitted by:	Joerg Niendorf <f5d10a@internode.on.net>
   Approved by:	re (kib)
 
 Modified:
 Directory Properties:
   stable/9/sys/   (props changed)
   stable/9/sys/amd64/include/xen/   (props changed)
   stable/9/sys/boot/   (props changed)
   stable/9/sys/boot/i386/efi/   (props changed)
   stable/9/sys/boot/ia64/efi/   (props changed)
   stable/9/sys/boot/ia64/ski/   (props changed)
   stable/9/sys/boot/powerpc/boot1.chrp/   (props changed)
   stable/9/sys/boot/powerpc/ofw/   (props changed)
   stable/9/sys/cddl/contrib/opensolaris/   (props changed)
   stable/9/sys/conf/   (props changed)
   stable/9/sys/contrib/dev/acpica/   (props changed)
   stable/9/sys/contrib/octeon-sdk/   (props changed)
   stable/9/sys/contrib/pf/   (props changed)
   stable/9/sys/contrib/x86emu/   (props changed)
 _______________________________________________
 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"
 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/151365: commit references a PR
Date: Thu, 17 Nov 2011 14:06:53 +0000 (UTC)

 Author: eadler (ports committer)
 Date: Thu Nov 17 14:06:39 2011
 New Revision: 227625
 URL: http://svn.freebsd.org/changeset/base/227625
 
 Log:
   Record the merge of r227457, which was done as part of r227565 but not mentioned in the commit log
   
   PR:		kern/142999
   PR:		kern/151365
   Submitted by:	Takefu Kenji <takefu@airport.fm>
   Submitted by:	Joerg Niendorf <f5d10a@internode.on.net>
   Approved by:	re (kib)
 
 Modified:
 Directory Properties:
   releng/9.0/sys/   (props changed)
   releng/9.0/sys/amd64/include/xen/   (props changed)
   releng/9.0/sys/boot/   (props changed)
   releng/9.0/sys/boot/i386/efi/   (props changed)
   releng/9.0/sys/boot/ia64/efi/   (props changed)
   releng/9.0/sys/boot/ia64/ski/   (props changed)
   releng/9.0/sys/boot/powerpc/boot1.chrp/   (props changed)
   releng/9.0/sys/boot/powerpc/ofw/   (props changed)
   releng/9.0/sys/cddl/contrib/opensolaris/   (props changed)
   releng/9.0/sys/conf/   (props changed)
   releng/9.0/sys/contrib/dev/acpica/   (props changed)
   releng/9.0/sys/contrib/octeon-sdk/   (props changed)
   releng/9.0/sys/contrib/pf/   (props changed)
   releng/9.0/sys/contrib/x86emu/   (props changed)
 _______________________________________________
 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: patched->closed 
State-Changed-By: eadler 
State-Changed-When: Fri Jan 13 03:50:15 UTC 2012 
State-Changed-Why:  
Committed. Thanks! 

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