Re: [PATCH 26/37] xhci: use the trb_to_noop() helper for command trbs

2017-01-23 Thread Mathias Nyman
On 20.01.2017 20:18, Felipe Balbi wrote: Mathias Nyman writes: Remove duplicate code by using trb_to_noop() when handling Aborted commads Signed-off-by: Mathias Nyman isn't this just [1] https://marc.info/?i=20161229110109.26372-25-felipe.ba...@linux.intel.com A simplified versio

Re: [RESEND PATCH] usb: chipidea: delete an useless header include

2017-01-23 Thread Peter Chen
On Mon, Jan 23, 2017 at 03:05:45PM +0800, Jisheng Zhang wrote: > is for net phy drivers, we don't need it. > > Signed-off-by: Jisheng Zhang > --- > drivers/usb/chipidea/core.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/drivers/usb/chipidea/core.c b/drivers/usb/chipidea/core.c > in

Re: [RESEND PATCH] usb: chipidea: usb2: delete the redundant setting default DMA mask code

2017-01-23 Thread Peter Chen
On Mon, Jan 23, 2017 at 03:09:23PM +0800, Jisheng Zhang wrote: > Similar as commit 2b2fe36def08 ("usb: chipidea: imx: delete the > redundant setting default DMA mask code"), the ci_hdrc_usb2 platform > device is also created by device tree, the default DMA mask should be > already set by of_dma_con

Re: [PATCH 26/37] xhci: use the trb_to_noop() helper for command trbs

2017-01-23 Thread Mathias Nyman
On 23.01.2017 10:12, Mathias Nyman wrote: On 20.01.2017 20:18, Felipe Balbi wrote: Mathias Nyman writes: Remove duplicate code by using trb_to_noop() when handling Aborted commads Signed-off-by: Mathias Nyman isn't this just [1] https://marc.info/?i=20161229110109.26372-25-felipe.b

Re: [PATCH 26/37] xhci: use the trb_to_noop() helper for command trbs

2017-01-23 Thread Felipe Balbi
Hi, Mathias Nyman writes: > On 20.01.2017 20:18, Felipe Balbi wrote: >> >> Mathias Nyman writes: >> >>> Remove duplicate code by using trb_to_noop() when >>> handling Aborted commads >>> >>> Signed-off-by: Mathias Nyman >> >> isn't this just [1] >> >> https://marc.info/?i=20161229110109.2

Re: [PATCH 26/37] xhci: use the trb_to_noop() helper for command trbs

2017-01-23 Thread Felipe Balbi
Hi, Mathias Nyman writes: > On 23.01.2017 10:12, Mathias Nyman wrote: >> On 20.01.2017 20:18, Felipe Balbi wrote: >>> >>> Mathias Nyman writes: >>> Remove duplicate code by using trb_to_noop() when handling Aborted commads Signed-off-by: Mathias Nyman >>> >>> isn't this jus

Re: [PATCH 26/37] xhci: use the trb_to_noop() helper for command trbs

2017-01-23 Thread Mathias Nyman
On 23.01.2017 11:21, Felipe Balbi wrote: Hi, Mathias Nyman writes: On 20.01.2017 20:18, Felipe Balbi wrote: Mathias Nyman writes: Remove duplicate code by using trb_to_noop() when handling Aborted commads Signed-off-by: Mathias Nyman isn't this just [1] https://marc.info/?i=201

Re: [PATCH v3 3/3] usb: musb: dsps: Manage CPPI 4.1 DMA interrupt in dsps

2017-01-23 Thread Alexandre Bailon
On 01/20/2017 09:17 PM, Bin Liu wrote: > On Thu, Jan 19, 2017 at 11:06:59AM +0100, Alexandre Bailon wrote: >> Despite the CPPI 4.1 is a generic DMA, it is tied to USB. >> On the dsps, CPPI 4.1 interrupt's registers are in USBSS (the MUSB glue). >> Currently, to enable / disable and clear interrupts

[RFC] usb: gadget: uvc: webcam gadget USB PID is using value from a different gadget

2017-01-23 Thread Petr Cvek
Hello, It seems the USB product ID for g_webcam usb device gadget is incorrectly used from EEM gadget "Ethernet Emulation Model". So "webcam" device has a confusing description in lsusb: 1d6b:0102 Linux Foundation EEM Gadget I would change it to 0x0106, which is a next unassigned value

Re: [RFC] usb: gadget: uvc: webcam gadget USB PID is using value from a different gadget

2017-01-23 Thread Felipe Balbi
Hi, Petr Cvek writes: > It seems the USB product ID for g_webcam usb device gadget is > incorrectly used from EEM gadget "Ethernet Emulation Model". So > "webcam" device has a confusing description in lsusb: > > 1d6b:0102 Linux Foundation EEM Gadget > > I would change it to 0x0106, which i

Re: [RFC] usb: gadget: uvc: webcam gadget USB PID is using value from a different gadget

2017-01-23 Thread Greg Kroah-Hartman
On Mon, Jan 23, 2017 at 12:59:33PM +0200, Felipe Balbi wrote: > > Hi, > > Petr Cvek writes: > > It seems the USB product ID for g_webcam usb device gadget is > > incorrectly used from EEM gadget "Ethernet Emulation Model". So > > "webcam" device has a confusing description in lsusb: > > > >

[PATCH 2/8] usb: dwc3-omap: Fix missing break in dwc3_omap_set_mailbox()

2017-01-23 Thread Roger Quadros
We need to break from all cases if we want to treat each one of them separately. Fixes: d2728fb3e01f ("usb: dwc3: omap: Pass VBUS and ID events transparently") Signed-off-by: Roger Quadros --- drivers/usb/dwc3/dwc3-omap.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/dwc3/dwc3-

[PATCH 6/8] ARM: dts: dra7x-evm: Enable dual-role mode for USB1

2017-01-23 Thread Roger Quadros
USB1 port is micro-AB type and can function as peripheral as well as host. Enable dual-role mode for USB1. Signed-off-by: Roger Quadros --- arch/arm/boot/dts/dra7-evm.dts | 2 +- arch/arm/boot/dts/dra72-evm-common.dtsi | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git

[PATCH 5/8] usb: dwc3: add dual-role support

2017-01-23 Thread Roger Quadros
If dr_mode is "otg" then support dual role mode of operation. Get ID and VBUS information from the OTG controller and put the controller in the appropriate state. This is our dual-role state table. ID VBUSdual-role state -- --- 0 x A_HOST - Host cont

[PATCH 3/8] usb: dwc3: use BIT() macro where possible

2017-01-23 Thread Roger Quadros
To avoid checkpatch warnings with new patches let's start using the BIT() macro wherever possible. Signed-off-by: Roger Quadros --- drivers/usb/dwc3/core.h | 192 +-- drivers/usb/dwc3/dwc3-omap.c | 48 +-- drivers/usb/dwc3/gadget.h| 20 +

[PATCH 0/8] usb: dwc3: add dual-role support

2017-01-23 Thread Roger Quadros
Hi, We rely on the OTG controller block to provide us with VBUS and ID line status via an interrupt. This is then used to switch the controller between host, peripheral and idle roles based on the following table. ID VBUSdual-role state -- --- 0 x A_

Re: [RFC] usb: gadget: uvc: webcam gadget USB PID is using value from a different gadget

2017-01-23 Thread Greg Kroah-Hartman
On Mon, Jan 23, 2017 at 12:20:03PM +0100, Greg Kroah-Hartman wrote: > On Mon, Jan 23, 2017 at 12:59:33PM +0200, Felipe Balbi wrote: > > > > Hi, > > > > Petr Cvek writes: > > > It seems the USB product ID for g_webcam usb device gadget is > > > incorrectly used from EEM gadget "Ethernet Emulation

[PATCH 1/8] usb: otg-fsm: Prevent build warning "VDBG" redefined

2017-01-23 Thread Roger Quadros
If usb/otg-fsm.h and usb/composite.h are included together then it results in the build warning [1]. Prevent that by defining VDBG locally. Also get rid of MPC_LOC which doesn't seem to be used by anyone. [1] - warning fixed by this patch: In file included from drivers/usb/dwc3/core.h:33, fr

[PATCH 7/8] ARM: dts: am43xx: Enable dual-role mode for USB1

2017-01-23 Thread Roger Quadros
USB1 port is micro-AB type and can function as peripheral as well as host. Enable dual-role mode for USB1. Signed-off-by: Roger Quadros --- arch/arm/boot/dts/am437x-gp-evm.dts | 2 +- arch/arm/boot/dts/am437x-sk-evm.dts | 2 +- arch/arm/boot/dts/am43x-epos-evm.dts | 2 +- 3 files changed, 3 in

[PATCH 4/8] usb: dwc3: core.h: add some register definitions

2017-01-23 Thread Roger Quadros
Add OTG and GHWPARAMS6 register definitions Signed-off-by: Roger Quadros --- drivers/usb/dwc3/core.h | 82 + 1 file changed, 82 insertions(+) diff --git a/drivers/usb/dwc3/core.h b/drivers/usb/dwc3/core.h index d514dca..fc82d2e 100644 --- a/driver

[PATCH 8/8] ARM: dts: am57xx-idk: Enable dual-role mode for USB2

2017-01-23 Thread Roger Quadros
USB port is micro-AB type and can function as peripheral as well as host. Enable dual-role mode for USB2. Signed-off-by: Roger Quadros --- arch/arm/boot/dts/am57xx-idk-common.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/am57xx-idk-common.dtsi b/arch

Re: [RFC] usb: gadget: uvc: webcam gadget USB PID is using value from a different gadget

2017-01-23 Thread Greg KH
On Mon, Jan 23, 2017 at 11:30:01AM +0100, Petr Cvek wrote: > Hello, > > It seems the USB product ID for g_webcam usb device gadget is incorrectly > used from EEM gadget "Ethernet Emulation Model". So "webcam" device has a > confusing description in lsusb: > > 1d6b:0102 Linux Foundation EE

Re: [RFC] usb: gadget: uvc: webcam gadget USB PID is using value from a different gadget

2017-01-23 Thread Felipe Balbi
Hi, Greg KH writes: > On Mon, Jan 23, 2017 at 11:30:01AM +0100, Petr Cvek wrote: >> Hello, >> >> It seems the USB product ID for g_webcam usb device gadget is incorrectly >> used from EEM gadget "Ethernet Emulation Model". So "webcam" device has a >> confusing description in lsusb: >> >>

Re: [RFC] usb: gadget: uvc: webcam gadget USB PID is using value from a different gadget

2017-01-23 Thread Greg KH
On Mon, Jan 23, 2017 at 01:27:59PM +0200, Felipe Balbi wrote: > > Hi, > > Greg KH writes: > > On Mon, Jan 23, 2017 at 11:30:01AM +0100, Petr Cvek wrote: > >> Hello, > >> > >> It seems the USB product ID for g_webcam usb device gadget is incorrectly > >> used from EEM gadget "Ethernet Emulation

Re: [PATCH 4/4] usb: gadget: f_hid: fix: Move IN request allocation to set_alt()

2017-01-23 Thread Felipe Balbi
Krzysztof Opasiak writes: > Since commit ba1582f22231 ("usb: gadget: f_hid: use alloc_ep_req()") > we cannot allocate any requests in bind() as we check if we should > align request buffer based on endpoint descriptor which is assigned > in set_alt(). > > Allocating request in bind() function cau

Re: [PATCH 0/8] usb: dwc3: add dual-role support

2017-01-23 Thread Chanwoo Choi
Hi Roger, On 2017년 01월 23일 20:19, Roger Quadros wrote: > - Some SoC's (e.g. Qualcomm MSM) do not have the OTG controller block > but do have both host and peripheral controllers and so can operate > in dual role mode. Current series does not address this case. > We can get dual-role to work with s

Re: [PATCH v2 10/28] usb: dwc2: Remove unused otg_ver parameter

2017-01-23 Thread Felipe Balbi
John Youn writes: > The otg_ver parameter only controls the SRP pulsing method and defaults > to the 1.3 behavior. It is unused and can be removed. > > Signed-off-by: John Youn this patch fails to apply: checking file drivers/usb/dwc2/core.c checking file drivers/usb/dwc2/core.h Hunk #2 succee

Re: [PATCH 2/2] usb: gadget: uac2: add req_number as parameter

2017-01-23 Thread Felipe Balbi
Hi, Peter Chen writes: > On Tue, Jan 17, 2017 at 05:57:50PM +0800, Peter Chen wrote: >> On Tue, Jan 17, 2017 at 11:23:55AM +0200, Felipe Balbi wrote: >> > >> > Hi, >> > >> > Peter Chen writes: >> > > On Mon, Jan 16, 2017 at 12:40:06PM +0200, Felipe Balbi wrote: >> > >> >> > >> Hi, >> > >> >

Re: [BISSECTED]: BUG: usb: dwc3: usb ports not working anymore on odroid-XU4

2017-01-23 Thread Felipe Balbi
Hi, Richard Genoud writes: > On 19/01/2017 09:03, Felipe Balbi wrote: >> >> Hi, >> >> Richard Genoud writes: >>> Hi, >>> Since commit c499ff71ff2a2 ("usb: dwc3: core: re-factor init and exit >>> paths") >>> (merged in 4.8), the usb ports on odroid-XU4 don't work anymore. >>> >>> [ Actually,

Re: [RFC] usb: gadget: uvc: webcam gadget USB PID is using value from a different gadget

2017-01-23 Thread Petr Cvek
Dne 23.1.2017 v 12:32 Greg KH napsal(a): I know it is only a cosmetic change on a legacy driver, but I assume it would be better to have some default value for configfs API than to borrow a PID from a whole different gadget. >>> >>> For class devices, they really don't need a new id,

Re: [PATCH 2/4] usb: dwc2: host: Correct snpsid checking for GDFIFOCFG

2017-01-23 Thread Felipe Balbi
John Youn writes: > From: Sevak Arakelyan > > GDFIFOCFG is available from IP version 2.91a. Fix the code to reflect > this. > > Signed-off-by: Sevak Arakelyan > Signed-off-by: John Youn doesn't apply :-( please rebase -- balbi signature.asc Description: PGP signature

Re: [BISSECTED]: BUG: usb: dwc3: usb ports not working anymore on odroid-XU4

2017-01-23 Thread Richard Genoud
2017-01-23 12:45 GMT+01:00 Felipe Balbi : > > Hi, > > Richard Genoud writes: >> On 19/01/2017 09:03, Felipe Balbi wrote: >>> >>> Hi, >>> >>> Richard Genoud writes: Hi, Since commit c499ff71ff2a2 ("usb: dwc3: core: re-factor init and exit paths") (merged in 4.8), the usb ports

Re: [PATCH] usb: dwc2: fix "iomem 0x00000000" message by setting iomem parameters in usb_hcd

2017-01-23 Thread Felipe Balbi
Hi, John Youn writes: > @@ -1229,7 +1229,8 @@ static inline void dwc2_hcd_connect(struct > dwc2_hsotg *hsotg) {} > static inline void dwc2_hcd_disconnect(struct dwc2_hsotg *hsotg, bool > force) {} > static inline void dwc2_hcd_start(struct dwc2_hsotg *hsotg) {} > sta

Re: usb: gadget: Kernel panic (NULL pointer dereference) when using fsl_udc2_core on i.MX31 PDK

2017-01-23 Thread Felipe Balbi
Hi, Magnus Lilja writes: > Hi > > I tried the fsl_udc_core gadget driver on the i.MX31 PDK board and got a > kernel panic (NULL pointer dereference) when connecting the USB cable. I > had the g_serial module loaded as well. > > The NULL pointer panic comes from gadget/udc/core.c > usb_gadget_

Re: [PATCH] usb: dwc3: ep0: Fix the possible missed request for handling delay STATUS phase

2017-01-23 Thread Felipe Balbi
Hi, Alan Stern writes: > On Mon, 16 Jan 2017, Felipe Balbi wrote: > >> > The gadget driver never calls usb_ep_queue in order to receive the next >> > SETUP packet; the UDC driver takes care of SETUP handling >> > automatically. >> >> yeah, that's another thing I'd like to change. Currently, we

Re: functionfs on dwc3, xhci host: endpoint cannot be used in both directions ?

2017-01-23 Thread Felipe Balbi
Hi, Vincent Pelletier writes: > On Mon, 16 Jan 2017 14:48:31 +, Vincent Pelletier > wrote: >> 3) I declared 4 endpoints (2 IN, 2 OUT). And I went one level deeper >>down the rabbit hole: now enumeration fails with this message on >>host: > > Aaand... I dug this part of the hole myse

Re: [PATCH v2] usb: dwc3: handle DWC_USB3_NUM == DWC_USB3_NUM_IN_EPS

2017-01-23 Thread Felipe Balbi
Hi, Bryan O'Donoghue writes: > - DWC_USB3_NUM indicates the number of Device mode single directional > endpoints, including OUT and IN endpoint 0. > > - DWC_USB3_NUM_IN_EPS indicates the maximum number of Device mode IN > endpoints active at any time, including control endpoint 0. > > It's p

Re: [PATCH 36/37] xhci: simplify how we store TDs in urb private data

2017-01-23 Thread Mathias Nyman
On 23.01.2017 13:57, David Laight wrote: From: Mathias Nyman Sent: 20 January 2017 14:47 Instead of storing a zero length array of td pointers, and then allocate memory both for the td pointer array and the td's, just use a zero length array of actual td's in urb private data. This reminds

[PATCH v2 02/37] xhci: rename EP_HALT_PENDING to EP_STOP_CMD_PENDING

2017-01-23 Thread Mathias Nyman
We don't want to confuse halted and stalled endpoint states with a flag indicating we are waiting for a stop endpoint command to finish or timeout Signed-off-by: Mathias Nyman --- drivers/usb/host/xhci-ring.c | 6 +++--- drivers/usb/host/xhci.c | 6 +++--- drivers/usb/host/xhci.h | 2 +

[PATCH v2 05/37] usb: xhci: remove unnecessary second abort try

2017-01-23 Thread Mathias Nyman
From: Lu Baolu The second try was a workaround for (what we thought was) command ring failing to stop in the first place. But this turns out to be due to the race that we have fixed(see "xhci: Fix race related to abort operation"). With that fix, it is time to remove the second try. Signed-off-b

[PATCH v2 01/37] xhci: simplify if statement to make it more readable

2017-01-23 Thread Mathias Nyman
No functional change, De Morgan !(A && B) = (!A || !B) Signed-off-by: Mathias Nyman --- drivers/usb/host/xhci-ring.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c index e32029a..46df89e 100644 --- a/drivers/usb/h

[PATCH v2 00/37] xhci features for usb-next 4.11

2017-01-23 Thread Mathias Nyman
Hi Greg version 2. A lot of xhci cleanups, refactoring and changes for 4.11 Including major tracing rework by Felipe Changes since v1: Removed extra empty lines in patch 25/37 Added "based on" entry to patch 25/37 and 26/37 commit messages fixed typo in patch 32/37 commit message -Mathias

[PATCH v2 04/37] xhci: remove unnecessary check for pending timer

2017-01-23 Thread Mathias Nyman
Checking if the command timeout timer is pending when queueing the first command to the command ring is not really useful, remove it. Suggested-by: Lu Baolu Signed-off-by: Mathias Nyman --- drivers/usb/host/xhci-ring.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/driver

[PATCH v2 03/37] xhci: detect stop endpoint race using pending timer instead of counter.

2017-01-23 Thread Mathias Nyman
A counter was used to find out if the stop endpoint completion raced with the stop endpoint timeout timer. This was needed in case the stop ep completion failed to delete the timer as it was running on anoter cpu. The EP_STOP_CMD_PENDING flag was not enough as a new stop endpoint command may be qu

[PATCH v2 07/37] xhci: Put warning message on a single line

2017-01-23 Thread Mathias Nyman
From: Alexander Stein This allows someone to grep for the complete warning message as in; xhci-hcd xhci-hcd.0.auto: USB core suspending device not in U0/U1/U2. Signed-off-by: Alexander Stein Signed-off-by: Mathias Nyman --- drivers/usb/host/xhci-hub.c | 3 +-- 1 file changed, 1 insertion(+),

[PATCH v2 11/37] usb: xhci: avoid unnecessary calculation

2017-01-23 Thread Mathias Nyman
From: Lu Baolu No need to calculate remainder and length_field, if there is no data phase of a control transfer. Signed-off-by: Lu Baolu Signed-off-by: Mathias Nyman --- drivers/usb/host/xhci-ring.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/dri

[PATCH v2 12/37] usb: xhci: use list_is_singular for cmd_list

2017-01-23 Thread Mathias Nyman
From: Lu Baolu Use list_is_singular() to check if cmd_list has only one entry. [use list_empty() in queue command instead -Mathias] Signed-off-by: Lu Baolu Signed-off-by: Mathias Nyman --- drivers/usb/host/xhci-ring.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/

[PATCH v2 06/37] usb: host: xhci: Remove unused 'addr_64' variable in xhci_hcd structure

2017-01-23 Thread Mathias Nyman
From: Baolin Wang Since the 'addr_64' variable as legacy is unused now, then remove it from xhci_hcd structure. Signed-off-by: Baolin Wang Signed-off-by: Mathias Nyman --- drivers/usb/host/xhci.h | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhc

[PATCH v2 08/37] usb: xhci: add quirk flag for broken PED bits

2017-01-23 Thread Mathias Nyman
From: Felipe Balbi Some devices from Texas Instruments [1] suffer from a silicon bug where Port Enabled/Disabled bit should not be used to silence an erroneous device. The bug is so that if port is disabled with PED bit, an IRQ for device removal (or attachment) will never fire. Just for the sa

[PATCH v2 15/37] usb: host: xhci: print HCIVERSION on debug

2017-01-23 Thread Mathias Nyman
From: Felipe Balbi When calling xhci_dbg_regs() we actually _do_ want to know XHCI's version. This might help figure out why certain problems only happen in some cases. Signed-off-by: Felipe Balbi Signed-off-by: Mathias Nyman --- drivers/usb/host/xhci-dbg.c | 2 -- 1 file changed, 2 deletions

[PATCH v2 13/37] usb: xhci: remove unnecessary return in xhci_pci_setup()

2017-01-23 Thread Mathias Nyman
From: Lu Baolu Remove the unnecessary return line in xhci_pci_setup(). Signed-off-by: Lu Baolu Signed-off-by: Mathias Nyman --- drivers/usb/host/xhci-pci.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c index

[PATCH v2 16/37] usb: host: xhci: rename completion codes to match spec

2017-01-23 Thread Mathias Nyman
From: Felipe Balbi Cleanup only. This patch is a mechaninal rename to make sure our macros for TRB completion codes match what the specification uses to refer to such errors. The idea behind this is that it makes it far easier to grep the specification and match it with implementation. Signed-of

[PATCH v2 25/37] xhci: Introduce helper to turn one TRB into a no-op

2017-01-23 Thread Mathias Nyman
Useful for turning both transfer and command trbs into no-ops. Based on earlier code by Felipe Balbi Signed-off-by: Mathias Nyman --- drivers/usb/host/xhci-ring.c | 29 + 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/drivers/usb/host/xhci-ring.c b/

[PATCH v2 18/37] usb: host: xhci: remove unneded semicolon

2017-01-23 Thread Mathias Nyman
From: Felipe Balbi it does no good, let's remove it. Signed-off-by: Felipe Balbi Signed-off-by: Mathias Nyman --- drivers/usb/host/xhci-ext-caps.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/host/xhci-ext-caps.h b/drivers/usb/host/xhci-ext-caps.h index e024

[PATCH v2 37/37] xhci: refactor xhci_urb_enqueue

2017-01-23 Thread Mathias Nyman
Use switch instead of several if statements Signed-off-by: Mathias Nyman --- drivers/usb/host/xhci.c | 93 - 1 file changed, 37 insertions(+), 56 deletions(-) diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c index dde5c2d..6d6c460 10

[PATCH v2 30/37] usb: host: xhci: add urb_enqueue/dequeue/giveback tracers

2017-01-23 Thread Mathias Nyman
From: Felipe Balbi These three new tracers will help us tie TRBs into URBs by *also* looking into URB lifetime. Signed-off-by: Felipe Balbi Signed-off-by: Mathias Nyman --- drivers/usb/host/xhci-ring.c | 1 + drivers/usb/host/xhci-trace.h | 70 +++ dr

[PATCH v2 09/37] usb: host: xhci-plat: enable BROKEN_PED quirk if platform requested

2017-01-23 Thread Mathias Nyman
From: Felipe Balbi In case 'quirk-broken-port-ped' property is passed in via device property, we should enable the corresponding BROKEN_PED quirk flag for XHCI core. [rog...@ti.com] Updated code from platform data to device property and added DT binding. Signed-off-by: Felipe Balbi Signed-off-

[PATCH v2 10/37] usb: xhci: remove unnecessary assignment

2017-01-23 Thread Mathias Nyman
From: Lu Baolu Drop an unnecessary assignment in prepare_transfer(). Signed-off-by: Lu Baolu Signed-off-by: Mathias Nyman --- drivers/usb/host/xhci-ring.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c index bcc0894..61b5fea 10

[PATCH v2 14/37] usb: host: xhci: change pre-increments to post-increments

2017-01-23 Thread Mathias Nyman
From: Felipe Balbi This is a cleanup patch only, no functional changes. The idea is just to make sure for loops look the same all over the driver. Signed-off-by: Felipe Balbi Signed-off-by: Mathias Nyman --- drivers/usb/host/xhci-dbg.c | 20 ++-- drivers/usb/host/xhci-mem.c |

[PATCH v2 17/37] usb: host: xhci: simplify irq handler return

2017-01-23 Thread Mathias Nyman
From: Felipe Balbi Instead of having several return points, let's use a local variable and a single place to return. This makes the code slightly easier to read. [set ret = IRQ_HANDLED in default working case -Mathias] Signed-off-by: Felipe Balbi Signed-off-by: Mathias Nyman --- drivers/usb/

[PATCH v2 24/37] usb: host: xhci: unconditionally call xhci_unmap_td_bounce_buffer()

2017-01-23 Thread Mathias Nyman
From: Felipe Balbi xhci_unmap_td_bounce_buffer() already checks for a valid td->bounce_seg and bails out early if that's invalid. There's no need to check for this twice. Signed-off-by: Felipe Balbi Signed-off-by: Mathias Nyman --- drivers/usb/host/xhci-ring.c | 9 +++-- 1 file changed, 3

[PATCH v2 20/37] usb: host: xhci: reorder variable definitions

2017-01-23 Thread Mathias Nyman
From: Felipe Balbi no functional changes. Simple cleanup to make sure variables are ordered in a 'reverse christmas tree' fashion. While at that, also remove an obsolete comment which doesn't apply anymore. Signed-off-by: Felipe Balbi Signed-off-by: Mathias Nyman --- drivers/usb/host/xhci-rin

[PATCH v2 28/37] usb: host: xhci: combine event TRB completion debugging messages

2017-01-23 Thread Mathias Nyman
From: Felipe Balbi If we just provide a helper to convert completion code to string, we can combine all debugging messages into a single print. [keep the old debug messages, for warn and grep -Mathias] Signed-off-by: Felipe Balbi Signed-off-by: Mathias Nyman --- drivers/usb/host/xhci.h | 80 +

[PATCH v2 32/37] usb: host: xhci: remove newline from tracer

2017-01-23 Thread Mathias Nyman
From: Felipe Balbi If we add that newline, the output will look like the following: kworker/2:1-42[002] 169.811435: xhci_address_ctx: ctx_64=0, ctx_type=2, ctx_dma=@153fbd000, ctx_va=@880153fbd000 We would rather have that in a single line. Signed-off-by: Felipe Balbi Sign

[PATCH v2 29/37] usb: host: xhci: make a generic TRB tracer

2017-01-23 Thread Mathias Nyman
From: Felipe Balbi instead of having a tracer that can only trace command completions, let's promote this tracer so it can trace and decode any TRB. With that, it will be easier to extrapolate the lifetime of any TRB which might help debugging certain issues. Signed-off-by: Felipe Balbi Signed

[PATCH v2 19/37] usb: host: xhci: use slightly better list helpers

2017-01-23 Thread Mathias Nyman
From: Felipe Balbi Replace list_entry() with list_first_entry() and list_for_each() with list_for_each_entry(). This makes the code slightly more readable. Signed-off-by: Felipe Balbi Signed-off-by: Mathias Nyman --- drivers/usb/host/xhci-ring.c | 19 ++- 1 file changed, 10 in

[PATCH v2 26/37] xhci: use the trb_to_noop() helper for command trbs

2017-01-23 Thread Mathias Nyman
Remove duplicate code by using trb_to_noop() when handling Aborted commads Based on earlier code by Felipe Balbi Signed-off-by: Mathias Nyman --- drivers/usb/host/xhci-ring.c | 12 ++-- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/drivers/usb/host/xhci-ring.c b/driver

[PATCH v2 23/37] usb: host: xhci: check for a valid ring when unmapping bounce buffer

2017-01-23 Thread Mathias Nyman
From: Felipe Balbi This way we can remove checks for valid ring from call sites of xhci_unmap_td_bounce_buffer() Signed-off-by: Felipe Balbi Signed-off-by: Mathias Nyman --- drivers/usb/host/xhci-ring.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/host/xhci-

[PATCH v2 22/37] usb: host: xhci: remove bogus __releases()/__acquires() annotation

2017-01-23 Thread Mathias Nyman
From: Felipe Balbi handle_tx_event() is not releasing xhci->lock nor reacquiring it, remove the bogus annotation. Signed-off-by: Felipe Balbi Signed-off-by: Mathias Nyman --- drivers/usb/host/xhci-ring.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/usb/host/xhci-ring.c b/drive

[PATCH v2 33/37] usb: host: xhci: add xhci_virt_device tracer

2017-01-23 Thread Mathias Nyman
From: Felipe Balbi Let's start tracing at least part of an xhci_virt_device lifetime. We might want to extend this tracepoint class later, but for now it already exposes quite a bit of valuable information. Signed-off-by: Felipe Balbi Signed-off-by: Mathias Nyman --- drivers/usb/host/xhci-hub

[PATCH v2 21/37] usb: host: xhci: introduce xhci_td_cleanup()

2017-01-23 Thread Mathias Nyman
From: Felipe Balbi By extracting xhci_td_cleanup() from finish_td(), code before clearer and easier to follow. There are no functional changes with this patch. It's merely a cleanup. Signed-off-by: Felipe Balbi Signed-off-by: Mathias Nyman --- drivers/usb/host/xhci-ring.c | 92 ++

[PATCH v2 36/37] xhci: simplify how we store TDs in urb private data

2017-01-23 Thread Mathias Nyman
Instead of storing a zero length array of td pointers, and then allocate memory both for the td pointer array and the td's, just use a zero length array of actual td's in urb private data. old: struct urb_priv { struct xhci_td *td[0] } new: struct urb_priv { struct xhci_td td[0]

[PATCH v2 35/37] xhci: Rename variables related to transfer descritpors

2017-01-23 Thread Mathias Nyman
urb_priv structure has a count on how many TDs the URB contains, and how many of those TD's we have handled. rename: length -> num_tds td_cnt -> num_tds_done No functional changes Signed-off-by: Mathias Nyman --- drivers/usb/host/xhci-ring.c | 10 +- drivers/usb/host/xhci.c | 14 +

RE: [PATCH 36/37] xhci: simplify how we store TDs in urb private data

2017-01-23 Thread David Laight
From: Mathias Nyman > Sent: 20 January 2017 14:47 > Instead of storing a zero length array of td pointers, and then > allocate memory both for the td pointer array and the td's, just > use a zero length array of actual td's in urb private data. This reminds me of an old patch that got reverted be

[PATCH v2 31/37] usb: host: xhci: convert several if() to a single switch statement

2017-01-23 Thread Mathias Nyman
From: Felipe Balbi when getting endpoint type, a switch statement looks better than a series of if () branches. There are no functional changes with this patch, cleanup only. Signed-off-by: Felipe Balbi Signed-off-by: Mathias Nyman --- drivers/usb/host/xhci-mem.c | 10 ++ 1 file chang

[PATCH v2 34/37] xhci: rename size variable to num_tds

2017-01-23 Thread Mathias Nyman
No functinal changes. num_tds describes the number of transfer descriptor better than "size" Signed-off-by: Mathias Nyman --- drivers/usb/host/xhci.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c index 4968e

[PATCH v2 27/37] usb: host: xhci: convert to list_for_each_entry_safe()

2017-01-23 Thread Mathias Nyman
From: Felipe Balbi instead of using while(!list_empty()) followed by list_first_entry(), we can actually use list_for_each_entry_safe(). Signed-off-by: Felipe Balbi Signed-off-by: Mathias Nyman --- drivers/usb/host/xhci-ring.c | 15 --- 1 file changed, 8 insertions(+), 7 deletions

RE: [PATCH 32/37] usb: host: xhci: remove newline from tracer

2017-01-23 Thread Felipe Balbi
Hi, David Laight writes: > From: Mathias Nyman >> Sent: 20 January 2017 14:47 >> From: Felipe Balbi >> >> If we add that newline, the output will like like the following: >> >> kworker/2:1-42[002] 169.811435: xhci_address_ctx: >> ctx_64=0, ctx_type=2, ctx_dma=@153fbd000, ctx_v

RE: [PATCH 32/37] usb: host: xhci: remove newline from tracer

2017-01-23 Thread David Laight
From: Mathias Nyman > Sent: 20 January 2017 14:47 > From: Felipe Balbi > > If we add that newline, the output will like like the following: > > kworker/2:1-42[002] 169.811435: xhci_address_ctx: > ctx_64=0, ctx_type=2, ctx_dma=@153fbd000, ctx_va=@880153fbd000 > > We would rat

Re: [RFC v2 1/5] UDC: Split the driver into amd (pci) and Synopsys core driver

2017-01-23 Thread Raviteja Garimella
Hi Florian, On Fri, Jan 20, 2017 at 12:58 AM, Florian Fainelli wrote: > On 01/19/2017 02:44 AM, Raviteja Garimella wrote: >> Hi, >> >> On Thu, Jan 19, 2017 at 12:15 AM, Florian Fainelli >> wrote: >>> On 01/17/2017 12:05 AM, Raviteja Garimella wrote: This patch splits the amd5536udc driver

Re: [PATCH v2] usb: dwc3: handle DWC_USB3_NUM == DWC_USB3_NUM_IN_EPS

2017-01-23 Thread Bryan O'Donoghue
On 23/01/17 12:08, Felipe Balbi wrote: > > Hi, > > Bryan O'Donoghue writes: >> - DWC_USB3_NUM indicates the number of Device mode single directional >> endpoints, including OUT and IN endpoint 0. >> >> - DWC_USB3_NUM_IN_EPS indicates the maximum number of Device mode IN >> endpoints active a

Re: [PATCH v3 1/3] usb: musb: dma: Add a DMA completion platform callback

2017-01-23 Thread Alexandre Bailon
On 01/20/2017 09:00 PM, Bin Liu wrote: > On Thu, Jan 19, 2017 at 11:06:57AM +0100, Alexandre Bailon wrote: >> Currently, the CPPI 4.1 driver is not completely generic and >> only work on dsps. This is because of IRQ management. >> Add a callback to dma_controller that could be invoked on DMA comple

Re: [PATCH 6/6] dt-bindings: mt8173-mtu3: add reference clock

2017-01-23 Thread Rob Herring
On Sat, Jan 21, 2017 at 7:49 PM, Chunfeng Yun wrote: > Hi, > > On Sat, 2017-01-21 at 14:11 -0600, Rob Herring wrote: >> On Wed, Jan 18, 2017 at 02:08:27PM +0800, Chunfeng Yun wrote: >> > add a reference clock for compatibility >> >> Why? This block suddenly has 2 clocks instead of 1? > In fact, th

Re: [RESEND PATCH 6/6] dt-bindings: phy-mt65xx-usb: add support for mt2712 platform

2017-01-23 Thread Rob Herring
On Sat, Jan 21, 2017 at 8:50 PM, Chunfeng Yun wrote: > On Sat, 2017-01-21 at 14:08 -0600, Rob Herring wrote: >> On Wed, Jan 18, 2017 at 02:00:14PM +0800, Chunfeng Yun wrote: >> > add a new compatible string for "mt2712", and a new reference clock >> > for SuperSpeed analog phy; >> > >> > Signed-of

Re: [PATCH] HID: get rid of HID_QUIRK_NO_INIT_REPORTS

2017-01-23 Thread Jiri Kosina
On Thu, 5 Jan 2017, Benjamin Tissoires wrote: > I don't know what to do about hiddev too. I don't know if we have actual > users besides some debugging tools. And hidraw is much better than > hiddev, so ideally, I'd like to remove it some way. First, I'd love to get rid of HID_QUIRK_NO_INIT_REP

Re: [RFC] usb: gadget: uvc: webcam gadget USB PID is using value from a different gadget

2017-01-23 Thread Greg KH
On Mon, Jan 23, 2017 at 12:47:31PM +0100, Petr Cvek wrote: > Dne 23.1.2017 v 12:32 Greg KH napsal(a): > I know it is only a cosmetic change on a legacy driver, but I assume > it would be better to have some default value for configfs API than to > borrow a PID from a whole different

Re: [PATCHv15 3/3] usb: typec: add driver for Intel Whiskey Cove PMIC USB Type-C PHY

2017-01-23 Thread Felipe Balbi
Hi, Heikki Krogerus writes: > +static int wcove_typec_probe(struct platform_device *pdev) > +{ [snip] > + wcove->cap.prefer_role = TYPEC_NO_PREFERRED_ROLE; we have a slight problem here that affects users of this particular driver. Well, more specifically, it affects Intel Joule. Because

Re: functionfs on dwc3, xhci host: endpoint cannot be used in both directions ?

2017-01-23 Thread Vincent Pelletier
Hello, On Mon, 23 Jan 2017 14:00:40 +0200, Felipe Balbi wrote: > it could be that we're ran out of IN endpoints. There's a maximum number > to how many IN endpoints we can have enabled at one time and, currently, > dwc3 is not enforcing that in any way (I'll get that sorted out for > v4.12, v4.11

Re: [RFC] usb: gadget: uvc: webcam gadget USB PID is using value from a different gadget

2017-01-23 Thread Felipe Balbi
Hi, Greg KH writes: >> >> fine by me. Just lsusb will look funky ;-) >> > >> > Heh, true, but I thought lsusb would use a string if the device provided >> > it. Haven't looked at that portion of the code in a very long time... >> > >> >> My lsusb shows separate strings (using usbutils from s

Re: [PATCH v3 2/3] dmaengine: cppi41: Add support of DA8xx to CPPI 4.1

2017-01-23 Thread Alexandre Bailon
On 01/19/2017 07:15 PM, Sergei Shtylyov wrote: > On 01/19/2017 02:13 PM, Alexandre Bailon wrote: > > > The DA8xx has a CPPI 4.1 DMA controller. > > This is add the glue layer required to make it work on DA8xx. > > > > Signed-off-by: Alexandre Bailon > > --- > > drivers/dma/Kconfig | 6 +++--- >

Re: functionfs on dwc3, xhci host: endpoint cannot be used in both directions ?

2017-01-23 Thread Felipe Balbi
Hi, Vincent Pelletier writes: > On Mon, 23 Jan 2017 14:00:40 +0200, Felipe Balbi > wrote: >> it could be that we're ran out of IN endpoints. There's a maximum number >> to how many IN endpoints we can have enabled at one time and, currently, >> dwc3 is not enforcing that in any way (I'll get th

Re: [PATCH 36/37] xhci: simplify how we store TDs in urb private data

2017-01-23 Thread Mathias Nyman
On 23.01.2017 14:15, Mathias Nyman wrote: On 23.01.2017 13:57, David Laight wrote: From: Mathias Nyman Sent: 20 January 2017 14:47 Instead of storing a zero length array of td pointers, and then allocate memory both for the td pointer array and the td's, just use a zero length array of actua

Re: functionfs on dwc3, xhci host: endpoint cannot be used in both directions ?

2017-01-23 Thread Vincent Pelletier
On Mon, 23 Jan 2017 16:30:57 +0200, Felipe Balbi wrote: > hmmm, what does the following show? > > # mkdir -p /d > # mount -t debugfs none /d > # grep HWPARAMS3 /d/*dwc3*/regdump # grep HWPARAMS3 /sys/kernel/debug/*dwc3*/regdump GHWPARAMS3 = 0x10420089 Regards, -- Vincent Pelletier pgp9ZJv9GN

usb: gadget: f_fs: Accept up to 30 endpoints.

2017-01-23 Thread Vincent Pelletier
It is allowed by the USB specification to enabled same-address, opposite- direction endpoints simultaneously, which means 30 non-zero endpoints are allowed. So double eps_addrmap length to 30. The original code only accepted 14 descriptors out of a likely intended 15 (as there are 15 endpoint addre

Re: functionfs on dwc3, xhci host: endpoint cannot be used in both directions ?

2017-01-23 Thread Vincent Pelletier
Changes since try 1: - impove commit message a bit - #declare array size to avoid duplication -- 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 http://vger.kernel.org/majordomo-info.html

[PATCH linux-next v2 1/1] usb: gadget: udc: atmel: Update endpoint allocation scheme

2017-01-23 Thread cristian.birsan
From: Cristian Birsan Update atmel udc driver with a new enpoint allocation scheme. The data sheet requires that all endpoints are allocated in order. Signed-off-by: Cristian Birsan --- drivers/usb/gadget/udc/Kconfig | 14 ++ drivers/usb/gadget/udc/atmel_usba_udc.c | 236

Re: [PATCH v5] USB: Add uPD78F0730 USB to Serial Adaptor Driver

2017-01-23 Thread Johan Hovold
On Sun, Jan 22, 2017 at 12:32:16AM +0300, Maksim Salau wrote: > The adaptor can be found on development boards for 78k, RL78 and V850 > microcontrollers produced by Renesas Electronics Corporation. > > This is not a full-featured USB to serial converter, however it allows > basic communication and

Re: functionfs on dwc3, xhci host: endpoint cannot be used in both directions ?

2017-01-23 Thread Felipe Balbi
Hi, Vincent Pelletier writes: > On Mon, 23 Jan 2017 16:30:57 +0200, Felipe Balbi > wrote: >> hmmm, what does the following show? >> >> # mkdir -p /d >> # mount -t debugfs none /d >> # grep HWPARAMS3 /d/*dwc3*/regdump > > # grep HWPARAMS3 /sys/kernel/debug/*dwc3*/regdump > GHWPARAMS3 = 0x104200

Re: [PATCHv15 2/3] usb: USB Type-C connector class

2017-01-23 Thread Felipe Balbi
Hi, Heikki Krogerus writes: > +static void typec_report_identity(struct device *dev) > +{ > + sysfs_notify(&dev->kobj, "identity", "id_header"); > + sysfs_notify(&dev->kobj, "identity", "cert_stat"); > + sysfs_notify(&dev->kobj, "identity", "product"); if you sysfs_notify() all thre

[PATCH linux-next v2 0/1] usb: gadget: udc: atmel: Update endpoint allocation scheme

2017-01-23 Thread cristian.birsan
From: Cristian Birsan Hi, This patch updates the usb endpoint allocation scheme for atmel usba driver to make sure all endpoints are allocated in order. This requirement comes from the datasheet of the controller. The allocation scheme is decided by fifo_mode parameter. For fifo_mode = 0 the dr

  1   2   >