Hi,

On Sun, Nov 10, 2002 at 11:49:54AM +0100, Cyrille Chepelov wrote:
> I have a problem with scanner.o now; when I plug my Epson Perfection 1240U,

Your scanner has the usual 2 endpoints (bulk-in and bulk-out), so
there shouldn't be any problem with the scanner module.

> I now see this:
> 
> Nov 10 11:24:13 muscat kernel: drivers/usb/image/scanner.c: probe_scanner: User 
>specified USB scanner -- Vendor:Product - 4b8:10b
> Nov 10 11:24:13 muscat kernel: drivers/usb/image/scanner.c: probe_scanner: 
>Undetected endpoint -- consult Documentation/usb/scanner.txt.
> Nov 10 11:24:13 muscat kernel: drivers/usb/core/usb.c: registered new driver 
>usbscanner
> Nov 10 11:24:13 muscat kernel: drivers/usb/image/scanner.c: 0.4.6:USB Scanner Driver
> 
> The problem is the second line "Undetected endpoint". What the hell? Things 
> were working mostly fine with 2.4.20-pre7. Why did 2.5 break that? 

I don't have much experience with kernel space, but let's have a look
at the 2.5.46 code:

The endpoint detection code in 2.5.46 looks like this:

endpoint = &interface->endpoint[0].desc;
[...]
while (ep_cnt < interface->desc.bNumEndpoints) {
  if (!have_bulk_in && IS_EP_BULK_IN(endpoint[ep_cnt])) {
    ep_cnt++;
    have_bulk_in = ep_cnt;
    dbg("probe_scanner: bulk_in_ep:%d", have_bulk_in);
    continue;
  }
[...]                                                           

"endpoint[ep_cnt]" looks suspicious to me, shouldn't that be something
like:

endpoint = &interface->endpoint;

IS_EP_BULK_IN(endpoint[ep_cnt].desc))

Otherwise the index [ep_cnt] is used for the descriptor (decs) not the
endpoint.

Completely untested, I don't have 2.5. I guess that bug (if it is one)
was introduced when this change was made:

-       interface = dev->config[0].interface[ifnum].altsetting;
-       endpoint = interface[ifnum].endpoint;
+       interface = intf->altsetting;
+       endpoint = &interface->endpoint[0].desc;


> I did have a look at the documentation file mentioned. Paragraphwise grep -i
> for "undetected endpoint" yields this:
> 
> >>>
> probe_scanner: Undetected endpoint -- The USB Scanner driver is
> fairly general when it comes to communicating to scanners. 
> Unfortunately,some vendors have designed their scanners in one way or
> another thatthis driver doesn't account for.

Well, the scanner driver isn't that generic, e.g. it can't work with
devices that don't have a bulk-out endpoint. But this doesn't matter
in your case.

> I don't think Epson's firmware detects kernel 2.5 and moves endpoints away.
> What happened, and what can I do to get a working scanner back?
> 
> (I've heard that the SANE people now advocate using libusb, and tell people
> against using scanner.o to access the scanner.

"The SANE people" just say, that they won't cry too loud, if the
scanner driver is removed in the distant future. If the driver had
supported all scanners, control messages and vendor/product id
determination in the past, we wouldn't have looked into libusb at all.

> I tried to follow that advice, but failed; I'll try again when there
> is something vaguely resembling a decent documentation).

As far as I know, the Epson backend has libusb support only in the
SANE CVS version.

> Does anyone has an idea, or can gently point me towards the properly written
> fine manual to read?

I don't have an Epson scanner, but as far as I can see, just compile
libusb 0.1.6, get SANE CVS and install that. Some basic documentation
about user-land is in man sane-usb and man sane-epson.

Bye,
  Henning


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to