lkml.org 
[lkml]   [1999]   [Dec]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectSome more details on parport autoprobing bug
The printer seems to have a problem switching to IEEE1284_DEVICEID mode
shortly after initialization.

It happens in userspace, too, if the program accessing /dev/parport0 has
to autoload the module.

In userspace, my workaround (ugly, but works) is replacing
mode = IEEE1284_MODE_NIBBLE | IEEE1284_DEVICEID;
ioctl(fd, PPNEGOT, &mode);
with
result = 1;
mode = IEEE1284_MODE_NIBBLE | IEEE1284_DEVICEID;
for(i=0; i<15 && result!=0; i++)
result=ioctl(fd, PPNEGOT, &mode);

I guess the kernel autoprobing fails because of the exact same thing.
errno = 5 for the first couple of ioctl()s.

LLaP
bero

--
Nobody will ever need more than 640 kB RAM.
-- Bill Gates, 1983
Windows 98 requires 16 MB RAM.
-- Bill Gates, 1999
Nobody will ever need Windows 98.
-- logical conclusion


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:55    [W:0.448 / U:0.192 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site