Re: usbmon problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 22 Mar 2010, Pete Zaitcev wrote:

> On Fri, 19 Mar 2010 11:17:08 -0400 (EDT)
> Alan Stern <stern@xxxxxxxxxxxxxxxxxxx> wrote:
> 
> > Pete, I removed the test for IOMMU coalescing in mon_text.c.  I figured 
> > it didn't matter since we were only going to look at the first 32 bytes 
> > of the first scatterlist buffer anyway.  Is this valid?
> 
> In my opinion, no. Even 2 bytes may end crossing a page boundary.
> Why not use (urb->transfer_flags & URB_DMA_SG_COMBINED) like you
> did for the binary reader?

On second thought, I'm not so sure this is necessary.

Host controller hardware can't handle scatter-gather transfers unless
the boundary between scatterlist elements occurs either at a packet
boundary or at a page boundary -- and in fact, the host controller
drivers don't handle the case where a page boundary isn't also a packet
boundary.

Because of this restriction, and because high-speed bulk endpoints must
have a maxpacket length of 512, usb-storage (currently the only
scatter-gather USB driver) requires 512-byte alignment of the data
buffers.  Any future driver using the scatter-gather library can be
expected to include the same requirement.  Hence it is not possible for
2 bytes to cross a page boundary.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux