Re: Is usb_buffer_alloc a generic URB buffer allocator ? (was Split Bulk Transfers)

Alan Stern <[email protected]>
Newsgroups gmane.linux.usb.devel
Message-ID <[email protected]>
On Fri, 18 May 2007, David Brownell wrote:

> On Friday 18 May 2007, jidong xiao wrote:
> > Regarding this, I have one question:
> > "except at the beginning and the end, scatter-gather buffers follow page
> > boundaries", why? i.e. Is there any specific reason that sg buffers should
> > follow page boundaries? Then why the beinging and the end are exceptions?
> 
> You should ask the person who wrote that comment; I can't
> make sense of it myself.  What's "follow" etc.

I wrote it.  Stating it more verbosely:

	Each entry in a scatter-gather list maps a group of physically
	contiguous pages.  The buffer itself occupies only a portion of 
	those pages, as given by the .offset and .length fields in the 
	entry.

	For each entry in the list (except possibly the first),
	.offset is 0 and hence the buffer starts at a page boundary.	

	For each entry in the list (except possibly the last),
	.offset + .length is equal to the total size of the pages
	mapped by the entry, and hence the buffer ends at a page 
	boundary.

Alan Stern


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.