On Sat, 19 May 2007, jidong xiao wrote: > The length of any entry should be greater than a page?I think only if each > buffer's size is divisible by page size, could it start at a page boundary > and end at a page boundary.
Let's use the word "buffer" to refer to the region of memory described by the entire scatter-gather list. Let's use the word "sub-buffer" to refer to that portion of the buffer which is described by a single scatterlist entry. Note that each entry corresponds to a group of pages (or a single page), only part of which might be contained in the sub-buffer. If the sub-buffer begins at the start of the group of pages and ends at the end of the group of pages then its length will indeed be a multiple of the page size. Each sub-buffer (except possibly the first one) will begin at the start of the page group. And each sub-buffer (except possibly the last one) will end at the end of the page group. Another way to describe this is as follows: For each scatterlist entry after the first, we should always have .offset = 0. For each scatterlist entry before the last, we should always have (.offset + .length) is a multiple of the page size. 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/ _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel