>Number: 151365 >Category: kern >Synopsis: [patch] Two new Moxa puc(4) devices >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Sun Oct 10 15:00:06 UTC 2010 >Closed-Date: >Last-Modified: >Originator: Joerg Niendorf <f5d...@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 r...@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: >Unformatted: _______________________________________________ freebsd-bugs@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-bugs To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"