From owner-freebsd-bugs@FreeBSD.ORG Sun Oct 19 04:50:02 2008 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 56E871065687 for ; Sun, 19 Oct 2008 04:50:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 2E9B18FC0A for ; Sun, 19 Oct 2008 04:50:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id m9J4o1K2050196 for ; Sun, 19 Oct 2008 04:50:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id m9J4o1mR050195; Sun, 19 Oct 2008 04:50:01 GMT (envelope-from gnats) Resent-Date: Sun, 19 Oct 2008 04:50:01 GMT Resent-Message-Id: <200810190450.m9J4o1mR050195@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, "Thinker K.F. Li" Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BDCF21065689 for ; Sun, 19 Oct 2008 04:44:10 +0000 (UTC) (envelope-from thinker@branda.to) Received: from msr26.hinet.net (msr26.hinet.net [168.95.4.126]) by mx1.freebsd.org (Postfix) with ESMTP id B99638FC0A for ; Sun, 19 Oct 2008 04:44:09 +0000 (UTC) (envelope-from thinker@branda.to) Received: from cowboy.branda.to (122-120-16-55.dynamic.hinet.net [122.120.16.55]) by msr26.hinet.net (8.9.3/8.9.3) with ESMTP id MAA09530 for ; Sun, 19 Oct 2008 12:26:50 +0800 (CST) Received: from cowboy.branda.to (localhost [127.0.0.1]) by cowboy.branda.to (8.14.2/8.14.2) with ESMTP id m9J4QoZZ064565 for ; Sun, 19 Oct 2008 12:26:50 +0800 (CST) (envelope-from thinker@cowboy.branda.to) Received: (from thinker@localhost) by cowboy.branda.to (8.14.2/8.14.2/Submit) id m9J4QomM064564; Sun, 19 Oct 2008 12:26:50 +0800 (CST) (envelope-from thinker) Message-Id: <200810190426.m9J4QomM064564@cowboy.branda.to> Date: Sun, 19 Oct 2008 12:26:50 +0800 (CST) From: "Thinker K.F. Li" To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: kern/128219: puc driver can not handle parallel port card with SUN1888 chip. X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: "Thinker K.F. Li" List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Oct 2008 04:50:02 -0000 >Number: 128219 >Category: kern >Synopsis: puc driver can not handle parallel port card with SUN1888 chip. >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: update >Submitter-Id: current-users >Arrival-Date: Sun Oct 19 04:50:01 UTC 2008 >Closed-Date: >Last-Modified: >Originator: Thinker K.F. Li >Release: FreeBSD 8.0-CURRENT i386 >Organization: allwitz.com >Environment: System: FreeBSD cowboy.branda.to 8.0-CURRENT FreeBSD 8.0-CURRENT #7: Fri Oct 17 22:32:29 CST 2008 thinker@cowboy.branda.to:/usr/src/sys/i386/compile/cowboy i386 >Description: puc(4) is a Universal driver for serial & parallel ports. It supports variaous chips & boards except the one I bought from market, SUnix's daul ports parallel card with SUN1888 chip. >How-To-Repeat: Plug a parallel port card with SUN1888 to your FreeBSD box and try to drive it with puc driver module. Nothing is happening. puc(4) can not even recoganize the card. >Fix: apply following small patch on src/sys/dev/puc/, and rebuild the module in src/sys/modules/puc/. --- patch-freebsd-puc.diff begins here --- --- puc.c.orig 2008-10-17 23:55:22.000000000 +0800 +++ puc.c 2008-10-18 15:50:10.000000000 +0800 @@ -606,7 +606,7 @@ if (cookiep == NULL || res != port->p_ires) return (EINVAL); /* We demand that serdev devices use filter_only interrupts. */ - if (ihand != NULL) + if (ihand != NULL && port->p_type == PUC_TYPE_SERIAL) return (ENXIO); if (rman_get_device(port->p_ires) != originator) return (ENXIO); --- pucdata.c.orig 2008-10-17 15:50:37.000000000 +0800 +++ pucdata.c 2008-10-18 03:01:56.000000000 +0800 @@ -586,6 +586,12 @@ .config_function = puc_config_timedia }, + { 0x1409, 0x7268, 0xffff, 0, + "Sunix SUN1888 2 Port Parallel", + DEFAULT_RCLK * 8, + PUC_PORT_2P, 0x10, 8, 0, + }, + /* * Boards with an Oxford Semiconductor chip. * --- patch-freebsd-puc.diff ends here --- >Release-Note: >Audit-Trail: >Unformatted: