[sane-devel] Scanner (USB) not found after kernel upgrade
Johannes Meixner
jsmeix at suse.de
Tue Feb 14 13:54:29 UTC 2006
Hello,
On Feb 13 23:34 Couriousous wrote (shortened):
> Le Lundi 13 Février 2006 16:22, Johannes Meixner a écrit :
> > On Feb 7 21:32 Till Kamppeter wrote (shortened):
> > > The usblp module can be replaced by a libusb-based CUPS backend.
> > > Download
> > >
> > > http://www.linuxprinting.org/till/tmp/usb-libusb.c
>
> > For me it hangs up during list_devices() with endless
> > ---------------------------------------------------------
> > INFO: USB printer is busy; will retry in 5 seconds...
> > ---------------------------------------------------------
>
> Can you try the attached patch ?
> I've modified the libusb cups backend so it doesn't loop if the
> configuration setting doesn't work.
Now it works of course but now you do exaclty the same as SANE:
You ignore this error but as far as I know the "kernel folks"
regard this as wrong and we are again at the beginning where
I wrote on sane-devel at lists.alioth.debian.org
-------------------------------------------------------------
I asked several people and even one of "the kernel folks"
for documentation how to correctly talk to a USB device
which has more than one interface so that SANE could do it
correctly but no such documentation was available.
-------------------------------------------------------------
:-(
> As the printer is already claimed by an another driver,
> the kernel doesn't want to change device's configuration,
> but it should anyway allow printing.
> > ----------------------------------------------------------------
> > usbfs: interface 2 claimed by usb-storage while ... sets config
> > ----------------------------------------------------------------
This shows - at least as far as I understand it - that
this "another driver" is the kernel module usb-storage.
But why does the driver for the cardreader unit claim
the printer unit?
For me this looks like a bug in the driver for the cardreader
unit i.e. a kernel-module bug i.e. a kernel bug.
Again the same question:
How to talk correctly to a USB device with more than one interface?
This question seem to be the core of all the problems.
> Cups specify explicitly that backend should loop if
> the printer is busy.
I assume you are talking about "CUPS Software Programmers Manual",
"Writing Backends", "Retries":
-------------------------------------------------------------------
All backends must retry connections to the device. This includes
backends that talk to local character or block devices, as the
user may define more than one printer queue pointing at the same
physical device.
-------------------------------------------------------------------
On the one hand this is correct but note what is actually meant:
"Retry if the device is accessible but at the moment it is busy",
i.e. retry if a later attempt should be successful.
On the other hand:
If a backend receives an error condition which indicates that a
later attempt is not successful (e.g. the USB system reports a
fatal error which indicates that USB access will not work at all),
then it should exit with non-zero exit code so that the cupsd
disables the queue, see for example
http://portal.suse.com/sdb/en/2004/05/jsmeix_print-cups-in-a-nutshell.html
"The Backends"
Kind Regards
Johannes Meixner
--
SUSE LINUX Products GmbH, Maxfeldstrasse 5 Mail: jsmeix at suse.de
90409 Nuernberg, Germany WWW: http://www.suse.de/
More information about the sane-devel
mailing list