Re: "strange" things with SANE on IRIX 5.3

becka@rz.uni-duesseldorf.de
Fri, 10 Oct 1997 18:43:27 +0100 (MET)

Hi !

> I'm posting this just to see if anyone else have seen these errors/warnings.
> Recap: I am currently attempting to get a Nikon LS-1000 to work with SANE,
> along with Didier Carlier (who has a LS-20). I've hooked it up to a SGI Indy
> running Irix 5.3. So what's the problem? Well, the syslog gets filled with
> messages like these:

> Oct 8 17:23:09 4A:unix: WARNING: wd93 SCSI Bus=0 ID=5 LUN=0: I/O address
> 8b95c7f2 not correctly aligned, can't DMA
This looks like the scsi-code for Irix expects SCSI-buffers to be aligned,
i.e. the address must be dividable by a certain quantity.

Someone who knows the Irix SCSI code should check this and provide properly
aligned buffers.

> I can't find anything dead wrong in sanei-scsi. Am I having a problem, or what?

Maybe this effect depends on the version of Irix, or even the used SCSI-
controller.

Try allocating the SCSI-buffers like :

#define aligned 0x100

baseptr=malloc(size_needed+aligned);
realptr=baseptr + aligned - ((int)baseptr%aligned);

To make them aligned at 256-byte boundaries. The actual value depends on what
causes the alignment problem. Might be a Bus-limit => use bus width, might
be a page-limit => page-size, might be something with the DMA controller.

CU,Andy

-- 
Andreas Beck              |  Email :  <becka@sunserver1.rz.uni-duesseldorf.de>

--
Source code, list archive, and docs: http://www.mostang.com/sane/
To unsubscribe: echo unsubscribe sane-devel | mail majordomo@mostang.com