[sane-devel] On CONFIG_USB_SUSPEND and black scans

Julien BLACHE jb at jblache.org
Tue May 1 15:42:12 UTC 2007


JKD <jkdsoft at gmail.com> wrote:

Hi,

>> Connections remain ? Is the connection still open when the device goes
>> to sleep, or is it closed before that ?
>> 
>> Could we be failing to catch an error here ?
>
> As I understand, connection starts with sanei_usb_open in sane_open()
> and remains until sanei_usb_close in sane_close() function. I don't know
> if returning zeroes in bulk transfers means that device is suspended (I've

That would be a silly thing to do, returning bogus data instead of
returning an error...

> no way to know device status) but connection remains because control
> transfers still work.
>
> Should kernel suspend a device when it's openned/accessed by a proccess?

Obviously this shouldn't be the case.

> The fact is that (in my case) libsane-extras's backend returns a black
> image and once compiled by me, it works fine getting always the right
> image. And I'm sure that I've not changed anything in the way backend
> communicates to device. It's the same code provided by SANE API.

There's no sane reason for that that I can think of, *grmbl*

JB.

-- 
Julien BLACHE                                   <http://www.jblache.org> 
<jb at jblache.org>                                  GPG KeyID 0xF5D65169



More information about the sane-devel mailing list