Re: [linux-usb-devel] Is usb_buffer_alloc a generic URB buffer allocator ? (was Split Bulk Transfers)

2007-05-23 Thread Oliver Neukum
Am Mittwoch, 23. Mai 2007 04:18 schrieb Pete Zaitcev: Running DMA into vmalloc area can be done with some effort. I think that one can use __vmalloc() with GFP_DMA32 instead of vmalloc(). The original implementation of it was in V4L, copied multiply times all over the kernel since. Kraxel

Re: [linux-usb-devel] Is usb_buffer_alloc a generic URB buffer allocator ? (was Split Bulk Transfers)

2007-05-22 Thread Laurent Pinchart
On Thursday 17 May 2007, David Brownell wrote: On Thursday 17 May 2007, Laurent Pinchart wrote: Shouldn't we implement scatter-gather for EHCI (and possibly other) controllers ? If by scatter-gather you mean struct scatterlist, we've had that support for some time now ... in usb_sg_*()

Re: [linux-usb-devel] Is usb_buffer_alloc a generic URB buffer allocator ? (was Split Bulk Transfers)

2007-05-22 Thread Laurent Pinchart
On Thursday 17 May 2007, Alan Stern wrote: On Thu, 17 May 2007, Laurent Pinchart wrote: Ok. A driver should obviously not allocate a lot of DMA cache coherent memory if it's not going to use it. For buffers that are allocated at initialisation time and not used often, usb_buffer_alloc()

Re: [linux-usb-devel] Is usb_buffer_alloc a generic URB buffer allocator ? (was Split Bulk Transfers)

2007-05-22 Thread Alan Stern
On Tue, 22 May 2007, Laurent Pinchart wrote: If not overly difficult, it might be interesting to implement transparent s-g, where the URB submission handler would cut buffers in pieces if needed. That way buffers could be allocated with kmalloc/get_free_pages for small buffers used

Re: [linux-usb-devel] Is usb_buffer_alloc a generic URB buffer allocator ? (was Split Bulk Transfers)

2007-05-22 Thread Pete Zaitcev
On Tue, 22 May 2007 11:20:49 -0400 (EDT), Alan Stern [EMAIL PROTECTED] wrote: Besides, can vmalloc be used for allocating DMA buffers? AFAIK it doesn't have any mechanism for respecting DMA memory location requirements (the DMA mask). Running DMA into vmalloc area can be done with some

Re: [linux-usb-devel] Is usb_buffer_alloc a generic URB buffer allocator ? (was Split Bulk Transfers)

2007-05-19 Thread Alan Stern
On Sat, 19 May 2007, jidong xiao wrote: The length of any entry should be greater than a page?I think only if each buffer's size is divisible by page size, could it start at a page boundary and end at a page boundary. Let's use the word buffer to refer to the region of memory described by the

Re: [linux-usb-devel] Is usb_buffer_alloc a generic URB buffer allocator ? (was Split Bulk Transfers)

2007-05-18 Thread Alan Stern
On Sat, 19 May 2007, jidong xiao wrote: By the way,I remember in drivers/usb/storage/scsiglue.c, there is a chunk of comments about scatter-gather buffers. Regarding this, I have one question: except at the beginning and the end, scatter-gather buffers follow page boundaries, why? i.e. Is

Re: [linux-usb-devel] Is usb_buffer_alloc a generic URB buffer allocator ? (was Split Bulk Transfers)

2007-05-18 Thread David Brownell
On Friday 18 May 2007, jidong xiao wrote: Regarding this, I have one question: except at the beginning and the end, scatter-gather buffers follow page boundaries, why? i.e. Is there any specific reason that sg buffers should follow page boundaries? Then why the beinging and the end are

Re: [linux-usb-devel] Is usb_buffer_alloc a generic URB buffer allocator ? (was Split Bulk Transfers)

2007-05-18 Thread Alan Stern
On Fri, 18 May 2007, David Brownell wrote: On Friday 18 May 2007, jidong xiao wrote: Regarding this, I have one question: except at the beginning and the end, scatter-gather buffers follow page boundaries, why? i.e. Is there any specific reason that sg buffers should follow page

Re: [linux-usb-devel] Is usb_buffer_alloc a generic URB buffer allocator ? (was Split Bulk Transfers)

2007-05-17 Thread Laurent Pinchart
On Wednesday 16 May 2007, Alan Stern wrote: On Tue, 15 May 2007, Laurent Pinchart wrote: Hi everybody, following the discussion about the split bulk transfers, Alan Stern and David Brownell told me I shouldn't use usb_buffer_alloc as a generic purpose URB buffer allocated. However,

Re: [linux-usb-devel] Is usb_buffer_alloc a generic URB buffer allocator ? (was Split Bulk Transfers)

2007-05-17 Thread Laurent Pinchart
On Wednesday 16 May 2007, David Brownell wrote: On Tuesday 15 May 2007, Laurent Pinchart wrote: Hi everybody, following the discussion about the split bulk transfers, Alan Stern and David Brownell told me I shouldn't use usb_buffer_alloc as a generic purpose URB buffer allocated.

Re: [linux-usb-devel] Is usb_buffer_alloc a generic URB buffer allocator ? (was Split Bulk Transfers)

2007-05-17 Thread David Brownell
On Thursday 17 May 2007, Laurent Pinchart wrote: Shouldn't we implement scatter-gather for EHCI (and possibly other) controllers ? If by scatter-gather you mean struct scatterlist, we've had that support for some time now ... in usb_sg_*() routines. That's the usual definition inside Linux.

Re: [linux-usb-devel] Is usb_buffer_alloc a generic URB buffer allocator ? (was Split Bulk Transfers)

2007-05-16 Thread Alan Stern
On Tue, 15 May 2007, Laurent Pinchart wrote: Hi everybody, following the discussion about the split bulk transfers, Alan Stern and David Brownell told me I shouldn't use usb_buffer_alloc as a generic purpose URB buffer allocated. However, Documentation/usb/dma.txt contradicts this. Should

Re: [linux-usb-devel] Is usb_buffer_alloc a generic URB buffer allocator ? (was Split Bulk Transfers)

2007-05-16 Thread David Brownell
On Tuesday 15 May 2007, Laurent Pinchart wrote: Hi everybody, following the discussion about the split bulk transfers, Alan Stern and David Brownell told me I shouldn't use usb_buffer_alloc as a generic purpose URB buffer allocated. However, Documentation/usb/dma.txt contradicts this.