From owner-freebsd-bugs Sun Jan 3 16:30:09 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id QAA29867 for freebsd-bugs-outgoing; Sun, 3 Jan 1999 16:30:09 -0800 (PST) (envelope-from owner-freebsd-bugs@FreeBSD.ORG) Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id QAA29853 for ; Sun, 3 Jan 1999 16:30:08 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.8.8/8.8.5) id QAA26569; Sun, 3 Jan 1999 16:30:01 -0800 (PST) Received: (from nobody@localhost) by hub.freebsd.org (8.8.8/8.8.8) id QAA28913; Sun, 3 Jan 1999 16:21:41 -0800 (PST) (envelope-from nobody) Message-Id: <199901040021.QAA28913@hub.freebsd.org> Date: Sun, 3 Jan 1999 16:21:41 -0800 (PST) From: petry@netmasters.com To: freebsd-gnats-submit@FreeBSD.ORG X-Send-Pr-Version: www-1.0 Subject: kern/9297: pps driver doesn't clear ppbus control port on open or close Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 9297 >Category: kern >Synopsis: pps driver doesn't clear ppbus control port on open or close >Confidential: no >Severity: serious >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sun Jan 3 16:30:01 PST 1999 >Closed-Date: >Last-Modified: >Originator: Michael Petry >Release: 3.0 Current >Organization: >Environment: FreeBSD zditto.NetMasters.Com 3.0-CURRENT FreeBSD 3.0-CURRENT #6: Sun Jan 3 18:54:57 EST 1999 petry@zditto.NetMasters.Com:/usr/src/sys/compile/PC.UP i386 >Description: /sys/dev/ppbus/pps.c doesn't clear the device control registers on ppsopen. It should also clean up in ppsclose to avoid confusion for other ppbus users, >How-To-Repeat: Open the device. Close the device. Try to reopen. The open will complete, but the device may not interrupt since the control register was never reset. >Fix: *** /sys/dev/ppbus/pps.c Thu Dec 10 22:10:08 1998 --- pps.c Sun Jan 3 19:11:10 1999 *************** *** 133,138 **** --- 135,142 ---- if (ppb_request_bus(&sc->pps_dev, PPB_WAIT|PPB_INTR)) return (EINTR); + ppb_wctr(&sc->pps_dev, 0); + ppb_wctr(&sc->pps_dev, IRQENABLE); return(0); *************** *** 144,149 **** --- 148,157 ---- struct pps_data *sc = softc[minor(dev)]; sc->ppsparam.mode = 0; + + ppb_wdtr(&sc->pps_dev, 0); + ppb_wctr(&sc->pps_dev, 0); + ppb_release_bus(&sc->pps_dev); return(0); } >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message