> Quoting Roland Dreier <[EMAIL PROTECTED]>:
> Subject: Re: [PATCH 3 of 4] IB/mthca: fix non-cache-coherent CPUs with memfree
> 
>  > +  sg_set_buf(mem, buf, PAGE_SIZE << order);
>  > +  BUG_ON(mem->offset);
>  > +  sg_dma_len(mem) = PAGE_SIZE << order;
> 
> What am I missing?  Any reason to set sg_dma_len() again after sg_set_buf()?

How do you mean, again? Does sg_set_buf set dma_length?

In 2.6.20, I see this in include/linux/scatterlist.h:

static inline void sg_set_buf(struct scatterlist *sg, const void *buf,
                                                            unsigned int buflen)
{
                sg->page = virt_to_page(buf);
                sg->offset = offset_in_page(buf);
                sg->length = buflen;
}


-- 
MST

_______________________________________________
openib-general mailing list
[email protected]
http://openib.org/mailman/listinfo/openib-general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general

Reply via email to