Re: "strange" things with SANE on IRIX 5.3

becka@rz.uni-duesseldorf.de
Wed, 15 Oct 1997 20:03:25 +0100 (MET)

Hi !
> > 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.
> IRIX requires buffers aligned to a 32-bit boundary.

> > Someone who knows the Irix SCSI code should check this and provide properly
> > aligned buffers.
> That'd be me - the problem is that the buffers (if malloc'd) *should* be
> aligned to a 32-bit boundary with IRIX 3.x through 6.x.
Yes. malloc() is assumed to give you properly aligned buffers. I would have
been very astonished, if IRIX failed in that ..

> Nope, I think the sense buffer is not aligned properly for some reason
> on his system (the sense buffer is an automatic array of chars on the
> stack and may not be properly aligned).
Ah. Yes. The original post shows accesses at an address ending in 0x???2.
So either malloc'ing the array or using a union with a reasonably big data-
type should be used to align it.

> A patch will follow later this week...
TNX. CU,Andy

-- 
Andreas Beck              |  Email :  <becka@sunserver1.rz.uni-duesseldorf.de>
========  GGI - The Right Thing To Do : http://synergy.foo.net/~ggi/  ========

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