[sane-devel] HP ScanJet 5590 big endian

Ilia Sotnikov hostcc at gmail.com
Thu May 24 12:27:28 UTC 2012


On Tue, May 22, 2012 at 7:27 PM, Nhan Ngo Dinh <nngodinh at tiscali.it> wrote:
...
> Little Endian (working)
> =======================
...
> [sanei_usb] 0000: C0 04 00 12 00 00 32 00
> Big Endian (not working)
...
> [sanei_usb] 000 C0 04 00 12 00 00 00 32
...
> Since the module does work in little endian, and the content of ctrl is
> passed through, I assume that the hardware wants ctrl.wLength in little
> endian, so I replaced it with:
> ctrl.wLength = htole16 (size);
...
> verify_cmd = le16toh (verify_cmd);
> I've tested the scanner with such modification and it works, but I've not
> tested it for regressions in little endian. The patch is attached.

Nhan,
thanks, nice catch. Does the backend work as expected (produces normal
images, correctly uses selected source etc) after applying the patch?
I suspect there are other places in the backend we should take a
closer look.

-- 
 Ilia Sotnikov



More information about the sane-devel mailing list