[Stgt-devel] PATCH 6 of 6 - Implement READ ELEMENT STATUS op code
Ming Zhang
mzhang
Fri May 11 17:34:12 CEST 2007
On Fri, 2007-05-11 at 10:35 -0400, Ming Zhang wrote:
> > + int element_sz;
> > + int size;
> > + uint16_t * sp;
> > + uint32_t * lp;
> > +
> > + element_sz = determine_element_sz(dvcid, volTag);
> > +
> > + /* First Element address reported */
> > + sp = (uint16_t *)&data[0];
> > + *sp = __cpu_to_be16(start);
>
> try to use data[0] = start >> 8, data[1] = start &0xff, instead. since
> we can not be 100% sure that data memory address align to 2 bytes.
>
forgot about this. we allocate data aligned to page size. so this is ok.
--
Ming Zhang <mzhang AT ibrix.com>
www.ibrix.com
978-670-7400 x 145
http://blackmagic02881.wordpress.com/
More information about the stgt
mailing list