[linux-usb-devel] [patch/rfc 2.6.22-rc7] usb/dma doc updates

2007-07-01 Thread David Brownell
This patch updates some of the documentation about DMA buffer management for USB, and ways to avoid extra copying. Our understanding of the issues has improved over time. - Most drivers should *avoid* the dma-coherent allocators. There are a few exceptions (like the HID driver). - Some met

Re: [linux-usb-devel] Questions about usb hub

2007-07-01 Thread David Brownell
On Sunday 01 July 2007, jidong xiao wrote: > > Now my concern is, for root hub, here we can see, hcd->driver->flags > will be used to decide which descriptor will be returned, however, > what if non-root hub? Then the hub hardware answers the question -- as I said before. --

Re: [linux-usb-devel] [RFC] URBs and buffer management

2007-07-01 Thread David Brownell
On Wednesday 06 June 2007, Oliver Neukum wrote: > Am Mittwoch, 6. Juni 2007 schrieb Pete Zaitcev: > > The consistent allocation was intended to things like mailboxes, > > where it is more advantageous to load a couple of words from uncached > > memory than to call an API which invalidates or fl

Re: [linux-usb-devel] Questions about usb hub

2007-07-01 Thread jidong xiao
Another separate issue,still focus on this piece of code,(inside drivers/usb/core/hub.c, hub_configure()) > > > > 570 switch (hdev->descriptor.bDeviceProtocol) { > > 571 case 0: > > 572 break; > > 573 case 1: > > 5

Re: [linux-usb-devel] Questions about usb hub

2007-07-01 Thread jidong xiao
Great,thanks Alan and David. Your answers are exactly what I really needed. Alan, According to your implication,I took a look at rh_call_control(),and finally found such piece of code,I felt this explains my question clearly. 376 case DeviceRequest | USB_REQ_GET_DESCRIPTOR: 377

Re: [linux-usb-devel] [PATCH] Add usb_setup_{control, bulk, int}_urb helpers

2007-07-01 Thread David Brownell
On Tuesday 26 June 2007, Alan Stern wrote: > On Tue, 26 Jun 2007, Greg KH wrote: > > > On Tue, Jun 26, 2007 at 10:32:42AM -0400, Alan Stern wrote: > > > On Mon, 25 Jun 2007, Greg KH wrote: > > > > > > > You mean something like the following, but also for bulk and int? I > > > > like it, it reduc

Re: [linux-usb-devel] patch to shift memory allocations to usb_alloc_urb()

2007-07-01 Thread David Brownell
On Saturday 30 June 2007, Oliver Neukum wrote: > --- linux-2.6.22rc6vanilla/include/linux/usb.h > +++ linux-2.6.22-rc6-iso/include/linux/usb.h > @@ -1152,7 +1152,7 @@ struct urb > int error_count;/* (return) number of ISO errors */ > void *context; /* (i

Re: [linux-usb-devel] [PATCH] Add usb_setup_{control, bulk, int}_urb helpers

2007-07-01 Thread David Brownell
On Thursday 28 June 2007, Marcel Holtmann wrote: > the attached patch is an attempt for usb_alloc_bulk_urb() which will > allocate the URB itself and its transfer buffer. It also use the > endpoint data structure to create the pipe value. Please review it. Seeing all these recent discussions remi

Re: [linux-usb-devel] patch to shift memory allocations to usb_alloc_urb()

2007-07-01 Thread David Brownell
On Sunday 01 July 2007, Alan Stern wrote: > On Sun, 1 Jul 2007, Oliver Neukum wrote: > > Am Sonntag, 1. Juli 2007 schrieb Matthew Dharm: > > > Does anyone know if the SCSI core actually follows the sg_tablesize > > > parameter in the struct scsi_host_template ? Right now, it's set to > > > SG_ALL

Re: [linux-usb-devel] patch to shift memory allocations to usb_alloc_urb()

2007-07-01 Thread David Brownell
On Saturday 30 June 2007, Oliver Neukum wrote: > Am Samstag, 30. Juni 2007 schrieb Alan Stern: > > Also, do you intend to set URB_FREE_BUFFER and allocate the transfer > > buffer if and only if max_length > 0? > > Without an explicit request? No. Good ... and don't encourage drivers to allocate

Re: [linux-usb-devel] patch to shift memory allocations to usb_alloc_urb()

2007-07-01 Thread David Brownell
On Saturday 30 June 2007, Oliver Neukum wrote: > So do we have consensus for this prototype: > > struct urb *usb_alloc_urb(struct usb_host_endpoint *ep, > unsigned int max_length, unsigned int iso_fields, > gfp_t mem_flags); Calling conventions that require line-wra

Re: [linux-usb-devel] patch to shift memory allocations to usb_alloc_urb()

2007-07-01 Thread David Brownell
On Saturday 30 June 2007, Alan Stern wrote: > First, notice that pre-allocation is useless with one-shot URBs, since > the resources would be allocated anyway as soon as the URB is > submitted. You gain an advantage only by avoiding having the resources > deallocated when the URB completes, so th

Re: [linux-usb-devel] patch to shift memory allocations to usb_alloc_urb()

2007-07-01 Thread Alan Stern
On Sun, 1 Jul 2007, Oliver Neukum wrote: > Am Sonntag, 1. Juli 2007 schrieb Alan Stern: > > It's not entirely clear what you're trying to accomplish by doing this. > > > > First, notice that pre-allocation is useless with one-shot URBs, since > > the resources would be allocated anyway as soon as

[linux-usb-devel] [patch 2.6.22-rc7] goku_udc trivial cleanups

2007-07-01 Thread David Brownell
Minor fixes to goku_udc ... whitespace, let -DDEBUG do its thing, check the return value of device_register(), sparse tweaks. Signed-off-by: David Brownell <[EMAIL PROTECTED]> --- drivers/usb/gadget/goku_udc.c | 36 +--- drivers/usb/gadget/goku_udc.h | 10 +

Re: [linux-usb-devel] patch to shift memory allocations to usb_alloc_urb()

2007-07-01 Thread Alan Stern
On Sun, 1 Jul 2007, Oliver Neukum wrote: > Am Sonntag, 1. Juli 2007 schrieb Matthew Dharm: > > On Sun, Jul 01, 2007 at 11:00:43AM +0200, Oliver Neukum wrote: > > > My goals are: > > > > > > - guarantee the storage driver a fallback path without memory allocation > > > > What about avoiding alloc

Re: [linux-usb-devel] Questions about usb hub

2007-07-01 Thread Alan Stern
Dave already answered some of these questions. Here are my views: On Sun, 1 Jul 2007, jidong xiao wrote: > about device descriptor,according to usb spec 2.0, > 1. A hub returns different descriptors based on whether it is > operating at high speed or full/low speed.A hub can report three > diffe

[linux-usb-devel] [patch 2.6.22-rc7] usb gadget stack can now -DDEBUG with Kconfig

2007-07-01 Thread David Brownell
Although the other USB driver directories got taught how use Kconfig and the Makefile to enable the debugging messages enabled by -DDEBUG, the gadget stack was overlooked. This patch remedies that omission, but doesn't update any drivers to remove previous idiosyncracies in this area ... other tha

Re: [linux-usb-devel] patch to shift memory allocations to?usb_alloc_urb()

2007-07-01 Thread Greg KH
On Sat, Jun 30, 2007 at 09:31:02AM +0200, Oliver Neukum wrote: > Am Samstag, 30. Juni 2007 schrieb Greg KH: > > On Fri, Jun 29, 2007 at 03:18:23PM -0700, David Brownell wrote: > > > > > > > > Gaak. Just pass the usb_host_endpoint pointer in, with the relevant > > > > > length indicator. Four fun

Re: [linux-usb-devel] Questions about usb hub

2007-07-01 Thread David Brownell
On Sunday 01 July 2007, jidong xiao wrote: > Take root hub for example, how does the hub itself know whether its > upstream facing port is connected at high-speed or > full-speed? There *IS* no upstream facing port. The upstream link hooks to a non-USB bus. > Futhermore, if a host send a GET_D

Re: [linux-usb-devel] patch to shift memory allocations to usb_alloc_urb()

2007-07-01 Thread Oliver Neukum
Am Sonntag, 1. Juli 2007 schrieb Matthew Dharm: > On Sun, Jul 01, 2007 at 11:00:43AM +0200, Oliver Neukum wrote: > > My goals are: > > > > - guarantee the storage driver a fallback path without memory allocation > > What about avoiding allocation of memory during a usb-storage transfer > complete

[linux-usb-devel] [patch 2.6.22-rc6] usb g adget stack:  remove usb_ep_*_buffer( ), part 2

2007-07-01 Thread David Brownell
This patch removes controller driver infrastructure which supported the now-removed usb_ep_{alloc,free}_buffer() calls. As can be seen, many of the implementations of this were broken to various degrees. Many didn't properly return dma-coherent mappings; those which did so were necessarily ugly b

Re: [linux-usb-devel] [PATCH] Printer Gadget Driver v0.2.0 (kernel 2.6.21.3)

2007-07-01 Thread David Brownell
On Sunday 01 July 2007, Craig W. Nadler wrote: > I noticed that a patch to add a composite gadget core driver has been > submitted by Ragner Magalhaes. What is the status of this patch, will it > be added to the next kernel release? Should I modify my driver to use it? It's also in my review que

Re: [linux-usb-devel] [PATCH] Printer Gadget Driver v0.2.0 (kernel 2.6.21.3)

2007-07-01 Thread Craig W. Nadler
I noticed that a patch to add a composite gadget core driver has been submitted by Ragner Magalhaes. What is the status of this patch, will it be added to the next kernel release? Should I modify my driver to use it? - Craig --

[linux-usb-devel] [patch 2.6.22-rc6] usb gadget stack: remove usb_ep_*_buffer(), part 1

2007-07-01 Thread David Brownell
Remove usb_ep_{alloc,free}_buffer() calls, for small dma-coherent buffers. This patch just removes the interface and its users; later patches will remove controller driver support. - This interface is invariably not implemented correctly in the controller drivers (e.g. using dma pools, a mec

Re: [linux-usb-devel] [PATCH] Printer Gadget Driver v0.2.0 (kernel 2.6.21.3)

2007-07-01 Thread David Brownell
On Monday 25 June 2007, Craig W. Nadler wrote: > From: Craig W. Nadler <[EMAIL PROTECTED]> > > G_PRINTER: Adds a USB printer gadget driver for use in printer firmware. > > This adds a USB printer gadget driver for use in printer firmware. > The printer gadget channels data between the USB host

[linux-usb-devel] Virus "W32.Sality.Q-1" gefunden

2007-07-01 Thread Inode Mailscan
Sehr geehrte Damen und Herren, in dem E-Mail mit dem Betreff '[linux-usb-devel] Mail delivery failed: returning message to sender' (gesendet am Sun, 01 Jul 2007 18:39:38 +0200) mit der angegebenen Absenderadresse 'Mail Delivery System <[EMAIL PROTECTED]>' wurde der Virus 'W32.Sality.Q-1' gefunden

[linux-usb-devel] Virus "W32.Sality.Q-1" gefunden

2007-07-01 Thread Inode Mailscan
Sehr geehrte Damen und Herren, in dem E-Mail mit dem Betreff '[linux-usb-devel] Mail delivery failed: returning message to sender' (gesendet am Sun, 01 Jul 2007 17:37:52 +0200) mit der angegebenen Absenderadresse 'Mail Delivery System <[EMAIL PROTECTED]>' wurde der Virus 'W32.Sality.Q-1' gefunden

[linux-usb-devel] Please reactivate your Yahoo! Groups email address

2007-07-01 Thread Yahoo!Groups
Dear Yahoo! Groups member, You belong to one or more email groups provided by Yahoo! Groups (groups.yahoo.com). Recently, messages sent to you from Yahoo! Groups have been returned to us as undeliverable. As a result, we have temporarily turned off message delivery to this email address. If

Re: [linux-usb-devel] High speed devices with kernel 2.6.21.5.

2007-07-01 Thread jidong xiao
On 6/29/07, Branden Sletteland <[EMAIL PROTECTED]> wrote: > I am seeing an issue when going from kernel version 2.6.20.14 to > 2.6.21 through 2.6.21.5 were my high speed devices are only being > recognized as full speed devices, with error output on a 2.6.21 kernel > stating: > > usb 3-1: new full

[linux-usb-devel] Questions about usb hub

2007-07-01 Thread jidong xiao
about device descriptor,according to usb spec 2.0, 1. A hub returns different descriptors based on whether it is operating at high speed or full/low speed.A hub can report three different sets of the descriptors. 2. A hub must operate at high-speed when its upstream facing port is connected at high

Re: [linux-usb-devel] patch to shift memory allocations to usb_alloc_urb()

2007-07-01 Thread Matthew Dharm
On Sun, Jul 01, 2007 at 11:00:43AM +0200, Oliver Neukum wrote: > My goals are: > > - guarantee the storage driver a fallback path without memory allocation What about avoiding allocation of memory during a usb-storage transfer completely? Does anyone know if the SCSI core actually follows the sg

Re: [linux-usb-devel] patch to shift memory allocations to usb_alloc_urb()

2007-07-01 Thread Oliver Neukum
Am Sonntag, 1. Juli 2007 schrieb Alan Stern: > It's not entirely clear what you're trying to accomplish by doing this. > > First, notice that pre-allocation is useless with one-shot URBs, since > the resources would be allocated anyway as soon as the URB is Yes, obviously. > submitted.  You gain