[PATCH V2] usb: phy: am335x: Use SIMPLE_DEV_PM_OPS macro

2014-03-06 Thread Jingoo Han
Use SIMPLE_DEV_PM_OPS macro and remove DEV_PM_OPS macro, in order to make the code simpler. Signed-off-by: Jingoo Han --- Changes since v1: - Move SIMPLE_DEV_PM_OPS outside the #ifdef CONFIG_PM_SLEEP condition and remove DEV_PM_OPS macro, per Roger Quadros drivers/usb/phy/phy-am335x.c | 12

[PATCH v2 2/2] xhci: Use pci_enable_msix_exact() instead of pci_enable_msix()

2014-03-06 Thread Alexander Gordeev
As result of deprecation of MSI-X/MSI enablement functions pci_enable_msix() and pci_enable_msi_block() all drivers using these two interfaces need to be updated to use the new pci_enable_msi_range() or pci_enable_msi_exact() and pci_enable_msix_range() or pci_enable_msix_exact() interfaces. Sign

[PATCH v2 1/2] xhci: Cleanup xhci_setup_msi() and xhci_setup_msix()

2014-03-06 Thread Alexander Gordeev
Make xhci_setup_msi() and xhci_setup_msix() functions return error code in a consistent and more clear way. Signed-off-by: Alexander Gordeev Cc: Sarah Sharp Cc: Greg Kroah-Hartman Cc: linux-usb@vger.kernel.org Cc: linux-...@vger.kernel.org --- drivers/usb/host/xhci.c |5 +++-- 1 files chan

[PATCH v3] phy: ti-pipe3: Add SATA DPLL support

2014-03-06 Thread Kishon Vijay Abraham I
From: Roger Quadros USB and SATA DPLLs need different settings. Provide the SATA DPLL settings and use the proper DPLL settings based on device tree node's compatible_id. Signed-off-by: Roger Quadros Signed-off-by: Kishon Vijay Abraham I --- Changes from v2: * kept only the drivers/phy part

Re: [PATCH v3] phy: omap-control: update dra7 and am437 usb2 bindings

2014-03-06 Thread George Cherian
On 3/7/2014 11:18 AM, Kishon Vijay Abraham I wrote: From: Roger Quadros The dra7-usb2 and am437-usb2 bindings have not yet been used. Change them to be more elegant. Signed-off-by: Roger Quadros Signed-off-by: Kishon Vijay Abraham I --- Changes from v2: Kept only the drivers/phy part in this

[PATCH v3] phy: ti-pipe3: cleanup clock handling

2014-03-06 Thread Kishon Vijay Abraham I
From: Roger Quadros As this driver is no longer USB specific, use generic clock names. - Fix PLL_SD_SHIFT from 9 to 10 - Don't separate prepare/unprepare clock from enable/disable. This ensures optimal power savings. Signed-off-by: Roger Quadros Signed-off-by: Kishon Vijay Abraham I --- Cha

[PATCH v3] phy: omap-control: update dra7 and am437 usb2 bindings

2014-03-06 Thread Kishon Vijay Abraham I
From: Roger Quadros The dra7-usb2 and am437-usb2 bindings have not yet been used. Change them to be more elegant. Signed-off-by: Roger Quadros Signed-off-by: Kishon Vijay Abraham I --- Changes from v2: Kept only the drivers/phy part in this patch drivers/phy/phy-omap-control.c |4 ++-- 1

Re: [PATCH v2] phy-rcar-gen2-usb: add device tree support

2014-03-06 Thread Magnus Damm
On Sat, Mar 1, 2014 at 10:07 AM, Sergei Shtylyov wrote: > Add support of the device tree probing for the Renesas R-Car generation 2 SoCs > documenting the device tree binding as necessary. > > Signed-off-by: Sergei Shtylyov > > --- > This patch is against the 'next' branch of Felipe Balbi's 'usb.

Re: Renesas RCar device-tree USB series

2014-03-06 Thread Magnus Damm
Hi Ben, On Fri, Mar 7, 2014 at 3:01 AM, Ben Dooks wrote: > This is a new series covering enabling the RCar series of SoCs USB > with device-tree based booting. It has been tested on the R8A7790 > Lager board. > > Improvements from the previous series include: > > - mapping usb to the rele

Re: [PATCH v3] phy: omap-control: update dra7 and am437 usb2 Documentation bindings

2014-03-06 Thread Kishon Vijay Abraham I
On Thursday 06 March 2014 09:33 PM, Felipe Balbi wrote: From: Roger Quadros The dra7-usb2 and am437-usb2 bindings have not yet been used. Change them to be more elegant. Acked-by: Kishon Vijay Abraham I Signed-off-by: Roger Quadros Signed-off-by: Felipe Balbi --- Here's updated patch wit

RE: [PATCH v9 3/4] phy: Add new Exynos USB 2.0 PHY driver

2014-03-06 Thread Anton Tikhomirov
Hi, > Subject: Re: [PATCH v9 3/4] phy: Add new Exynos USB 2.0 PHY driver > > Hi, > > On Thursday 06 March 2014 02:49 PM, Anton Tikhomirov wrote: > > Hi, > > > >> Subject: RE: [PATCH v9 3/4] phy: Add new Exynos USB 2.0 PHY driver > >> > >> Hi, > >> > >>> Subject: Re: [PATCH v9 3/4] phy: Add new E

Re: [PATCH v3 00/13] Add USB OTG HNP and SRP support on Chipidea usb driver

2014-03-06 Thread Peter Chen
On Thu, Feb 27, 2014 at 07:38:18AM +0800, Li Jun wrote: > From: b47624 > > This patchset adds USB OTG HNP and SRP support on chipidea usb driver, > existing OTG port role swtich function by ID pin status kept unchanged, > based on that, if select CONFIG_USB_OTG_FSM, OTG HNP and SRP will be > supp

[PATCH net-next 3/7] r8152: up the priority of the transmission

2014-03-06 Thread Hayes Wang
move the tx_bottom() from delayed_work to tasklet. It makes the rx and tx balanced. If the device is in runtime suspend when getting the tx packet, wakeup the device before trasmitting. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 45 +++-- 1 fi

[PATCH net-next 1/7] r8152: replace spin_lock_irqsave and spin_unlock_irqrestore

2014-03-06 Thread Hayes Wang
Use spin_lock and spin_unlock in interrupt context. The ndo_start_xmit would not be called in interrupt context, so replace the relative spin_lock_irqsave and spin_unlock_irqrestore with spin_lock_bh and spin_unlock_bh. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 28

[PATCH net-next 0/7] r8152: tx/rx improvement

2014-03-06 Thread Hayes Wang
- Select the suitable spin lock for each function. - Add additional check to reduce the spin lock. - Up the priority of the tx to avoid interrupted by rx. - Support rx checksum, large send, and IPv6 hw checksum. Hayes Wang (7): r8152: replace spin_lock_irqsave and spin_unlock_irqrestore r8

[PATCH net-next 4/7] r8152: calculate the dropped packets for rx

2014-03-06 Thread Hayes Wang
Continue dealing with the remain rx packets, even though the allocation of the skb fail. This could calculate the correct dropped packets. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/usb/r8152.c b/drivers

[PATCH net-next 5/7] r8152: support rx checksum

2014-03-06 Thread Hayes Wang
Support hw rx checksum for TCP and UDP packets. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 41 +++-- 1 file changed, 39 insertions(+), 2 deletions(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index 08f4e870..8bb8782 100644 --

[PATCH net-next 6/7] r8152: support TSO

2014-03-06 Thread Hayes Wang
Support scatter gather and TSO. Adjust the tx checksum function and set the max gso size to fix the size of the tx aggregation buffer. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 117 +++- 1 file changed, 87 insertions(+), 30 deletions(-)

[PATCH net-next 7/7] r8152: support IPv6

2014-03-06 Thread Hayes Wang
Support hw IPv6 checksum for TCP and UDP packets. Note that the hw has the limitation of the range of the transport offset. Besides, the TCP Pseudo Header of the IPv6 TSO of the hw bases on the Microsoft document which excludes the packet length. Signed-off-by: Hayes Wang --- drivers/net/usb/r8

[PATCH net-next 2/7] r8152: check tx agg list before spin lock

2014-03-06 Thread Hayes Wang
Check tx agg list before spin lock to avoid doing spin lock every times. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index 8ecb41b..00b3192 100644 --- a/drivers/net/usb/r8152.c +++

Re: BUG: USB Reset-Resume Mechanism does not work for runtime resume

2014-03-06 Thread Peter Chen
On Thu, Mar 06, 2014 at 10:10:48AM +, Poulain, Loic wrote: > I agree, but because it's possible to have many different hardware for the > same class driver, you can't predict if all of them will be not broken. So in > this case, each USB class driver should have the reset-resume callback. It

Re: usb modem not working on xhci host

2014-03-06 Thread vichy
hi Sarah and Greg: 2014-03-06 23:25 GMT+08:00 vichy : > hi Greg: > > 2014-03-06 22:49 GMT+08:00 Greg KH : >> On Thu, Mar 06, 2014 at 10:35:24PM +0800, vichy wrote: >>> hi sarah: >>> > Can you send me the output of `sudo lsusb -v` for when the device is >>> > under EHCI and when it's under xHCI? A

Re: [PATCHv3 0/4] usb: dwc2/s3c-hsotg: Move the s3c-hsotg driver into dwc2

2014-03-06 Thread Jingoo Han
On Friday, March 07, 2014 6:48 AM, Dinh Nguyen wrote: > > From: Dinh Nguyen > > Diffs from V2: > - Renamed s3c-hsotg.c to gadget.c > - For dynamically linked modules, dwc2_gadget.ko is built for peripheral mode > and for host mode, it remains dwc2.ko and dwc2_platform.ko or dwc2_pci.ko. > - Sp

Re: [PATCH] usbip:usbip_common.c: check return value of sscanf

2014-03-06 Thread Joe Perches
On Thu, 2014-03-06 at 15:51 -0800, John de la Garza wrote: > Added code to check return value of sscanf. [] > diff --git a/drivers/staging/usbip/usbip_common.c > b/drivers/staging/usbip/usbip_common.c [] > @@ -55,7 +55,8 @@ static ssize_t usbip_debug_store(struct device *dev, >

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

2014-03-06 Thread Sarah Sharp
From: Hans de Goede This fixes TR dequeue validation failing on Intel XHCI controllers with the following warning: Mismatch between completed Set TR Deq Ptr command & xHCI internal state. Interestingly enough reading the deq ptr from the ep ctx after a TR Deq Ptr command does work on a Nec XHCI

[PATCH 03/76] xhci: fix usb3 streams

2014-03-06 Thread Sarah Sharp
From: Gerd Hoffmann xhci maintains a radix tree for each stream endpoint because it must be able to map a trb address to the stream ring. Each ring segment must be added to the ring for this to work. Currently xhci sticks only the first segment of each stream ring into the radix tree. Result i

[PATCH 15/76] usbfs: Kill urbs on interface before doing a set_interface

2014-03-06 Thread Sarah Sharp
From: Hans de Goede The usb_set_interface documentation says: * Also, drivers must not change altsettings while urbs are scheduled for * endpoints in that interface; all such urbs must first be completed * (perhaps forced by unlinking). For in kernel drivers we trust the drivers to get this

[PATCH 12/76] usb-core: Move USB_MAXENDPOINTS definitions to usb.h

2014-03-06 Thread Sarah Sharp
From: Hans de Goede So that it can be used in other places too. Signed-off-by: Hans de Goede Signed-off-by: Sarah Sharp --- 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/

[PATCH 20/76] uas: properly reinitialize in uas_eh_bus_reset_handler

2014-03-06 Thread Sarah Sharp
From: Gerd Hoffmann Signed-off-by: Gerd Hoffmann Signed-off-by: Hans de Goede Signed-off-by: Sarah Sharp --- drivers/usb/storage/uas.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/usb/storage/uas.c b/drivers/usb/storage/uas.c index d966b59f7d7b..fc08ee919439 100644 --- a/d

[PATCH 13/76] usb-core: Track if an endpoint has streams

2014-03-06 Thread Sarah Sharp
From: Hans de Goede This is a preparation patch for adding support for bulk streams to usbfs. Signed-off-by: Hans de Goede Signed-off-by: Sarah Sharp --- drivers/usb/core/hcd.c | 34 ++ include/linux/usb.h| 2 ++ 2 files changed, 28 insertions(+), 8 deleti

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

2014-03-06 Thread Sarah Sharp
From: 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:

[PATCH 23/76] uas: replace BUG_ON() + WARN_ON() with WARN_ON_ONCE()

2014-03-06 Thread Sarah Sharp
From: Gerd Hoffmann Signed-off-by: Gerd Hoffmann Signed-off-by: Hans de Goede Signed-off-by: Sarah Sharp --- drivers/usb/storage/uas.c | 19 ++- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/drivers/usb/storage/uas.c b/drivers/usb/storage/uas.c index f04903823

[PATCH 16/76] usbfs: proc_do_submiturb use a local variable for number_of_packets

2014-03-06 Thread Sarah Sharp
From: Hans de Goede This is a preparation patch for adding support for bulk streams. Signed-off-by: Hans de Goede Signed-off-by: Sarah Sharp --- drivers/usb/core/devio.c | 15 +++ 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/drivers/usb/core/devio.c b/drivers/usb/

[PATCH 01/76] usb/xhci: Change how we indicate a host supports Link PM.

2014-03-06 Thread Sarah Sharp
The xHCI driver currently uses a USB core internal field, udev->lpm_capable, to indicate the xHCI driver knows how to calculate the LPM timeout values. If this value is set for the host controller udev, it means Link PM can be enabled for child devices under that host. Change the code so the xHCI

[PATCH 17/76] usbfs: Add support for bulk stream ids

2014-03-06 Thread Sarah Sharp
From: Hans de Goede This patch makes it possible to specify a bulk stream id when submitting an urb using the async usbfs API. It overloads the number_of_packets usbdevfs_urb field for this. This is not pretty, but given other constraints it is the best we can do. The reasoning leading to this go

[PATCH 25/76] uas: Properly set interface to altsetting 0 on probe failure

2014-03-06 Thread Sarah Sharp
From: 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 Signed-off-by: Sarah Sharp --- drivers/usb/storage/uas.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) di

[PATCH 47/76] uas: Fix bounds check in uas_find_endpoints

2014-03-06 Thread Sarah Sharp
From: Hans de Goede The loop uses up to 3 bytes of the endpoint extra data. Signed-off-by: Hans de Goede Signed-off-by: Sarah Sharp --- drivers/usb/storage/uas.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/storage/uas.c b/drivers/usb/storage/uas.c index 1ac

[PATCH 69/76] uas: remove BROKEN

2014-03-06 Thread Sarah Sharp
From: Gerd Hoffmann xhci streams support is fixed, unblock usb attached scsi. Signed-off-by: Gerd Hoffmann Signed-off-by: Hans de Goede Signed-off-by: Sarah Sharp --- drivers/usb/storage/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/storage/Kconfig b

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

2014-03-06 Thread Sarah Sharp
From: Hans de Goede Signed-off-by: Hans de Goede Signed-off-by: Sarah Sharp --- 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 3ec1d8fe06fa..51c5109bbefc 100644 -

[PATCH 33/76] uas: Pack iu struct definitions

2014-03-06 Thread Sarah Sharp
From: Hans de Goede The iu struct definitions are usb packet definitions, so no alignment should happen. Notice that assuming 32 bit alignment this does not make any difference at all. Signed-off-by: Hans de Goede Signed-off-by: Sarah Sharp --- include/linux/usb/uas.h | 10 +- 1 file

[PATCH 24/76] uas: Urbs must be anchored before submitting them

2014-03-06 Thread Sarah Sharp
From: Hans de Goede Otherwise they may complete before they get anchored and thus never get unanchored (as the unanchoring is done by the usb core on completion). This commit also remove the usb_get_urb / usb_put_urb around cmd submission + anchoring, since if done in the proper order this is no

[PATCH 57/76] uas: Fix task-management not working when connected over USB-2

2014-03-06 Thread Sarah Sharp
From: Hans de Goede For USB-2 connections the stream-id must always be 0. Signed-off-by: Hans de Goede Signed-off-by: Sarah Sharp --- drivers/usb/storage/uas.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/usb/storage/uas.c b/drivers/usb/storage/uas.c index 019

[PATCH 34/76] uas: Use all available stream ids

2014-03-06 Thread Sarah Sharp
From: Hans de Goede If we get ie 16 streams we can use stream-id 1-16, not 1-15. Signed-off-by: Hans de Goede Signed-off-by: Sarah Sharp --- drivers/usb/storage/uas.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/usb/storage/uas.c b/drivers/usb/storage/uas.

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

2014-03-06 Thread Sarah Sharp
From: Hans de Goede This allows userspace to use bulk-streams, just like in kernel drivers, see Documentation/usb/bulk-streams.txt for details on the in kernel API. This is exported pretty much one on one to userspace. To use streams an app must first make a USBDEVFS_ALLOC_STREAMS ioctl, on succ

[PATCH 65/76] uas: Use the right error codes for different kinds of errors

2014-03-06 Thread Sarah Sharp
From: Hans de Goede Signed-off-by: Hans de Goede Signed-off-by: Sarah Sharp --- drivers/usb/storage/uas.c | 19 ++- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/drivers/usb/storage/uas.c b/drivers/usb/storage/uas.c index fceffccc1be1..6ec48c2daf45 100644 --- a

[PATCH 29/76] uas: Fix reset locking

2014-03-06 Thread Sarah Sharp
From: 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 Signed-off-by: Sarah Sharp --- drivers/usb/storage/uas.c | 9 +

[PATCH 73/76] xhci: Kill streams URBs when the host dies.

2014-03-06 Thread Sarah Sharp
If the host controller stops responding to commands, we need to kill all the URBs that were queued to all endpoints. The current code would only kill URBs that had been queued to the endpoint rings. ep->ring is set to NULL if streams has been enabled for the endpoint, which means URBs submitted w

[PATCH 51/76] uas: Not being able to alloc streams when connected through usb-3 is an error

2014-03-06 Thread Sarah Sharp
From: Hans de Goede Signed-off-by: Hans de Goede Signed-off-by: Sarah Sharp --- drivers/usb/storage/uas.c | 24 +--- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/drivers/usb/storage/uas.c b/drivers/usb/storage/uas.c index 754468bbbfdc..d758faef8664 100644

[PATCH 68/76] uas: Make sure sg elements are properly aligned

2014-03-06 Thread Sarah Sharp
From: Hans de Goede Copy the sg alignment trick from the usb-storage driver, without this I'm seeing intermittent errors when using uas devices with an ehci controller. Signed-off-by: Hans de Goede Signed-off-by: Sarah Sharp --- drivers/usb/storage/uas.c | 18 ++ 1 file change

[PATCH 32/76] uas: Fix response iu struct definition

2014-03-06 Thread Sarah Sharp
From: Hans de Goede The response iu struct before this patch has a size of 7 bytes (discounting padding), which is weird since all other iu-s are explictly padded to a multiple of 4 bytes. More over submitting a 7 byte bulk transfer to the status endpoint when expecting a response iu results in

[PATCH 45/76] uas: Honor no-uas quirk set in usb-storage's quirks module parameter

2014-03-06 Thread Sarah Sharp
From: Hans de Goede Falling back from uas to usb-storage requires coordination between uas and usb-storage, so use usb-storage's quirks module parameter, rather then requiring the user to pass a param to 2 different modules. Signed-off-by: Hans de Goede Signed-off-by: Sarah Sharp --- drivers/

[PATCH 58/76] uas: uas_alloc_data_urb: Remove unnecessary use_streams check

2014-03-06 Thread Sarah Sharp
From: Hans de Goede uas_alloc_data_urb always gets called with a stream_id value of 0 when not using streams. Removing the check makes it consistent with uas_alloc_sense_urb. Signed-off-by: Hans de Goede Signed-off-by: Sarah Sharp --- drivers/usb/storage/uas.c | 3 +-- 1 file changed, 1 inser

[PATCH 11/76] usb-core: Fix usb_free_streams return value documentation

2014-03-06 Thread Sarah Sharp
From: Hans de Goede Signed-off-by: Hans de Goede Signed-off-by: Sarah Sharp --- 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 2518c3250750..9b445f43f825 100644 --- a/drivers/usb/core/hcd.c +++

[PATCH 09/76] xhci: use usb_ss_max_streams in xhci_check_streams_endpoint

2014-03-06 Thread Sarah Sharp
From: 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 Signed-off-by: Sarah Sharp --- drivers/usb/host/xhci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) dif

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

2014-03-06 Thread Sarah Sharp
From: Hans de Goede I thought it would be a good idea to also test uas with usb-2, and it turns out it was, as it did not work. The problem is that the uas driver was passing the bEndpointAddress' direction bit to usb_rcvbulkpipe, the xhci code seems to not care about this, but with the ehci code

[PATCH 74/76] storage: accept some UAS devices if streams are unavailable

2014-03-06 Thread Sarah Sharp
From: Oliver Neukum On some older XHCIs streams are not supported and the UAS driver will fail at probe time. For those devices storage should try to bind to UAS devices. This patch adds a flag for stream support to HCDs and evaluates it. [Note: Sarah fixed a bug where the USB 2.0 root hub, not

[PATCH 36/76] uas: Move uas detect code to uas-detect.h

2014-03-06 Thread Sarah Sharp
From: Hans de Goede This is a preparation patch for teaching usb-storage to not bind to uas devices. Signed-off-by: Hans de Goede Signed-off-by: Sarah Sharp --- drivers/usb/storage/uas-detect.h | 40 drivers/usb/storage/uas.c| 40 ++

[PATCH 63/76] uas: Fix memory management

2014-03-06 Thread Sarah Sharp
From: Hans de Goede The scsi-host structure is refcounted, scsi_remove_host tears down the scsi-host but does not decrement the refcount, so we need to call scsi_put_host on disconnect to get the underlying memory to be freed. After calling scsi_remove_host, the scsi-core may still hold a refere

[PATCH 50/76] uas: Verify endpoint descriptors from uas_use_uas_driver()

2014-03-06 Thread Sarah Sharp
From: Hans de Goede Signed-off-by: Hans de Goede Signed-off-by: Sarah Sharp --- drivers/usb/storage/uas-detect.h | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/drivers/usb/storage/uas-detect.h b/drivers/usb/storage/uas-detect.h index 8de030a0a4a4..b8a02e12a8a2

[PATCH 18/76] usbfs: Add ep_to_host_endpoint helper function

2014-03-06 Thread Sarah Sharp
From: Hans de Goede Signed-off-by: Hans de Goede Signed-off-by: Sarah Sharp --- 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 d7571a63181d..502974b4deb5 100644 --- a/dri

[PATCH 75/76] xhci: Prevent runtime pm from autosuspending during initialization

2014-03-06 Thread Sarah Sharp
From: Mathias Nyman xHCI driver has its own pci probe function that will call usb_hcd_pci_probe to register its usb-2 bus, and then continue to manually register the usb-3 bus. usb_hcd_pci_probe does a pm_runtime_put_noidle at the end and might thus trigger a runtime suspend before the usb-3 bus

[PATCH 21/76] uas: make work list per-device

2014-03-06 Thread Sarah Sharp
From: Gerd Hoffmann Simplifies locking, we'll protect the list with the device spin lock. Also plugs races which can happen when two devices operate on the global list. While being at it rename the list head from "list" to "work", preparing for the addition of a second list. Signed-off-by: Gerd

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

2014-03-06 Thread Sarah Sharp
From: Hans de Goede And warn about this, as that would be a driver bug. Like wise drivers should ensure that streams are properly free-ed before a device is reset. So lets warn about that too. This already causes warnings in the form of: [ 96.982398] xhci_hcd :01:00.0: WARN Can't disable

[PATCH 56/76] uas: Reset device on reboot

2014-03-06 Thread Sarah Sharp
From: Hans de Goede Some BIOS-es will hang on reboot when an uas device is attached and left in uas mode on reboot. This commit adds a shutdown handler which on reboot puts the device back into usb-storage mode, fixing the hang on reboot on these systems. Signed-off-by: Hans de Goede Signed-of

[PATCH 53/76] uas: Don't allow more then one task to run at the same time

2014-03-06 Thread Sarah Sharp
From: Hans de Goede Since we use a fixed tag / stream for tasks we cannot allow more then one to run at the same time. This could happen before this time if a task timed out. Signed-off-by: Hans de Goede Signed-off-by: Sarah Sharp --- drivers/usb/storage/uas.c | 39 +++

[PATCH 72/76] xhci: Refactor command watchdog and fix split string.

2014-03-06 Thread Sarah Sharp
In preparation for fixing this function for streams endpoints, refactor code in the command watchdog timeout function into two new functions. One kills all URBs on a ring (either stream or endpoint), the other kills all URBs associated with an endpoint. Fix a split string while we're at it. Signe

[PATCH 64/76] uas: Clear cmdinfo on command queue-ing

2014-03-06 Thread Sarah Sharp
From: Hans de Goede The scsi error handling path re-uses previously queued up (and errored-out) cmds. If such a re-used cmd had a data-phase then cmdinfo will have data_in_urb / data_out_urb still set to the free-ed urbs from the errored-out cmd, and they will get free-ed a second time when the e

[PATCH 71/76] uas: Remove comment about registering a uas scsi controller for each usb bus

2014-03-06 Thread Sarah Sharp
From: Hans de Goede Although an interesting concept, I don't think that this is a good idea: -This will result in lots of "virtual" scsi controllers confusing users -If we get a scsi-bus-reset we will now need to do a usb-device-reset of all uas devices on the same usb bus, which is something t

[PATCH 37/76] xhci: xhci_mem_cleanup: make sure cmd_ring_reserved_trbs really is 0

2014-03-06 Thread Sarah Sharp
From: Hans de Goede cmd_ring_reserved_trbs gets decremented by xhci_free_stream_info(), so set it to 0 after freeing all rings, otherwise it wraps around to a very large value when rings with streams are free-ed. Before this patch the wrap-around could be triggered when xhci_resume calls xhci_me

[PATCH 40/76] usb: Clear host_endpoint->streams when implicitly freeing streams

2014-03-06 Thread Sarah Sharp
From: Hans de Goede If streams are still allocated on device-reset or set-interface then the hcd code implictly frees the streams. Clear host_endpoint->streams in this case so that if a driver later tries to re-allocate them it won't run afoul of the device already having streams check in usb_all

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

2014-03-06 Thread Sarah Sharp
From: 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 Signed-off-by: Sarah Sharp --- drivers/usb/storage/uas.c | 3

[PATCH 31/76] uas: s/response_ui/response_iu/

2014-03-06 Thread Sarah Sharp
From: Hans de Goede Signed-off-by: Hans de Goede Signed-off-by: Sarah Sharp --- drivers/usb/storage/uas.c | 2 +- include/linux/usb/uas.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/storage/uas.c b/drivers/usb/storage/uas.c index 0ee5a05c0a7b..33f9dcd68

[PATCH 61/76] uas: cmdinfo: use only one list head

2014-03-06 Thread Sarah Sharp
From: Hans de Goede cmds are either on the inflight list or on the dead list, never both, so we only need one list head. Signed-off-by: Hans de Goede Signed-off-by: Sarah Sharp --- drivers/usb/storage/uas.c | 20 1 file changed, 8 insertions(+), 12 deletions(-) diff --gi

[PATCH 39/76] xhci: Handle MaxPSASize == 0

2014-03-06 Thread Sarah Sharp
From: Hans de Goede Signed-off-by: Hans de Goede Signed-off-by: Sarah Sharp --- drivers/usb/host/xhci.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c index 6cb9c2235a0b..1db3c2794a49 100644 --- a/drivers/usb/host/xhci.c +++ b/driver

[PATCH 66/76] uas: Improve error reporting

2014-03-06 Thread Sarah Sharp
From: Hans de Goede Signed-off-by: Hans de Goede Signed-off-by: Sarah Sharp --- drivers/usb/storage/uas.c | 60 --- 1 file changed, 46 insertions(+), 14 deletions(-) diff --git a/drivers/usb/storage/uas.c b/drivers/usb/storage/uas.c index 6ec48c2daf

[PATCH 76/76] xhci: add the meaningful IRQ description if it is empty

2014-03-06 Thread Sarah Sharp
From: Adrian Huang When some xHCI host controllers fall back to use the legacy IRQ, the member irq_descr of the usb_hcd structure will be empty. This leads to the empty string of the xHCI host controller in /proc/interrupts. Here is the example (The irq 19 is the xHCI host controller):

[PATCH 62/76] uas: Fix command / task mgmt submission racing with disconnect

2014-03-06 Thread Sarah Sharp
From: Hans de Goede Signed-off-by: Hans de Goede Signed-off-by: Sarah Sharp --- drivers/usb/storage/uas.c | 15 ++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/drivers/usb/storage/uas.c b/drivers/usb/storage/uas.c index cfe0102fcbae..8c685801e267 100644 --- a/driv

[PATCH 70/76] uas: Add Hans de Goede as uas maintainer

2014-03-06 Thread Sarah Sharp
From: Hans de Goede At the kernel-summit Sarah Sharp asked me if I was willing to become the uas maintainer. I said yes, and here is a patch to make this official. Also remove Matthew Wilcox and Sarah Sharp as maintainers at their request. I've also added myself to the module's author tag, so t

[PATCH 46/76] uas: Add uas_find_endpoints() helper function

2014-03-06 Thread Sarah Sharp
From: Hans de Goede This is a preparation patch for adding better descriptor validation. Signed-off-by: Hans de Goede Signed-off-by: Sarah Sharp --- drivers/usb/storage/uas.c | 34 +++--- 1 file changed, 23 insertions(+), 11 deletions(-) diff --git a/drivers/usb/s

[PATCH 67/76] uas: Add some data in/out ready iu sanity checks

2014-03-06 Thread Sarah Sharp
From: Hans de Goede Signed-off-by: Hans de Goede Signed-off-by: Sarah Sharp --- drivers/usb/storage/uas.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/drivers/usb/storage/uas.c b/drivers/usb/storage/uas.c index f09205b162e4..62086829af14 100644 --- a/drivers/usb/storage/uas.

[PATCH 60/76] uas: add uas_mark_cmd_dead helper function

2014-03-06 Thread Sarah Sharp
From: Hans de Goede Signed-off-by: Hans de Goede Signed-off-by: Sarah Sharp --- drivers/usb/storage/uas.c | 35 ++- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/drivers/usb/storage/uas.c b/drivers/usb/storage/uas.c index 1a188399e090..7810c135

[PATCH 59/76] uas: Properly complete inflight commands on bus-reset or disconnect

2014-03-06 Thread Sarah Sharp
From: Hans de Goede Before this commit the uas driver would keep track of scsi commands which still need to have some urbs submitted to the device, and complete this with an ABORT result code on bus-reset or disconnect, but in flight scsi commands which have all their urbs submitted, and thus are

[PATCH 10/76] xhci: Remove segments from radix tree on failed insert.

2014-03-06 Thread Sarah Sharp
If we're expanding a stream ring, we want to make sure we can add those ring segments to the radix tree that maps segments to ring pointers. Try the radix tree insert after the new ring segments have been allocated (the last segment in the new ring chunk will point to the first newly allocated segm

[PATCH 55/76] uas: Add suspend/resume support

2014-03-06 Thread Sarah Sharp
From: Hans de Goede Signed-off-by: Hans de Goede Signed-off-by: Sarah Sharp --- drivers/usb/storage/uas.c | 42 ++ 1 file changed, 42 insertions(+) diff --git a/drivers/usb/storage/uas.c b/drivers/usb/storage/uas.c index 8023944f2501..7a16ed8e8aac 10064

[PATCH 48/76] uas: Move uas_find_endpoints to uas-detect.h

2014-03-06 Thread Sarah Sharp
From: Hans de Goede No changes, just the move. Signed-off-by: Hans de Goede Signed-off-by: Sarah Sharp --- drivers/usb/storage/uas-detect.h | 27 +++ drivers/usb/storage/uas.c| 27 --- 2 files changed, 27 insertions(+), 27 deletions(-)

[PATCH 42/76] uas: Add the posibilty to blacklist uas devices from using the uas driver

2014-03-06 Thread Sarah Sharp
From: Hans de Goede Once we start supporting uas hardware, and as more and more uas devices become available, we will likely start seeing broken devices. This patch prepares for the inevitable need for blacklisting those devices from using the uas driver (they will use usb-storage instead). Sign

[PATCH 49/76] uas: Drop fixed endpoint config handling

2014-03-06 Thread Sarah Sharp
From: Hans de Goede The fixed endpoint config code was only necessary to deal with an early uas prototype which has never been released, so lets drop it and enforce proper uas endpoint descriptors. Signed-off-by: Hans de Goede Signed-off-by: Sarah Sharp --- drivers/usb/storage/uas.c | 36

[PATCH 54/76] uas: Use GFP_NOIO rather then GFP_ATOMIC where possible

2014-03-06 Thread Sarah Sharp
From: Hans de Goede We can sleep in our own workqueue (which is the whole reason for having it), and scsi error handlers are also always called from a context which may sleep. Signed-off-by: Hans de Goede Signed-off-by: Sarah Sharp --- drivers/usb/storage/uas.c | 6 +++--- 1 file changed, 3 i

[PATCH 52/76] uas: task_mgmt: Kill the sense-urb if we fail to submit the cmd urb

2014-03-06 Thread Sarah Sharp
From: Hans de Goede Signed-off-by: Hans de Goede Signed-off-by: Sarah Sharp --- drivers/usb/storage/uas.c | 24 +--- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/drivers/usb/storage/uas.c b/drivers/usb/storage/uas.c index d758faef8664..9c6f9f9804fd 100644

[PATCH 27/76] uas: uas_alloc_cmd_urb: drop unused stream_id parameter

2014-03-06 Thread Sarah Sharp
From: Hans de Goede The cmd endpoint never has streams, so the stream_id parameter is unused. Signed-off-by: Hans de Goede Signed-off-by: Sarah Sharp --- drivers/usb/storage/uas.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/usb/storage/uas.c b/drivers/usb/

[PATCH 22/76] uas: add dead request list

2014-03-06 Thread Sarah Sharp
From: Gerd Hoffmann This patch adds a new list where all requests which are canceled are added to, so we don't loose them. Then, after killing all inflight urbs on bus reset (and disconnect) we'll walk over the list and clean them up. Without this we can end up with aborted requests lingering a

[PATCH 41/76] usb: Reset USB-3 devices on USB-3 link bounce

2014-03-06 Thread Sarah Sharp
From: Hans de Goede On disconnect USB3 protocol ports transit from U0 to SS.Inactive to Rx.Detect, on a recoverable error, the port stays in SS.Inactive and we recover from it by doing a warm-reset (through usb_device_reset if we have a udev for the port). If this really is a disconnect we may e

[PATCH 38/76] xhci: The trb_address_map radix tree expects 1KB segment memory aligment

2014-03-06 Thread Sarah Sharp
From: Hans de Goede If we align segment dma pool memory to 64 bytes, then a segment can be located at 0x1040 - 0x143f, and a segment from another ring at 0x1440 - 0x183f. The last trb in the first segment at 0x1430 will then translate to the same radix tree key as the first tr

[PATCH 44/76] usb-storage: Modify and export adjust_quirks so that it can be used by uas

2014-03-06 Thread Sarah Sharp
From: Hans de Goede Signed-off-by: Hans de Goede Signed-off-by: Sarah Sharp --- drivers/usb/storage/usb.c | 16 ++-- drivers/usb/storage/usb.h | 3 +++ 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/drivers/usb/storage/usb.c b/drivers/usb/storage/usb.c index 388f5

[PATCH 07/76] xhci: Set SCT field for Set TR dequeue on streams

2014-03-06 Thread Sarah Sharp
From: Hans de Goede Nec XHCI controllers don't seem to care, but without this Intel XHCI controllers reject Set TR dequeue commands with a COMP_TRB_ERR, leading to the following warning: WARN Set TR Deq Ptr cmd invalid because of stream ID configuration And very shortly after this the system co

[PATCH 26/76] uas: Avoid unnecessary unlock / lock calls around unlink_data_urbs

2014-03-06 Thread Sarah Sharp
From: Hans de Goede All callers of unlink_data_urbs drop devinfo->lock before calling it, and then immediately take it again after the call. And the first thing unlink_data_urbs does is take the lock again, and the last thing it does is drop it. This commit removes all the unnecessary lock droppi

[PATCH 43/76] usb-storage: Don't bind to uas devices if the uas driver is enabled

2014-03-06 Thread Sarah Sharp
From: Hans de Goede uas devices have 2 alternative settings on their usb-storage interface, one for usb-storage and one for uas. Using the uas driver is preferred, so if the uas driver is enabled, and the device has an uas alt setting, don't bind. Signed-off-by: Hans de Goede Signed-off-by: Sar

[PATCH 14/76] usb-core: Free bulk streams on interface release

2014-03-06 Thread Sarah Sharp
From: 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 Signed-

[PATCH 35/76] uas: Add a uas_find_uas_alt_setting helper function

2014-03-06 Thread Sarah Sharp
From: Hans de Goede This is a preparation patch for teaching usb-storage to not bind to uas devices. Signed-off-by: Hans de Goede Signed-off-by: Sarah Sharp --- drivers/usb/storage/uas.c | 21 - 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/drivers/usb/sto

[PATCH 02/76] xhci: make warnings greppable

2014-03-06 Thread Sarah Sharp
From: Oliver Neukum This changes debug messages and warnings in xhci-ring.c to be on a single line so grep can find them. grep must have precedence over the 80 column limit. [Sarah fixed two checkpatch.pl issues with split lines introduced by this commit.] Signed-off-by: Oliver Neukum Signed-o

  1   2   3   >