Google
  Web www.spinics.net

Re: [PATCH][2/4] usb: only set URB_NO_TRANSFER_DMA_MAP when dma is enabled

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


Hi guys,

Thanks for all your help so far.

On Jan 14, 2008 11:08 AM, Magnus Damm <magnus.damm@xxxxxxxxx> wrote:
> usb: only set URB_NO_TRANSFER_DMA_MAP when dma is enabled
>
> usb_sg_init() currently sets URB_NO_TRANSFER_DMA_MAP even if dma isn't
> enabled. This patch changes the code so URB_NO_TRANSFER_DMA_MAP gets
> set only when dma is enabled and transfer_dma is valid.
>
> Signed-off-by: Magnus Damm <damm@xxxxxxxxxx>

What about this patch? Any thoughts?

This patch is needed for usb storage to work properly with ohci-sm501.
Should URB_NO_TRANSFER_DMA_MAP really be set even if dma isn't used? I
say not.

Thanks,

/ magnus

> --- 0001/drivers/usb/core/message.c
> +++ work/drivers/usb/core/message.c     2008-01-13 18:53:13.000000000 +0900
> @@ -394,7 +394,7 @@ int usb_sg_init (
>         if (!io->urbs)
>                 goto nomem;
>
> -       urb_flags = URB_NO_TRANSFER_DMA_MAP | URB_NO_INTERRUPT;
> +       urb_flags = URB_NO_INTERRUPT;
>         if (usb_pipein (pipe))
>                 urb_flags |= URB_SHORT_NOT_OK;
>
> @@ -432,6 +432,7 @@ int usb_sg_init (
>                  * to prevent stale pointers and to help spot bugs.
>                  */
>                 if (dma) {
> +                       io->urbs[i]->transfer_flags |= URB_NO_TRANSFER_DMA_MAP;
>                         io->urbs [i]->transfer_dma = sg_dma_address (sg + i);
>                         len = sg_dma_len (sg + i);
>  #if defined(CONFIG_HIGHMEM) || defined(CONFIG_GART_IOMMU)
>

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
linux-usb-devel@xxxxxxxxxxxxxxxxxxxxx
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

[Home]     [Video for Linux]     [Photo]     [Yosemite Forum]     [Yosemite Photos]    [Video Projectors]     [PDAs]     [Hacking TiVo]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Devices]     [Big List of Linux Books]     [Free Dating]

  Powered by Linux