Re: [PATCH][2/4] usb: only set URB_NO_TRANSFER_DMA_MAP when dma is enabled
David Brownell <[email protected]> Thu, 24 Jan 2008 21:23:37 -0800
| Newsgroups | gmane.linux.usb.devel |
|---|---|
| Message-ID | <[email protected]> |
On Thursday 24 January 2008, Magnus Damm wrote: > Hi guys, > > Thanks for all your help so far. > > On Jan 14, 2008 11:08 AM, Magnus Damm <[email protected]> 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 <[email protected]> > > 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. Makes sense. > 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/ _______________________________________________ [email protected] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel