[PATCH 3/4] Documentation sysfs-bus-usb: Correct use of devnum

2013-08-03 Thread Hans de Goede
Correct use of devnum in supports_autosuspend documentation, the sysfs path contains busnum-port.port.port not busnum-devnum (which is the usb bus device address). Signed-off-by: Hans de Goede hdego...@redhat.com --- Documentation/ABI/testing/sysfs-bus-usb | 2 +- 1 file changed, 1 insertion

[PATCH 0/4] usb: 1 small descriptor parsing fix + doc updates (v2)

2013-08-03 Thread Hans de Goede
Hi All, Here is a resend of a usb patchset I wrote a while back. This new version incorporate the documentation fixes (spelling) and documentation improvements suggested in the reviews of v1. Regards, Hans -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a

[PATCH 1/4] usb: config-desc.bLength may not exceed amount of data returned by the device

2013-08-03 Thread Hans de Goede
de Goede hdego...@redhat.com --- drivers/usb/core/config.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/usb/core/config.c b/drivers/usb/core/config.c index 7199adc..a6b2cab 100644 --- a/drivers/usb/core/config.c +++ b/drivers/usb/core/config.c @@ -424,7 +424,8

[PATCH 4/4] Documentation sysfs-bus-usb: Document all files used by libusb

2013-08-03 Thread Hans de Goede
Signed-off-by: Hans de Goede hdego...@redhat.com --- Documentation/ABI/testing/sysfs-bus-usb | 38 + 1 file changed, 38 insertions(+) diff --git a/Documentation/ABI/testing/sysfs-bus-usb b/Documentation/ABI/testing/sysfs-bus-usb index c117dda..8835ac3 100644

[PATCH 2/4] proc_usb_info.txt: Correct documentation about endianness of config descriptors

2013-08-03 Thread Hans de Goede
The config descriptors as read from /proc/bus/usb/BBB/DDD are in *bus* endian format. Correct proc_usb_info.txt to correctly reflect that. Signed-off-by: Hans de Goede hdego...@redhat.com --- Documentation/usb/proc_usb_info.txt | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff

[PATCH 0/1] Documentation sysfs-bus-usb: Document all files used by libusb v3

2013-08-14 Thread Hans de Goede
Hi All, This patch adds documentation for all sysfs files used by libusb. Changes in v2: -Spelling fixes -Add text about writing to bConfigurationValue, suggested by Alan Stern Changes in v3: -Rebase on latest usb-next Regards, Hans -- To unsubscribe from this list: send the line unsubscribe

[PATCH] Documentation sysfs-bus-usb: Document all files used by libusb

2013-08-14 Thread Hans de Goede
Signed-off-by: Hans de Goede hdego...@redhat.com --- Documentation/ABI/testing/sysfs-bus-usb | 38 + 1 file changed, 38 insertions(+) diff --git a/Documentation/ABI/testing/sysfs-bus-usb b/Documentation/ABI/testing/sysfs-bus-usb index 9c8926c..b0b9bb4 100644

[PATCH 5/5] usbfs: Add support for allocating / freeing streams

2013-08-14 Thread Hans de Goede
Signed-off-by: Hans de Goede hdego...@redhat.com --- drivers/usb/core/devio.c | 103 ++ include/uapi/linux/usbdevice_fs.h | 7 +++ 2 files changed, 110 insertions(+) diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c index 94e7839

[PATCH 1/5] usbfs: proc_do_submiturb use a local variable for number_of_packets

2013-08-14 Thread Hans de Goede
This is a preparation patch for adding support for bulk streams. Signed-off-by: Hans de Goede hdego...@redhat.com --- drivers/usb/core/devio.c | 18 -- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c index 737e3c1

[PATCH 3/5] usbfs: Add support for bulk stream ids

2013-08-14 Thread Hans de Goede
have garbage in there (as it was unused until now in the bulk case), will not break 2) This patch does not add support for allocating / freeing bulk-streams, that is done in a follow up patch Signed-off-by: Hans de Goede hdego...@redhat.com --- drivers/usb/core/devio.c | 4

[RFC 0/5] usbfs: Add support for bulk streams

2013-08-14 Thread Hans de Goede
Hi All, As discussed a long while back, usbfs is currently missing bulk streams support, and we ought to fix this. So this patch extends the usbfs API with bulk stream support. Please review. Note this patch-set is compile-tested only, since I don't have access to any USB-3 devices using bulk

[PATCH 2/5] usb-core: Track if an endpoint has streams

2013-08-14 Thread Hans de Goede
This is a preparation patch for adding support for bulk streams to usbfs. Signed-off-by: Hans de Goede hdego...@redhat.com --- drivers/usb/core/hcd.c | 28 ++-- include/linux/usb.h| 1 + 2 files changed, 23 insertions(+), 6 deletions(-) diff --git a/drivers/usb/core

[PATCH 4/5] usbfs: Add ep_to_host_endpoint helper function

2013-08-14 Thread Hans de Goede
Signed-off-by: Hans de Goede hdego...@redhat.com --- drivers/usb/core/devio.c | 18 +++--- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c index c7e946f..94e7839 100644 --- a/drivers/usb/core/devio.c +++ b/drivers/usb

Re: [PATCH] Documentation sysfs-bus-usb: Document all files used by libusb

2013-08-14 Thread Hans de Goede
Hi, On 08/14/2013 12:18 PM, Johan Hovold wrote: On Wed, Aug 14, 2013 at 11:17:57AM +0200, Hans de Goede wrote: +What: /sys/bus/usb/devices/.../busnum +KernelVersion: 2.6.22 +Description: + Bus-number of the USB-bus the device is connected to. + +What: /sys/bus

[PATCH 0/1] Documentation sysfs-bus-usb: Document all files used by libusb v4

2013-08-14 Thread Hans de Goede
Hi All, This patch adds documentation for all sysfs files used by libusb. Changes in v2: -Spelling fixes -Add text about writing to bConfigurationValue, suggested by Alan Stern Changes in v3: -Rebase on latest usb-next Changes in v4: -Improve the wording for the descriptors text, suggested by

[PATCH] Documentation sysfs-bus-usb: Document all files used by libusb

2013-08-14 Thread Hans de Goede
Signed-off-by: Hans de Goede hdego...@redhat.com --- Documentation/ABI/testing/sysfs-bus-usb | 38 + 1 file changed, 38 insertions(+) diff --git a/Documentation/ABI/testing/sysfs-bus-usb b/Documentation/ABI/testing/sysfs-bus-usb index 9c8926c..0053ae2 100644

Re: [RFC 0/5] usbfs: Add support for bulk streams

2013-08-15 Thread Hans de Goede
Hi, On 08/14/2013 08:21 PM, Greg KH wrote: On Wed, Aug 14, 2013 at 02:32:01PM +0200, Hans de Goede wrote: Hi All, As discussed a long while back, usbfs is currently missing bulk streams support, and we ought to fix this. So this patch extends the usbfs API with bulk stream support. Please

Re: [RFC 0/5] usbfs: Add support for bulk streams

2013-08-15 Thread Hans de Goede
Hi, On 08/15/2013 12:42 PM, Hans de Goede wrote: snip What device did you find? I have yet to see a shipping device with streams... I don't know about streams, I'm hoping that having a uasp device means it will also use streams. So far I've been unable to get my hands on anything doing

Re: [PATCH 2/5] usb-core: Track if an endpoint has streams

2013-08-16 Thread Hans de Goede
Hi, On 08/15/2013 06:00 PM, Sarah Sharp wrote: On Wed, Aug 14, 2013 at 02:32:03PM +0200, Hans de Goede wrote: - /* Streams only apply to bulk endpoints. */ - for (i = 0; i num_eps; i++) + for (i = 0; i num_eps; i++) { + /* Streams only apply to bulk endpoints

Re: [RFC 0/5] usbfs: Add support for bulk streams

2013-08-22 Thread Hans de Goede
Hi, On 08/22/2013 12:54 AM, Sarah Sharp wrote: On Thu, Aug 15, 2013 at 10:33:42PM +0200, Hans de Goede wrote: Hi, On 08/15/2013 12:42 PM, Hans de Goede wrote: snip What device did you find? I have yet to see a shipping device with streams... I don't know about streams, I'm hoping

Announcing libusbx-1.0.17-rc1

2013-08-28 Thread Hans de Goede
Hi All, I'm very happy to announce libusbx-1.0.17-rc1. 2013-08-28: v1.0.17-rc1 * Hotplug callbacks now always get passed a libusb_context, even if it is the default context. Previously NULL would be passed for the default context, but since the first context created is the default context,

[PATCH 2/3] Documentation sysfs-bus-usb: Document the speed file used by libusb

2013-08-30 Thread Hans de Goede
Cc: Greg KH gre...@linuxfoundation.org Signed-off-by: Hans de Goede hdego...@redhat.com --- Documentation/ABI/stable/sysfs-bus-usb | 6 ++ 1 file changed, 6 insertions(+) diff --git a/Documentation/ABI/stable/sysfs-bus-usb b/Documentation/ABI/stable/sysfs-bus-usb index 6b59aea..a596414

[PATCH 3/3] Documentation sysfs-bus-usb: Document which files are used by libusb

2013-08-30 Thread Hans de Goede
Cc: Greg KH gre...@linuxfoundation.org Signed-off-by: Hans de Goede hdego...@redhat.com --- Documentation/ABI/stable/sysfs-bus-usb | 10 ++ 1 file changed, 10 insertions(+) diff --git a/Documentation/ABI/stable/sysfs-bus-usb b/Documentation/ABI/stable/sysfs-bus-usb index a596414

[PATCH 1/3] Documentation sysfs-bus-usb: Move files with known users to stable

2013-08-30 Thread Hans de Goede
Cc: Greg KH gre...@linuxfoundation.org Signed-off-by: Hans de Goede hdego...@redhat.com --- Documentation/ABI/stable/sysfs-bus-usb | 126 +++ Documentation/ABI/testing/sysfs-bus-usb | 127 2 files changed, 126 insertions(+), 127

[PATCH 5/6] usbfs: Add ep_to_host_endpoint helper function

2013-08-30 Thread Hans de Goede
Signed-off-by: Hans de Goede hdego...@redhat.com --- drivers/usb/core/devio.c | 18 +++--- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c index c7e946f..94e7839 100644 --- a/drivers/usb/core/devio.c +++ b/drivers/usb

[RFC 0/6] usbfs: Add support for bulk streams v2

2013-08-30 Thread Hans de Goede
Hi All, As discussed a long while back, usbfs is currently missing bulk streams support, and we ought to fix this. So this patch extends the usbfs API with bulk stream support. Note this patch-set is compile-tested only atm. I now have an USB-3 disk dock which actually supports UAS and up to 4

[PATCH 3/6] usbfs: proc_do_submiturb use a local variable for number_of_packets

2013-08-30 Thread Hans de Goede
This is a preparation patch for adding support for bulk streams. Signed-off-by: Hans de Goede hdego...@redhat.com --- drivers/usb/core/devio.c | 18 -- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c index 737e3c1

[PATCH 4/6] usbfs: Add support for bulk stream ids

2013-08-30 Thread Hans de Goede
have garbage in there (as it was unused until now in the bulk case), will not break 2) This patch does not add support for allocating / freeing bulk-streams, that is done in a follow up patch Signed-off-by: Hans de Goede hdego...@redhat.com --- drivers/usb/core/devio.c | 4

[PATCH 2/6] usb-core: Track if an endpoint has streams

2013-08-30 Thread Hans de Goede
This is a preparation patch for adding support for bulk streams to usbfs. Signed-off-by: Hans de Goede hdego...@redhat.com --- drivers/usb/core/hcd.c | 40 +++- include/linux/usb.h| 1 + 2 files changed, 32 insertions(+), 9 deletions(-) diff --git

[PATCH 1/6] usb-core: Make usb_free_streams return an error

2013-08-30 Thread Hans de Goede
The hcd-driver free_streams method can return an error, so lets properly propagate that. Signed-off-by: Hans de Goede hdego...@redhat.com --- drivers/usb/core/hcd.c | 11 +++ include/linux/usb.h| 2 +- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/drivers/usb/core

Re: [PATCH 1/6] usb-core: Make usb_free_streams return an error

2013-08-31 Thread Hans de Goede
Hi, On 08/30/2013 08:09 PM, Greg KH wrote: On Fri, Aug 30, 2013 at 02:03:59PM +0200, Hans de Goede wrote: The hcd-driver free_streams method can return an error, so lets properly propagate that. Signed-off-by: Hans de Goede hdego...@redhat.com --- drivers/usb/core/hcd.c | 11

Announcing libusbx-1.0.17 final

2013-09-06 Thread Hans de Goede
Hi All, I'm very happy to announce libusbx-1.0.17. 2013-09-06: v1.0.17 * Hotplug callbacks now always get passed a libusb_context, even if it is the default context. Previously NULL would be passed for the default context, but since the first context created is the default context, and most

Re: [Bug] 0ac8:0321 Vimicro generic vc0321 Camera is not working and causes crashes since 3.2

2013-09-09 Thread Hans de Goede
Hi, On 09/08/2013 01:37 PM, Frank Dierich wrote: Hi, I have an ASUS A8JP Notebook with Ubuntu 12.04 with the following build in webcam Bus 001 Device 004: ID 0ac8:0321 Z-Star Microelectronics Corp. Vimicro generic vc0321 Camera The camera is working nice with Cheese and kernels before

Re: [Bug] 0ac8:0321 Vimicro generic vc0321 Camera is not working and causes crashes since 3.2

2013-09-18 Thread Hans de Goede
Hi, On 09/17/2013 08:25 PM, Frank Dierich wrote: On 09/09/2013 02:09 PM, Hans de Goede wrote: Thanks for the bug report, looking at the bug reports, they all report an error of -71 which is EPROTO, which typically means something is wrong at the USB level. And nothing has changed

Re: [Regression/Bug] Webcam is not working and causes crashes since 3.2

2013-09-19 Thread Hans de Goede
, 2.6.37.6, 2.6.38.8, 2.6.39.4, 3.0.94, 3.1.10. In all later kernels I have tested (3.2.50, 3.4.60, 3.10.10, 3.11.0, 3.12.0-rc1) Cheese shows for some seconds a green and noisy image and crashes then with a segmentation fault. Hans de Goede supposed that the error is caused by usb sub-system because

Re: [PATCH] USB: fix substandard locking for the sysfs files

2013-09-26 Thread Hans de Goede
are always available. They do not require any locking. The same is true of the cached interface string descriptor, because it is not deallocated until the usb_host_interface structure is destroyed. Signed-off-by: Alan Stern st...@rowland.harvard.edu CC: Hans de Goede hdego...@redhat.com Looks

[PATCH] Regression fix revert: Bluetooth: Add missing reset_resume dev_pm_ops

2013-09-28 Thread Hans de Goede
gustavo.pado...@collabora.co.uk Cc: sta...@vger.kernel.org Signed-off-by: Hans de Goede hdego...@redhat.com --- drivers/bluetooth/btusb.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c index 8e16f0a..d0b3d90 100644 --- a/drivers/bluetooth/btusb.c

Re: [PATCH] Regression fix revert: Bluetooth: Add missing reset_resume dev_pm_ops

2013-10-03 Thread Hans de Goede
502f769662978a2fe99d0caed5e53e3006107381. Cc: Shuah Khan shuah...@samsung.com Cc: Gustavo Padovan gustavo.pado...@collabora.co.uk Cc: sta...@vger.kernel.org Signed-off-by: Hans de Goede hdego...@redhat.com --- drivers/bluetooth/btusb.c | 1 - 1 file changed, 1 deletion(-) Patch has been applied to bluetooth.git. Thanks. why

[PATCH 3/6] xhci: Check size rather then number of streams when allocating stream ctxs

2013-10-03 Thread Hans de Goede
Before this a device needing ie 32 stream ctxs would end up with an entry from the small_streams_pool which has 256 bytes entries, where as 32 stream ctxs need 512 bytes. Things actually keep running for a surprisingly long time before crashing because of this. Signed-off-by: Hans de Goede hdego

[PATCH 1/6] xhci: fix usb3 streams

2013-10-03 Thread Hans de Goede
. Signed-off-by: Gerd Hoffmann kra...@redhat.com Signed-off-by: Hans de Goede hdego...@redhat.com --- drivers/usb/host/xhci-mem.c | 53 ++--- drivers/usb/host/xhci.h | 2 ++ 2 files changed, 42 insertions(+), 13 deletions(-) diff --git a/drivers/usb

[PATCH 2/6] xhci: Free streams when they are still allocated on a set_interface call

2013-10-03 Thread Hans de Goede
0x81 , streams are already disabled! [ 96.982400] xhci_hcd :01:00.0: WARN xhci_free_streams() called with non-streams endpoint But it is better to also warn about the actual cause of this later warnings. Signed-off-by: Hans de Goede hdego...@redhat.com --- drivers/usb/host/xhci.c | 23

[PATCH 0/6] xhci: Multiple fixes for usb bulk streams

2013-10-03 Thread Hans de Goede
Hi All, After spending 1.5 weeks debugging issues with xhci streams which would hard-freeze my machine every 5 minutes, I'm very happy to present this patch set, with which usb 3 streams are fully stable for me, including using them from userspace through qemu usb redirection (I'll post kernel

[PATCH 5/6] xhci: Set SCT field for Set TR dequeue on streams

2013-10-03 Thread Hans de Goede
. Signed-off-by: Hans de Goede hdego...@redhat.com --- drivers/usb/host/xhci-ring.c | 5 - drivers/usb/host/xhci.h | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c index 1ad397f..bed4cfa 100644 --- a/drivers/usb

[PATCH 4/6] xhci: For streams the css flag most be read from the stream-ctx on ep stop

2013-10-03 Thread Hans de Goede
Signed-off-by: Hans de Goede hdego...@redhat.com --- drivers/usb/host/xhci-ring.c | 14 +++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c index 411da1f..1ad397f 100644 --- a/drivers/usb/host/xhci-ring.c +++ b

[PATCH 6/6] xhci: For streams the dequeue ptr must be read from the stream ctx

2013-10-03 Thread Hans de Goede
the Nec writes the ptr to both the ep and stream contexts when streams are used. Signed-off-by: Hans de Goede hdego...@redhat.com --- drivers/usb/host/xhci-ring.c | 22 +++--- drivers/usb/host/xhci.h | 1 + 2 files changed, 16 insertions(+), 7 deletions(-) diff --git

RFC: leave bulk stream endpoints disabled until streams are allocated

2013-10-03 Thread Hans de Goede
Hi All, As a result of all my streams work, I've started to wonder if it would not be better to leave bulk endpoints with streams disabled until streams are allocated. It seems to me that allowing to submit non stream bulk transfers on stream eps is not useful, and could even be harmful if it

[PATCH] xhci: use usb_ss_max_streams in xhci_check_streams_endpoint

2013-10-04 Thread Hans de Goede
The ss_ep_comp bmAttributes filed can contain more info then just the streams, use usb_ss_max_streams to properly get max streams. Signed-off-by: Hans de Goede hdego...@redhat.com --- drivers/usb/host/xhci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/host

[PATCH 8/9] usbfs: Add ep_to_host_endpoint helper function

2013-10-04 Thread Hans de Goede
Signed-off-by: Hans de Goede hdego...@redhat.com --- drivers/usb/core/devio.c | 18 +++--- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c index 102dbd2..107e107 100644 --- a/drivers/usb/core/devio.c +++ b/drivers/usb

[PATCH 6/9] usbfs: proc_do_submiturb use a local variable for number_of_packets

2013-10-04 Thread Hans de Goede
This is a preparation patch for adding support for bulk streams. Signed-off-by: Hans de Goede hdego...@redhat.com --- drivers/usb/core/devio.c | 18 -- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c index 7dfaa87

[PATCH 3/9] usb-core: Track if an endpoint has streams

2013-10-04 Thread Hans de Goede
This is a preparation patch for adding support for bulk streams to usbfs. Signed-off-by: Hans de Goede hdego...@redhat.com --- drivers/usb/core/hcd.c | 40 +++- include/linux/usb.h| 1 + 2 files changed, 32 insertions(+), 9 deletions(-) diff --git

[PATCH 9/9] usbfs: Add support for allocating / freeing streams

2013-10-04 Thread Hans de Goede
Signed-off-by: Hans de Goede hdego...@redhat.com --- drivers/usb/core/devio.c | 113 ++ include/uapi/linux/usbdevice_fs.h | 7 +++ 2 files changed, 120 insertions(+) diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c index 107e107

[PATCH 7/9] usbfs: Add support for bulk stream ids

2013-10-04 Thread Hans de Goede
have garbage in there (as it was unused until now in the bulk case), will not break 2) This patch does not add support for allocating / freeing bulk-streams, that is done in a follow up patch Signed-off-by: Hans de Goede hdego...@redhat.com --- drivers/usb/core/devio.c | 4

[PATCH 1/9] usb-core: Fix usb_free_streams return value documentation

2013-10-04 Thread Hans de Goede
Signed-off-by: Hans de Goede hdego...@redhat.com --- drivers/usb/core/hcd.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c index 9795a21..bd5acdd 100644 --- a/drivers/usb/core/hcd.c +++ b/drivers/usb/core/hcd.c @@ -2077,8

[PATCH 0/9] usbfs: Add support for usb3 bulk streams

2013-10-04 Thread Hans de Goede
Hi All, I'm very happy to present the (hopefully) final version of my patch set for adding bulk stream support to usbfs. I've tested this using an uas device redirected to a qemu vm (which uses usbfs to access the device), and with the xhci fixes I send yesterday this works well. This patch set

[PATCH 4/9] usb-core: Free bulk streams on interface release

2013-10-04 Thread Hans de Goede
Documentation/usb/bulk-streams.txt says: All stream IDs will be deallocated when the driver releases the interface, to ensure that drivers that don't support streams will be able to use the endpoint This commit actually implements this. Signed-off-by: Hans de Goede hdego...@redhat.com

[PATCH 2/9] usb-core: Move USB_MAXENDPOINTS definitions to usb.h

2013-10-04 Thread Hans de Goede
So that it can be used in other places too. Signed-off-by: Hans de Goede hdego...@redhat.com --- drivers/usb/core/config.c | 1 - include/linux/usb.h | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/usb/core/config.c b/drivers/usb/core/config.c index a6b2cab

[PATCH 5/9] usbfs: Kill urbs on interface before doing a set_interface

2013-10-04 Thread Hans de Goede
trust userspace to get this right, so enforce it by killing any urbs still pending on the interface. Signed-off-by: Hans de Goede hdego...@redhat.com --- drivers/usb/core/devio.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c index

Re: [PATCH 3/9] usb-core: Track if an endpoint has streams

2013-10-04 Thread Hans de Goede
Hi, On 10/04/2013 05:35 PM, Alan Stern wrote: On Fri, 4 Oct 2013, Hans de Goede wrote: This is a preparation patch for adding support for bulk streams to usbfs. + for (i = 0; i num_eps; i++) + eps[i]-has_streams = 1; --- a/include/linux/usb.h +++ b/include/linux

Re: [PATCH 4/9] usb-core: Free bulk streams on interface release

2013-10-04 Thread Hans de Goede
Hi, On 10/04/2013 05:37 PM, Alan Stern wrote: On Fri, 4 Oct 2013, Hans de Goede wrote: Documentation/usb/bulk-streams.txt says: All stream IDs will be deallocated when the driver releases the interface, to ensure that drivers that don't support streams will be able to use the endpoint

Re: [PATCH 9/9] usbfs: Add support for allocating / freeing streams

2013-10-04 Thread Hans de Goede
Hi, On 10/04/2013 05:44 PM, Alan Stern wrote: On Fri, 4 Oct 2013, Hans de Goede wrote: +static int parse_usbdevfs_streams(struct usb_device *dev, + struct usbdevfs_streams __user *streams, + unsigned int *num_streams_ret

Re: [PATCH 4/9] usb-core: Free bulk streams on interface release

2013-10-06 Thread Hans de Goede
Hi, On 10/04/2013 08:43 PM, Alan Stern wrote: On Fri, 4 Oct 2013, Hans de Goede wrote: + struct usb_host_endpoint *ep, *eps[USB_MAXENDPOINTS]; That's a big array to put on the stack: 30 entries each containing 8 bytes (on a 64-bit arch). I was wondering about this myself when I

Re: New USB core API to change interval and max packet size

2013-10-07 Thread Hans de Goede
Hi, On 10/02/2013 08:39 PM, Sarah Sharp wrote: On Wed, Oct 02, 2013 at 10:22:52AM -0400, Alan Stern wrote: snip We should consider this before rushing into a new API. Yes, I agree. :) That's why I'd like to see some cases in the media drivers code where it could benefit from changing the

[PATCH 0/2] usb-anchor: avoid usb_wait_anchor_empty_timeout returning too soon

2013-10-09 Thread Hans de Goede
Hi All, While working on uas (to test usb 3 bulk streams) I added a LOGICAL_UNIT_RESET at uas probe time for testing purposes, this exercises the uas driver task mgmt code, and sometimes fails because usb_wait_anchor_empty_timeout (unexpectedly) returns before the last anchored urbs completion

[PATCH 1/2] usb-anchor: Ensure poisened gets initialized to 0

2013-10-09 Thread Hans de Goede
And do so in a way which ensures that any fields added in the future will also get properly zero-ed. Signed-off-by: Hans de Goede hdego...@redhat.com --- include/linux/usb.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/linux/usb.h b/include/linux/usb.h index 8ad6e7e..2b5d08b

[PATCH 2/2] usb-anchor: Delay usb_wait_anchor_empty_timeout wake up till completion is done

2013-10-09 Thread Hans de Goede
handler (rtlwifi). So I have come up with this patch instead, which adds the ability to suspend wakeups of usb_wait_anchor_empty_timeout() waiters to the usb_anchor functionality, and uses this in __usb_hcd_giveback_urb() to delay wake-ups until the completion handler has run. Signed-off-by: Hans de

[PATCH 0/9] usbfs: Add support for usb3 bulk streams v2

2013-10-09 Thread Hans de Goede
Hi all, Here is v2 of my patch-set for adding bulk stream support to usbfs. I've tested this using an uas device redirected to a qemu vm (which uses usbfs to access the device), and with the xhci fixes I send a while back this works well. This patch set has the following changes compared to v1:

[PATCH 1/9] usb-core: Fix usb_free_streams return value documentation

2013-10-09 Thread Hans de Goede
Signed-off-by: Hans de Goede hdego...@redhat.com --- drivers/usb/core/hcd.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c index 149cdf1..15d935d 100644 --- a/drivers/usb/core/hcd.c +++ b/drivers/usb/core/hcd.c @@ -2080,8

[PATCH 7/9] usbfs: Add support for bulk stream ids

2013-10-09 Thread Hans de Goede
have garbage in there (as it was unused until now in the bulk case), will not break 2) This patch does not add support for allocating / freeing bulk-streams, that is done in a follow up patch Signed-off-by: Hans de Goede hdego...@redhat.com --- drivers/usb/core/devio.c | 4

[PATCH 3/9] usb-core: Track if an endpoint has streams

2013-10-09 Thread Hans de Goede
This is a preparation patch for adding support for bulk streams to usbfs. Signed-off-by: Hans de Goede hdego...@redhat.com --- drivers/usb/core/hcd.c | 40 +++- include/linux/usb.h| 1 + 2 files changed, 32 insertions(+), 9 deletions(-) diff --git

[PATCH 6/9] usbfs: proc_do_submiturb use a local variable for number_of_packets

2013-10-09 Thread Hans de Goede
This is a preparation patch for adding support for bulk streams. Signed-off-by: Hans de Goede hdego...@redhat.com --- drivers/usb/core/devio.c | 18 -- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c index e1ebbd1

[PATCH 5/9] usbfs: Kill urbs on interface before doing a set_interface

2013-10-09 Thread Hans de Goede
trust userspace to get this right, so enforce it by killing any urbs still pending on the interface. Signed-off-by: Hans de Goede hdego...@redhat.com --- drivers/usb/core/devio.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c index

[PATCH 4/9] usb-core: Free bulk streams on interface release

2013-10-09 Thread Hans de Goede
Documentation/usb/bulk-streams.txt says: All stream IDs will be deallocated when the driver releases the interface, to ensure that drivers that don't support streams will be able to use the endpoint This commit actually implements this. Signed-off-by: Hans de Goede hdego...@redhat.com

[PATCH 8/9] usbfs: Add ep_to_host_endpoint helper function

2013-10-09 Thread Hans de Goede
Signed-off-by: Hans de Goede hdego...@redhat.com --- drivers/usb/core/devio.c | 18 +++--- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c index 00487a0..bfb2821 100644 --- a/drivers/usb/core/devio.c +++ b/drivers/usb

[PATCH 9/9] usbfs: Add support for allocating / freeing streams

2013-10-09 Thread Hans de Goede
Signed-off-by: Hans de Goede hdego...@redhat.com --- drivers/usb/core/devio.c | 118 ++ include/uapi/linux/usbdevice_fs.h | 7 +++ 2 files changed, 125 insertions(+) diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c index bfb2821

[PATCH 2/9] usb-core: Move USB_MAXENDPOINTS definitions to usb.h

2013-10-09 Thread Hans de Goede
So that it can be used in other places too. Signed-off-by: Hans de Goede hdego...@redhat.com --- drivers/usb/core/config.c | 1 - include/linux/usb.h | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/usb/core/config.c b/drivers/usb/core/config.c index a6b2cab

Re: [PATCH 2/2] usb-anchor: Delay usb_wait_anchor_empty_timeout wake up till completion is done

2013-10-09 Thread Hans de Goede
Hi, Thanks for the quick review! On 10/09/2013 07:00 PM, Oliver Neukum wrote: On Wed, 2013-10-09 at 17:01 +0200, Hans de Goede wrote: So I have come up with this patch instead, which adds the ability to suspend wakeups of usb_wait_anchor_empty_timeout() waiters to the usb_anchor

Re: [PATCH 0/6] xhci: Multiple fixes for usb bulk streams

2013-10-10 Thread Hans de Goede
Hi, On 10/10/2013 09:04 PM, Sarah Sharp wrote: On Fri, Oct 04, 2013 at 12:29:43AM +0200, Hans de Goede wrote: Hi All, Hi Hans, After spending 1.5 weeks debugging issues with xhci streams which would hard-freeze my machine every 5 minutes, I'm very happy to present this patch set

Re: [PATCH v2] xhci: fix usb3 streams

2013-10-15 Thread Hans de Goede
are moved to make them static.] Signed-off-by: Gerd Hoffmann kra...@redhat.com Signed-off-by: Hans de Goede hdego...@redhat.com Signed-off-by: Sarah Sharp sarah.a.sh...@linux.intel.com --- drivers/usb/host/xhci-mem.c | 132 +--- drivers/usb/host/xhci.h

[PATCH 2/2] xhci: Fix sparse warnings caused by: For streams the dequeue ptr must be read from the stream ctx

2013-10-17 Thread Hans de Goede
Note this patch is probably best squashed into the original For streams the dequeue ptr must be read from the stream ctx patch. Signed-off-by: Hans de Goede hdego...@redhat.com --- drivers/usb/host/xhci-ring.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/host

[PATCH 1/2] usb.h: Document new usb_host_endpoint streams member

2013-10-17 Thread Hans de Goede
Note this patch is probably best squashed into my usb-core: Track if an endpoint has streams patch. Signed-off-by: Hans de Goede hdego...@redhat.com --- include/linux/usb.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/linux/usb.h b/include/linux/usb.h index 1c924eb..a4c8406 100644

Re: [xhci:fun-streams-fixes 33/48] drivers/usb/host/xhci-ring.c:1154:29: sparse: incorrect type in assignment (different base types)

2013-10-17 Thread Hans de Goede
Hi, On 10/17/2013 06:42 PM, Sarah Sharp wrote: All right, so we have a couple sparse warnings with this patch. On Thu, Oct 17, 2013 at 01:40:15PM +0800, kbuild test robot wrote: tree: git://git.kernel.org/pub/scm/linux/kernel/git/sarah/xhci.git fun-streams-fixes head:

[PATCH 2/5] uas: Urbs must be anchored before submitting them

2013-10-17 Thread Hans de Goede
-off-by: Hans de Goede hdego...@redhat.com --- drivers/usb/storage/uas.c | 20 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/drivers/usb/storage/uas.c b/drivers/usb/storage/uas.c index 080851d..11e3679 100644 --- a/drivers/usb/storage/uas.c +++ b/drivers/usb

[PATCH 3/5] uas: Properly set interface to altsetting 0 on probe failure

2013-10-17 Thread Hans de Goede
- Rename labels to properly reflect this - Don't skip free-ing the streams when scsi_init_shared_tag_map fails Signed-off-by: Hans de Goede hdego...@redhat.com --- drivers/usb/storage/uas.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/usb/storage

[PATCH 5/5] uas: uas_alloc_cmd_urb: drop unused stream_id parameter

2013-10-17 Thread Hans de Goede
The cmd endpoint never has streams, so the stream_id parameter is unused. Signed-off-by: Hans de Goede hdego...@redhat.com --- drivers/usb/storage/uas.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/usb/storage/uas.c b/drivers/usb/storage/uas.c index 286225e

[PATCH 1/5] uas: Deal with externally triggered reset, and fix reset locking

2013-10-17 Thread Hans de Goede
usb_device_reset is called, and taking this lock will also protect the usage of the resetting flag in the pre and post reset handlers. Signed-off-by: Hans de Goede hdego...@redhat.com --- drivers/usb/storage/uas.c | 21 + 1 file changed, 17 insertions(+), 4 deletions(-) diff

[PATCH 4/5] uas: Avoid unnecessary unlock / lock calls around unlink_data_urbs

2013-10-17 Thread Hans de Goede
-off-by: Hans de Goede hdego...@redhat.com --- drivers/usb/storage/uas.c | 20 +++- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/drivers/usb/storage/uas.c b/drivers/usb/storage/uas.c index 6436486..286225e 100644 --- a/drivers/usb/storage/uas.c +++ b/drivers/usb

Re: [PATCH] xhci: Remove segments from radix tree on failed insert.

2013-10-17 Thread Hans de Goede
it all that ugly :) I've also run various tests and it seems to work as advertised (I've not managed to trigger the error path though AFAIK). Acked-by: Hans de Goede hdego...@redhat.com Sarah Sharp drivers/usb/host/xhci-mem.c | 106 +--- 1 file changed

[PATCH] uas: Fix uas not working when plugged into an ehci port

2013-10-17 Thread Hans de Goede
usb_submit_urb failure. With this fixed the uas code works nicely with an uas device plugged into an ehci port. Signed-off-by: Hans de Goede hdego...@redhat.com --- drivers/usb/storage/uas.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/usb/storage/uas.c b

Re: [PATCH] uas: Fix uas not working when plugged into an ehci port

2013-10-17 Thread Hans de Goede
Hi, Ignore please I accidentally left some debugging in here, expect a v2 shortly. Regards, Hans On 10/17/2013 11:22 PM, Hans de Goede wrote: I thought it would be a good idea to also test uas with usb-2, and it turns out it ws, as it did not work. The problem is that the uas driver

[PATCH] uas: Fix uas not working when plugged into an ehci port

2013-10-17 Thread Hans de Goede
usb_submit_urb failure. With this fixed the uas code works nicely with an uas device plugged into an ehci port. Signed-off-by: Hans de Goede hdego...@redhat.com --- drivers/usb/storage/uas.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/usb/storage/uas.c b/drivers/usb

Re: [PATCH] uas: Fix uas not working when plugged into an ehci port

2013-10-20 Thread Hans de Goede
Hi, On 10/18/2013 04:01 PM, Alan Stern wrote: On Thu, 17 Oct 2013, Hans de Goede wrote: I thought it would be a good idea to also test uas with usb-2, and it turns out it ws, as it did not work. The problem is that the uas driver was passing the bEndpointAddress' direction bit

[PATCH 0/1] uas: Fix uas not working when plugged into an ehci port v2

2013-10-20 Thread Hans de Goede
Hi All, Here is v2 of this patch, new in v2: -use usb_endpoint_num() to get the endpoint num, rather then masking ourselves Regards, Hans -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord...@vger.kernel.org More majordomo info at

[PATCH] uas: Fix uas not working when plugged into an ehci port

2013-10-20 Thread Hans de Goede
usb_submit_urb failure. With this fixed the uas code works nicely with an uas device plugged into an ehci port. Signed-off-by: Hans de Goede hdego...@redhat.com --- drivers/usb/storage/uas.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/usb/storage/uas.c b/drivers

Re: [PATCH 1/5] uas: Deal with externally triggered reset, and fix reset locking

2013-10-22 Thread Hans de Goede
Hi, On 10/21/2013 09:21 AM, Oliver Neukum wrote: On Thu, 2013-10-17 at 20:49 +0200, Hans de Goede wrote: The uas driver is only capable of dealing with an usb-reset it has triggered itself, fix the pre and post reset return values to reflect this. What happens if you get an external reset

[RFC 0/2] uas: Deal with externally triggered reset, and fix reset locking (v2)

2013-10-22 Thread Hans de Goede
Hi All, Here is v2 of my uas: Deal with externally triggered reset, and fix reset locking patch, now split into 2 patches. Besides being split into 2 patches, this new version should deal properly with externally triggered resets. Note this is RFC only for now, as I'm travelling without access

[PATCH 2/2] uas: Fix reset handling for externally triggered reset

2013-10-22 Thread Hans de Goede
Handle usb-device resets not triggered from uas_eh_bus_reset_handler(), when this happens, disable cmd queuing during the reset, and wait for existing requests to finish in pre_reset. Signed-off-by: Hans de Goede hdego...@redhat.com --- drivers/usb/storage/uas.c | 47

[PATCH 1/2] uas: Fix reset locking

2013-10-22 Thread Hans de Goede
Fix the uas_eh_bus_reset_handler not properly taking the usbdev lock before calling usb_device_reset, the usb-core expects this lock to be taken when usb_device_reset is called. Signed-off-by: Hans de Goede hdego...@redhat.com --- drivers/usb/storage/uas.c | 9 + 1 file changed, 9

Re: [PATCH 2/2] uas: Fix reset handling for externally triggered reset

2013-10-22 Thread Hans de Goede
Hi, On 10/22/2013 08:52 PM, Oliver Neukum wrote: On Tue, 2013-10-22 at 16:58 +0100, Hans de Goede wrote: Handle usb-device resets not triggered from uas_eh_bus_reset_handler(), when this happens, disable cmd queuing during the reset, and wait for existing requests to finish in pre_reset. Hm

[PATCH 0/7] uas: Final set of uas fixes

2013-10-24 Thread Hans de Goede
Hi All, This is / should be my final set of uas fixes. After this set my uas to-do list is empty and uas should be in good shape to go into 3.14 . Regards, Hans -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord...@vger.kernel.org More

[PATCH 2/7] uas: Move uas detect code to uas-detect.h

2013-10-24 Thread Hans de Goede
This is a preparation patch for teaching usb-storage to not bind to uas devices. Signed-off-by: Hans de Goede hdego...@redhat.com --- drivers/usb/storage/uas-detect.h | 40 drivers/usb/storage/uas.c| 40 ++-- 2

  1   2   3   4   5   6   7   8   9   10   >