Date: Sat, 2 Oct 1999 20:00:31 -0700 (PDT) From: Jin Guojun (FTG staff) <jin@iss-p1.lbl.gov> To: FreeBSD-gnats-submit@freebsd.org Subject: kern/14096: parallel port -- ppi -- driver broken after 3.3-RELEASE Message-ID: <199910030300.UAA29855@iss-p1.lbl.gov>
index | next in thread | raw e-mail
>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
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199910030300.UAA29855>
