Date: Sun, 3 Jan 1999 16:21:41 -0800 (PST) From: petry@netmasters.com To: freebsd-gnats-submit@FreeBSD.ORG Subject: kern/9297: pps driver doesn't clear ppbus control port on open or close Message-ID: <199901040021.QAA28913@hub.freebsd.org>
next in thread | raw e-mail | index | archive | help
>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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199901040021.QAA28913>