Re: [PATCH 1/2] USB: Allow HCDs to specifiy their DMA alignment requirements

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

 



>
>  dma_unmap_single is needed for bounce_buffer.
>
Yes and it is still done as before (because urb->transfer_dma is the mapped
version of bounce_buffer in this case), the patch to unmap_urb_for_dma
just copies the
bounce buffer back to the transfer_buffer expected by the driver and kfrees
the bounce buffer.

>>
> Suppose hcd->driver->dma_align_shift is zero and HC is byte aligned DMA
> enabled, this means DMA is doable between byte aligned memory and HC,
> but this does __not__ mean it is safe to do dma mapping or unmapping between
> CPU and byte aligned memory, which may cause sync issues between memory
> and CPU cache.
>
> So seems the idea behind the patch is not correct, IMHO.
>
if dma_align_shift is zero this patch changes nothing.
If there are the problems you describe they were there before and a
separate issue
to the one this patch addresses IMHO.

Regards,
Martin
--
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