From: Burkhard K. <bu...@bu...> - 2000-09-24 15:36:15
|
David Paschal > All I see in your 2.4 debug output is an open of the scan channel immediately > followed by a close. I assume this output corresponds to the SANE+PTAL > output you sent on September 20. In that case, we saw a successful open, > and the write() of two bytes (the SCL "Esc-E" reset command) failed (returned > -1), so the SANE backend had no choice but to give up and close the channel. > I would suggest examining the code path taken by writes (see mlc_sendmsg()). David, that set me onto the right track. The culprit was an old bug in mlc_sendmsg which just happened to remain silent with 2.2 kernel version because no flag in msghdr->flags was set from the socket layer: int nonblock = msg->msg_flags & MSG_DONTWAIT; /* XXX currently does not work with poll() */ nonblock = 0; if (debug & 0x02) printk ("mlc_sendmsg: %p credit=%d\n", sock, so->mycredit); if (msg->msg_flags & ~MSG_DONTWAIT) ^^^^^^^^^^^^^^ return = -EOPNOTSUPP; The code checked for the supplement of MSG_DONTWAIT instead of the flag itself. As long as no flag was set, all worked well but as soon as any flag besides MSG_DONTWAIT is set, the call will fail with an error return of -95, which is -EOPNOTSUPP. That's exactly what happend with a 2.4.0-test kernel, msg_flags was set to MSG_EOR, thus revealing this bug. I' ll be posting my patch seperately, asking everybody with a 2.4 kernel to test it out. I see a lot of "already open" messages from the ptal layer - maybe we have other problems as well, but "scanimage --test" runs on my box now successfully. BTW: in ieee12844/Makefile.in the "cp" expression to move kernel modules to the appropriate location was commented out. Was this done for any particular purpose? I am asking because it meant that the modules had to be installed by hand. Burkhard -- Burkhard Kohl buk at/auf buks.ipn.de |