From owner-freebsd-bugs Sat Oct 2 20:10: 6 1999 Delivered-To: freebsd-bugs@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id 2A43914DC4 for ; Sat, 2 Oct 1999 20:10:01 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id UAA55129; Sat, 2 Oct 1999 20:10:01 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from iss-p1.lbl.gov (iss-p1.lbl.gov [131.243.2.47]) by hub.freebsd.org (Postfix) with ESMTP id 7D76914D2C for ; Sat, 2 Oct 1999 20:00:33 -0700 (PDT) (envelope-from jin@iss-p1.lbl.gov) Received: (from jin@localhost) by iss-p1.lbl.gov (8.9.3/8.9.3) id UAA29855; Sat, 2 Oct 1999 20:00:31 -0700 (PDT) (envelope-from jin) Message-Id: <199910030300.UAA29855@iss-p1.lbl.gov> Date: Sat, 2 Oct 1999 20:00:31 -0700 (PDT) From: Jin Guojun (FTG staff) Reply-To: j_guojun@lbl.gov To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.2 Subject: kern/14096: parallel port -- ppi -- driver broken after 3.3-RELEASE Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 14096 >Category: kern >Synopsis: parallel port -- ppi -- driver broken after 3.3-RELEASE >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sat Oct 2 20:10:00 PDT 1999 >Closed-Date: >Last-Modified: >Originator: Jin Guojun (FTG staff) >Release: FreeBSD 3.3-RELEASE i386 >Organization: >Environment: FreeBSD 3.3-RELEASE or later All version prior to 3.3-RELEASE are OK >Description: The ppi driver will return error "Error<22> Invalid argument" if I/O frequency is higher than 250 Hz. The version prior to 3.3-RELEASE can do I/O at least 5000Hz without problem. This is repeatable problem. 100 freq = 100.000000 : 0 125 freq = 125.000000 : 0 150 freq = 150.015002 : 0 175 freq = 175.008750 : 0 200 freq = 200.000000 : 0 225 freq = 225.022502 : 0 250 freq = 250.000000 : 0 249 freq = 249.003984 : 0 248 freq = 248.015873 : 0 act freq = 158.220191 249 freq = 249.003984 : 0 250 freq = 250.000000 : 0 act freq = 247.870888 251 freq = 251.004016 : 0 252 freq = 252.016129 : 0 act freq = 249.957130 ? [NoVer] : ioc = 255; Error<22> Invalid argument ? [NoVer] : ioc = 0; Error<22> Invalid argument >How-To-Repeat: pio(int pp_fd, u_int8_t *c, bool in) /* real code */ { static int errs; u_int8_t sval; ioctl(pp_fd, in ? PPIGDATA : PPISDATA, c); if (errno && errno != EINTR) { prgmerr(0, "ioc = %d", *c); if (errs++ > 2) clean_up(-errs); } } main() /* semi pesudo code */ { u_int8_t iob=0; struct pioargu tc; u_thread_t tid; /* create a thread to change the frequence timer */ u_thread_create(&tid, 0, freq_input, &tc); Loop { pio(pd, &iob, 0); delay(tc.pio_tm.tv_sec, tc.pio_tm.tv_usec); iob = ~iob; pio(pd, &iob, 0); delay(tc.pio_tm.tv_sec, tc.pio_tm.tv_usec); iob = ~iob; } clean_up(-1); } >Fix: >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message