Re: usbmon problem

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

 



On Thu, 11 Mar 2010, Alan Stern wrote:

> If they do come out that way, the only explanation I can think of is a
> cache-coherence failure.  (Note that the usbmon code runs _after_
> unmap_urb_for_dma().)  We'll have to ask an x86_64 architecture person.

Wait a minute!  I just realized something.

Although usbmon _is_ called after unmap_urb_for_dma(), that's not where
the unmapping actually takes place!  Transfers coming through the
scatter-gather library are unmapped when sg_clean() in message.c calls
usb_buffer_unmap_sg(), which doesn't happen until after the entire
transfer is complete.

In particular, if there are multiple scatterlist elements giving rise 
to multiple URBs, the unmapping doesn't happen until after all the URBs 
have completed.  That's not the case with you, but it's still true that 
the unmapping occurs after the usbmon and giveback calls.  If there was 
a bounce buffer involved for any reason, that would explain your test
results.

Offhand, I can't think how to fix this.  I'm open to suggestions.

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