On Fri, Jun 07, 2002, Roland Dreier <[EMAIL PROTECTED]> wrote: > >>>>> "Johannes" == Johannes Erdfelt <[EMAIL PROTECTED]> writes: > > Johannes> All of the uses of usb_get_descriptor in usb.c are > Johannes> safe. I'd much rather make the calling routine require a > Johannes> DMA capable buffer than in usb_get_descriptor. > > I just looked back at usb.c. Some of the calls to > usb_get_descriptor() look like > > int ret = usb_get_descriptor(dev, USB_DT_DEVICE, 0, &dev->descriptor, > sizeof(dev->descriptor)); > > I'm not convinced that such a call is safe in all circumstances. > dev->descriptor is smaller than a cache line and is not cache line > aligned. When pci_map_single() finally gets called with address it > will invalidate the whole cache line, which could cause problems if > adjacent members of dev are accessed. > > Is this reasoning correct or do you think it's better to leave that > code as-is?
I thought that's what the PCI DMA API protects against. The HCD's use that for all of the buffers. If not, we probably have significantly more problems than just that. Have you seen a problem with it in your testing? JE _______________________________________________________________ Don't miss the 2002 Sprint PCS Application Developer's Conference August 25-28 in Las Vegas - http://devcon.sprintpcs.com/adp/index.cfm?source=osdntextlink _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel