Re: [linux-usb-devel] How should we handle bogus bInterval descriptor values?

2007-05-08 Thread Robert Marquardt
Alan Stern schrieb: In this bug report, lsusb shows an HID device which has bInterval set to 0 in its two Interrupt endpoint descriptors: http://bugzilla.kernel.org/show_bug.cgi?id=8432 Of course this confuses the USB drivers, causing a lot of problems. What should we do

Re: [linux-usb-devel] suspend/resume for usb serial devices

2007-05-08 Thread Oliver Neukum
Am Dienstag, 8. Mai 2007 02:06 schrieb James Graves: OK, I have pulled out the code from sierra_open() that does the usb_clear_halt() and usb_submit_urb() into a new function called sierra_enable_urbs().  That then is called by sierra_open() and sierra_resume().  Is this what you meant?

Re: [linux-usb-devel] [PATCH] Onetouch - switch to using input_dev-dev.parent

2007-05-08 Thread Matthew Dharm
I won't pretend to know anything about the input subsystem. But, from a storage point of view, this looks fine. Signed-off-by: Matthew Dharm [EMAIL PROTECTED] Matt On Tue, May 08, 2007 at 12:31:30AM -0400, Dmitry Torokhov wrote: In preparation for struct class_device - struct device input

Re: [linux-usb-devel] extended urb information for binary API again

2007-05-08 Thread Paolo Abeni
Hello, On Mon, 2007-05-07 at 11:19 -0700, Pete Zaitcev wrote: I thought we agreed not to do that and only provide the URB data for zero copy. That will be a better solution, but most unfortunately it does not fit easily with libpcap design: libpcap is designed to provide a whole frame in a

Re: [linux-usb-devel] [irda-users] [PATCH] IrDA: Add support for KingSun/DonShine USB IrDA dongle

2007-05-08 Thread Samuel Ortiz
Hi Andrzej, On 5/7/2007, andrzej zaborowski [EMAIL PROTECTED] wrote: Hi Alex, On 07/05/07, Alex Villací­s Lasso [EMAIL PROTECTED] wrote: This patch adds support for the KingSun/DonShine USB IrDA dongle. [...] On plugin, this dongle reports vendor and device IDs: 0x07c0:0x4200 . I don't

Re: [linux-usb-devel] [PATCH -mm] drivers/usb/core/config.c: kzalloc(0, ..)

2007-05-08 Thread Jiri Slaby
Dan Kruchinin napsal(a): The following patch fixes such SLUB report(when someone tries to allocate 0 bytes): -- May 8 00:19:15 midgard kernel: [ 21.933467] BUG: at include/linux/slub_def.h:88 kmalloc_index() May 8 00:19:15 midgard kernel: [ 21.933470] [show_registers+410/736]

Re: [linux-usb-devel] requirements for suspend()

2007-05-08 Thread Oliver Neukum
Am Montag, 7. Mai 2007 21:23 schrieb Alan Stern: On Mon, 7 May 2007, Oliver Neukum wrote: +int usb_wait_anchor_empty_timeout(struct usb_anchor *anchor, int timeout) +{ + int res; + + res = wait_event_timeout(anchor-wait, list_empty(anchor-urb_list), timeout); Maybe make this

[linux-usb-devel] pre/post_reset methods for skel

2007-05-08 Thread Oliver Neukum
Hi, this shows how the anchors can be used for doing reset support. Hibernate, when we get it should be similar. Regards Oliver -- --- a/drivers/usb/usb-skeleton.c2007-05-08 15:19:59.0 +0200 +++ b/drivers/usb/usb-skeleton.c2007-05-08

Re: [linux-usb-devel] [PATCH -mm] drivers/usb/core/config.c: kzalloc(0, ..)

2007-05-08 Thread Greg KH
On Tue, May 08, 2007 at 07:03:08AM +0400, Dan Kruchinin wrote: The following patch fixes such SLUB report(when someone tries to allocate 0 bytes): -- May 8 00:19:15 midgard kernel: [ 21.933467] BUG: at include/linux/slub_def.h:88 kmalloc_index() May 8 00:19:15 midgard kernel: [

[linux-usb-devel] [PATCH 2.6.21.1] host: remove EHCI atomic reference counting

2007-05-08 Thread Steven J. Hill
On Thu, Apr 26, 2007 at 11:30:03AM -0700, David Brownell wrote: Looks OK except it's missing a comment about why standard atomic refcount utilities (kref, atomic_t, etc) must not be used. (That's in addition to the patch comment.) Dave, The patch to remove atomic operations on the

Re: [linux-usb-devel] How should we handle bogus bInterval descriptor values?

2007-05-08 Thread Alan Stern
On Tue, 8 May 2007, Robert Marquardt wrote: Alan Stern schrieb: In this bug report, lsusb shows an HID device which has bInterval set to 0 in its two Interrupt endpoint descriptors: http://bugzilla.kernel.org/show_bug.cgi?id=8432 Of course this confuses the USB drivers,

Re: [linux-usb-devel] [PATCH -mm] drivers/usb/core/config.c: kzalloc(0, ..)

2007-05-08 Thread Alan Stern
On Tue, 8 May 2007, Greg KH wrote: The problem was in drivers/usb/core/config.c in function usb_parse_interface: --- num_ep = num_ep_orig = alt-desc.bNumEndpoints; ... len = sizeof(struct usb_host_endpoint) * num_ep; alt-endpoint = kzalloc(len, GFP_KERNEL); ---

Re: [linux-usb-devel] [PATCH -mm] drivers/usb/core/config.c: kzalloc(0, ..)

2007-05-08 Thread Randy Dunlap
On Tue, 8 May 2007 11:57:07 -0400 (EDT) Alan Stern wrote: On Tue, 8 May 2007, Greg KH wrote: The problem was in drivers/usb/core/config.c in function usb_parse_interface: --- num_ep = num_ep_orig = alt-desc.bNumEndpoints; ... len = sizeof(struct usb_host_endpoint) *

Re: [linux-usb-devel] pre/post_reset methods for skel

2007-05-08 Thread Alan Stern
On Tue, 8 May 2007, Oliver Neukum wrote: Hi, this shows how the anchors can be used for doing reset support. Hibernate, when we get it should be similar. I'll have more comments on this later. But first, I think we should be able to get rid of the skel_open_lock mutex plus similar mutexes

Re: [linux-usb-devel] pre/post_reset methods for skel

2007-05-08 Thread Oliver Neukum
Am Dienstag, 8. Mai 2007 18:59 schrieb Alan Stern: But first, I think we should be able to get rid of the skel_open_lock mutex plus similar mutexes in other USB drivers.  The problem they address is the race between open() and disconnect() -- or more accurately, open() and unregister_dev().  

Re: [linux-usb-devel] [PATCH -mm] drivers/usb/core/config.c

2007-05-08 Thread Steve Calfee
At 07:14 AM 5/8/2007, you wrote: On Tue, May 08, 2007 at 07:03:08AM +0400, Dan Kruchinin wrote: The following patch fixes such SLUB report(when someone tries to allocate 0 bytes): -- May 8 00:19:15 midgard kernel: [ 21.933467] BUG: at include/linux/slub_def.h:88 kmalloc_index() May 8

Re: [linux-usb-devel] extended urb information for binary API again

2007-05-08 Thread Pete Zaitcev
On Tue, 08 May 2007 08:48:26 +0200, Paolo Abeni [EMAIL PROTECTED] wrote: On Mon, 2007-05-07 at 11:19 -0700, Pete Zaitcev wrote: I thought we agreed not to do that and only provide the URB data for zero copy. That will be a better solution, but most unfortunately it does not fit easily

Re: [linux-usb-devel] pre/post_reset methods for skel

2007-05-08 Thread Oliver Neukum
Am Dienstag, 8. Mai 2007 18:59 schrieb Alan Stern: How do you like this approach? I changed my mind. An rwsem is a good idea. Regards Oliver - This SF.net email is sponsored by DB2 Express Download

Re: [linux-usb-devel] requirements for suspend()

2007-05-08 Thread Alan Stern
On Tue, 8 May 2007, Oliver Neukum wrote: Am Montag, 7. Mai 2007 21:23 schrieb Alan Stern: On Mon, 7 May 2007, Oliver Neukum wrote: +int usb_wait_anchor_empty_timeout(struct usb_anchor *anchor, int timeout) +{ + int res; + + res = wait_event_timeout(anchor-wait,

Re: [linux-usb-devel] pre/post_reset methods for skel

2007-05-08 Thread Alan Stern
On Tue, 8 May 2007, Oliver Neukum wrote: Am Dienstag, 8. Mai 2007 18:59 schrieb Alan Stern: But first, I think we should be able to get rid of the skel_open_lock mutex plus similar mutexes in other USB drivers.  The problem they address is the race between open() and disconnect() -- or

Re: [linux-usb-devel] pre/post_reset methods for skel

2007-05-08 Thread Alan Stern
On Tue, 8 May 2007, Oliver Neukum wrote: Am Dienstag, 8. Mai 2007 18:59 schrieb Alan Stern: How do you like this approach? I changed my mind. An rwsem is a good idea. Regards Oliver Glad to hear it. One might even go so far as to say that the char device

Re: [linux-usb-devel] OHCI hangs after failing to free resources

2007-05-08 Thread Alan Stern
On Mon, 7 May 2007, Mike Nuss wrote: Alan Stern wrote: Could be the driver updated the pointers but did so at the wrong time, with the result that the controller overwrote them with older values. Or maybe just one of them was overwritten. Would that explain your observations?

Re: [linux-usb-devel] OHCI hangs after failing to free resources

2007-05-08 Thread David Brownell
It's probably nothing, but this line in ohci-q.c in td_submit_urb raised an eyebrow: urb_priv-ed-hwHeadP = ~cpu_to_hc32 (ohci, ED_C); There is a comment resetting toggle is meaningless if the endpoint is active above this code. While that's true, I wouldn't expect this operation

Re: [linux-usb-devel] pre/post_reset methods for skel

2007-05-08 Thread Oliver Neukum
Am Dienstag, 8. Mai 2007 20:59 schrieb Alan Stern: 2. I would prefer to have exclusion between open and reset, too. Why?  I can understand wanting exclusion between read/write and reset.   But there's no obvious reason to make open and reset exclusive. I don't think we'd want mutual

Re: [linux-usb-devel] requirements for suspend()

2007-05-08 Thread Oliver Neukum
Am Dienstag, 8. Mai 2007 20:33 schrieb Alan Stern: +int usb_wait_anchor_empty_timeout(struct usb_anchor *anchor, int timeout) +{ + int res; + + res = wait_event_timeout(anchor-wait, list_empty(anchor-urb_list), timeout); Maybe make this an interruptible wait?

Re: [linux-usb-devel] pre/post_reset methods for skel

2007-05-08 Thread Oliver Neukum
Am Dienstag, 8. Mai 2007 21:01 schrieb Alan Stern: On Tue, 8 May 2007, Oliver Neukum wrote: Am Dienstag, 8. Mai 2007 18:59 schrieb Alan Stern: How do you like this approach? I changed my mind. An rwsem is a good idea.   Regards   Oliver Glad to hear it.  One

Re: [linux-usb-devel] Musb Bus Suspend

2007-05-08 Thread David Brownell
On Wednesday 02 May 2007, Felipe Balbi wrote: Hello all, What could I do to suspend the bus with musbmhdrc?? I saw that there's code for this and I have CONFIG_PM enabled, but the controller never enters in suspend mode... How would the suspend mode look different, though? It's only got

Re: [linux-usb-devel] OHCI hangs after failing to free resources

2007-05-08 Thread Alan Stern
On Tue, 8 May 2007, David Brownell wrote: It's probably nothing, but this line in ohci-q.c in td_submit_urb raised an eyebrow: urb_priv-ed-hwHeadP = ~cpu_to_hc32 (ohci, ED_C); There is a comment resetting toggle is meaningless if the endpoint is active above this code.

Re: [linux-usb-devel] OHCI hangs after failing to free resources

2007-05-08 Thread David Brownell
On Tuesday 08 May 2007, Alan Stern wrote: It's not allowed to be active at that point. The flag being tested is set only by usb_clear_halt() More accurately, the flag being tested (i.e., the toggle value) is _cleared_ only by usb_clear_halt() and usb_enable_endpoint(). ohci-hcd sets

Re: [linux-usb-devel] pre/post_reset methods for skel

2007-05-08 Thread Alan Stern
On Tue, 8 May 2007, Oliver Neukum wrote: Am Dienstag, 8. Mai 2007 20:59 schrieb Alan Stern: 2. I would prefer to have exclusion between open and reset, too. Why?  I can understand wanting exclusion between read/write and reset.   But there's no obvious reason to make open and reset

Re: [linux-usb-devel] requirements for suspend()

2007-05-08 Thread Alan Stern
On Tue, 8 May 2007, Oliver Neukum wrote: Am Dienstag, 8. Mai 2007 20:33 schrieb Alan Stern: +int usb_wait_anchor_empty_timeout(struct usb_anchor *anchor, int timeout) +{ + int res; + + res = wait_event_timeout(anchor-wait, list_empty(anchor-urb_list),

Re: [linux-usb-devel] dead CONFIG_ variables: drivers/usb/

2007-05-08 Thread David Brownell
On Thursday 03 May 2007, Robert P. J. Day wrote: $ ../dead_config.sh drivers/usb I'm ignoring the USB serial stuff here. Most of the gadget_chips.h symbols are not dead, they're just constants reserved for drivers that are currently not in the kernel.org tree. The role is much the same as

[linux-usb-devel] [patch 2.6.21-git] usb gadget, dead config cleanup

2007-05-08 Thread David Brownell
Remove some dead CONFIG_ symbols, and document the status of a few others. The gadget_chips.h references are by and large to drivers which exist but haven't yet been submitted for merging to the main 2.6 tree. Signed-off-by: David Brownell [EMAIL PROTECTED] --- drivers/usb/gadget/ether.c

Re: [linux-usb-devel] ISP1761 and gadget or usbnet

2007-05-08 Thread David Brownell
On Wednesday 02 May 2007, Prabhakar Kalasani wrote: Hi , The ISP1761 Host and Device Stack has been released for open source , which is tested working with 2.6.9 kernel on x86 PCI platform. That's a good thing, except for being on such an old kernel! When NXP was part of Philips, open

Re: [linux-usb-devel] [PATCH 3/3] xpad.c: Added Xbox360 gamepad rumble support.

2007-05-08 Thread Dmitry Torokhov
On Thursday 03 May 2007 09:04, Jan Kratochvil wrote: Hi Dmitry, thanks for feedback. Improved version of this patch follows: It is enabled only if CONFIG_XPAD_FF is set to y. Implementation is using force feedback support for memoryless devices. Applied with couple cosmetic changes,

Re: [linux-usb-devel] [PATCH 3/3] xpad.c: Added Xbox360 gamepad rumble support.

2007-05-08 Thread Dmitry Torokhov
Hi Jan, On Thursday 03 May 2007 17:41, Jan Kratochvil wrote: Hi again, what do you think about this? (This patch will work only against last gamepad rumble support patch) Thanks for your time Jan Kratochvil BigX button on xbox360 gamepad is surrounded by 4 green leds. This