Re: [PATCH] USB: Add quirk for WORLDE easykey.25 MIDI keyboard

2017-01-23 Thread Lukáš Lalinský
On Tue, Jan 24, 2017 at 8:32 AM, Oliver Neukum wrote: > Am Montag, den 23.01.2017, 19:36 +0100 schrieb Lukáš Lalinský: >> I have uploaded both captures here - >> https://gist.github.com/lalinsky/83148a827d5cd43e79e377d8e1b5ed0d > > Indeed it is does not set a configuration. Either the capture > is

Re: [PATCH] USB: Add quirk for WORLDE easykey.25 MIDI keyboard

2017-01-23 Thread Oliver Neukum
Am Montag, den 23.01.2017, 19:36 +0100 schrieb Lukáš Lalinský: > On Sat, Jan 21, 2017 at 10:08 AM, Greg Kroah-Hartman > wrote: > > > > Always use scripts/get_maintainer.pl to determine who to send > > patches > > to, and what mailing list.  You forgot linux-usb@vger, which I've > > now > > added.

Re: [PATCH v3 02/24] Revert "usb: dwc2: Read in the AHB burst property"

2017-01-23 Thread kbuild test robot
Hi John, [auto build test ERROR on balbi-usb/next] [also build test ERROR on next-20170123] [cannot apply to v4.10-rc5] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/John-Youn/usb-dwc2-Rework

Re: [PATCH v3 02/24] Revert "usb: dwc2: Read in the AHB burst property"

2017-01-23 Thread kbuild test robot
Hi John, [auto build test ERROR on balbi-usb/next] [also build test ERROR on next-20170123] [cannot apply to v4.10-rc5] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/John-Youn/usb-dwc2-Rework

Re: [PATCH v6 1/4] usb: dbc: early driver for xhci debug capability

2017-01-23 Thread Lu Baolu
Hi Ingo, On 01/22/2017 05:31 PM, Ingo Molnar wrote: > * Lu Baolu wrote: > >> xHCI debug capability (DbC) is an optional but standalone >> functionality provided by an xHCI host controller. Software >> learns this capability by walking through the extended >> capability list of the host. xHCI spec

Re: [PATCH v5 1/4] usb: dbc: early driver for xhci debug capability

2017-01-23 Thread Lu Baolu
Hi Ingo, On 01/22/2017 05:04 PM, Ingo Molnar wrote: > * Lu Baolu wrote: > +static void xdbc_runtime_delay(unsigned long count) +{ + udelay(count); +} +static void (*xdbc_delay)(unsigned long) = xdbc_early_delay; >>> Is this udelay() complication really necessary? udelay(

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

2017-01-23 Thread Krzysztof Opasiak
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 causes a NULL pointer dereference. This

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

2017-01-23 Thread Vincent Pelletier
Hello, On Tue, Jan 24, 2017 at 12:20 AM, Felipe Balbi wrote: > Seems like HW engineer wanted these last few endpoints to *not* support > full USB3 packets. They are probably supposed to be used for Isochronous > and/or Interrupts endpoints. At some point we need to support this as > well. During

Re: [PATCH v4 6/6] usb: musb: dsps: Manage CPPI 4.1 DMA interrupt in DSPS

2017-01-23 Thread Bin Liu
+cc linux-usb list On Mon, Jan 23, 2017 at 05:48:08PM +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, the CPPI 4.1 driver >

[PATCH v3 24/24] usb: dwc2: gadget: Add checking for g-tx-fifo-size parameter

2017-01-23 Thread John Youn
From: Sevak Arakelyan Add dwc2_check_param_tx_fifo_sizes function which validates the members of g_tx_fifo_size array and sets to average or default values if it is needed. Cc: Stefan Wahren Signed-off-by: Sevak Arakelyan Signed-off-by: John Youn --- drivers/usb/dwc2/params.c | 35 ++

[PATCH v3 22/24] usb: dwc2: host: Correct snpsid checking for GDFIFOCFG

2017-01-23 Thread John Youn
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 --- drivers/usb/dwc2/core.h | 1 + drivers/usb/dwc2/hcd.c | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/u

[PATCH v3 23/24] usb: dwc2: gadget: Set TX FIFO depths to calculated defaults

2017-01-23 Thread John Youn
From: Sevak Arakelyan Remove legacy DWC2_G_P_LEGACY_TX_FIFO_SIZE array for TX FIFOs. Update dwc2_set_param_tx_fifo_sizes function to calculate and assign default average FIFO depth to each member of g_tx_fifo_size array. Total FIFO size, EP Info block's size, FIFO operation mode and device operat

[PATCH v3 21/24] usb: dwc2: host: use msleep() for long delay

2017-01-23 Thread John Youn
From: Nicholas Mc Guire ulseep_range() uses hrtimers and provides no advantage over msleep() for larger delays. Fix up the 100ms delays here passing the adjusted "min" value to msleep(). This helps reduce the load on the hrtimer subsystem. Link: http://lkml.org/lkml/2017/1/11/377 Fixes: commit 2

[PATCH v3 19/24] usb: dwc2: Force port resume on switching to device mode

2017-01-23 Thread John Youn
From: Chen Yu We've seen failures when switching between host and gadget mode, which was diagnosed as being caused due to the bus being auto-suspended when we switched. So this patch forces a port resume when switching to device mode if the bus is suspended. Cc: Wei Xu Cc: Guodong Xu Cc: Amit

[PATCH v3 20/24] usb: dwc2: Add a quirk to allow speed negotiation for Hisilicon Hi6220

2017-01-23 Thread John Youn
From: Chen Yu The Hi6220's usb controller is limited in that it does not support "Split Transactions", so it does not support communicating with low-speed and full-speed devices behind a high-speed hub. Thus it requires a quirk so that we can manually drop the usb speed when low/full-speed are a

[PATCH v3 18/24] usb: dwc2: Workaround case where GOTGCTL state is wrong

2017-01-23 Thread John Youn
From: John Stultz When removing a USB-A to USB-otg adapter cable, we get a change status irq, and then in dwc2_conn_id_status_change, we erroniously see the GOTGCTL_CONID_B flag set. This causes us to get stuck in the "while (!dwc2_is_device_mode(hsotg))" loop, spitting out "Waiting for Peripher

[PATCH v3 17/24] usb: dwc2: Avoid sleeping while holding hsotg->lock

2017-01-23 Thread John Youn
From: John Stultz Basically when plugging in various cables in different orders, I'm occasionally seeing the following BUG splat: [ 86.215403] BUG: scheduling while atomic: kworker/u16:2/53/0x0002 [ 86.219164] usb 1-1: USB disconnect, device number 9 [ 86.226845] Preemption disabled at

[PATCH v3 12/24] usb: dwc2: Fix usage of bool params

2017-01-23 Thread John Youn
Check these parameters only for true or false. There is no need to check for greater or less than 0. Signed-off-by: John Youn --- drivers/usb/dwc2/core.c | 4 +- drivers/usb/dwc2/core.h | 5 -- drivers/usb/dwc2/core_intr.c | 2 +- drivers/usb/dwc2/gadget.c| 2 +- drivers/us

[PATCH v3 16/24] usb: dwc2: Show dr_mode via debugfs

2017-01-23 Thread John Youn
Show the value of dr_mode via a debufs file. Signed-off-by: John Youn --- drivers/usb/dwc2/debugfs.c | 29 + 1 file changed, 29 insertions(+) diff --git a/drivers/usb/dwc2/debugfs.c b/drivers/usb/dwc2/debugfs.c index 57747b0df595..794b959a7c8c 100644 --- a/drivers/us

[PATCH v3 15/24] usb: dwc2: Remove debug prints in params.c

2017-01-23 Thread John Youn
Remove debugging prints to show params. Signed-off-by: John Youn --- drivers/usb/dwc2/params.c | 56 --- 1 file changed, 56 deletions(-) diff --git a/drivers/usb/dwc2/params.c b/drivers/usb/dwc2/params.c index 0e7f0f92c18f..620b02723f0d 100644 --- a/d

[PATCH v3 14/24] usb: dwc2: Add debugfs file to show params

2017-01-23 Thread John Youn
Show the core params and hardware params. Signed-off-by: John Youn --- drivers/usb/dwc2/debugfs.c | 127 + 1 file changed, 127 insertions(+) diff --git a/drivers/usb/dwc2/debugfs.c b/drivers/usb/dwc2/debugfs.c index cad621f02972..57747b0df595 100644 -

[PATCH v3 13/24] usb: dwc2: Remove unnecessary parameters

2017-01-23 Thread John Youn
Further reduce the set of parameters set by platforms. Many of them are unnecessary as they should be reported by hardware. They should only need to be overridden if there is a problem. Signed-off-by: John Youn --- drivers/usb/dwc2/params.c | 11 --- 1 file changed, 11 deletions(-) diff

[PATCH v3 11/24] usb: dwc2: Remove platform static params

2017-01-23 Thread John Youn
Remove the platform-specific static param structs and set only those params that are necessary for each platform. Signed-off-by: John Youn --- drivers/usb/dwc2/params.c | 262 +++--- 1 file changed, 108 insertions(+), 154 deletions(-) diff --git a/drivers

[PATCH v3 09/24] usb: dwc2: Rearrange param structure members

2017-01-23 Thread John Youn
Group the members by global, host, and gadget params. Formatting and organizational change only. Signed-off-by: John Youn --- drivers/usb/dwc2/core.h | 51 ++--- 1 file changed, 23 insertions(+), 28 deletions(-) diff --git a/drivers/usb/dwc2/core.h b/

[PATCH v3 10/24] usb: dwc2: Check core parameters

2017-01-23 Thread John Youn
Check that core parameters have valid values and adjust them if they aren't. Signed-off-by: John Youn --- drivers/usb/dwc2/params.c | 185 ++ 1 file changed, 185 insertions(+) diff --git a/drivers/usb/dwc2/params.c b/drivers/usb/dwc2/params.c index 44

[PATCH v3 07/24] usb: dwc2: Get device properties

2017-01-23 Thread John Youn
After setting the default core parameter values, read in the device properties and modify core parameter values if needed. Signed-off-by: John Youn --- drivers/usb/dwc2/params.c | 35 +++ 1 file changed, 35 insertions(+) diff --git a/drivers/usb/dwc2/params.c b/d

[PATCH v3 08/24] usb: dwc2: Update parameter types

2017-01-23 Thread John Youn
Update the param types to appropriately sized ints and bools. Signed-off-by: John Youn --- drivers/usb/dwc2/core.h | 52 - 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/drivers/usb/dwc2/core.h b/drivers/usb/dwc2/core.h index 7256b

[PATCH v3 06/24] usb: dwc2: Set core parameters to default values

2017-01-23 Thread John Youn
Initialize the core parameters to their default, auto-detected values. Remove all the previous dwc2_set_param* methods. Most of what this code is doing is handling defaults for "not set" values and other trivial checks. The checking can be simplified and will be done in a later commit. This allow

[PATCH v3 04/24] Revert "usb: dwc2: pci: Add AHB burst property for HAPS"

2017-01-23 Thread John Youn
This reverts commit e0beae49474c ("usb: dwc2: pci: Add AHB burst property for HAPS"). This commit was inadvertently applied. Signed-off-by: John Youn --- drivers/usb/dwc2/pci.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/usb/dwc2/pci.c b/drivers/usb/dwc2/pci.c index f8bffda92495.

[PATCH v3 05/24] usb: dwc2: Remove unused otg_ver parameter

2017-01-23 Thread John Youn
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 --- drivers/usb/dwc2/core.c | 5 - drivers/usb/dwc2/core.h | 9 - drivers/usb/dwc2/hcd.c| 3 --- drivers/usb/dwc2/params.c

[PATCH v3 03/24] Revert "usb: dwc2: Use the ahb_burst param"

2017-01-23 Thread John Youn
This reverts commit 70033c5ec15b ("usb: dwc2: Use the ahb_burst param"). This commit was inadvertently applied. Signed-off-by: John Youn --- drivers/usb/dwc2/gadget.c | 2 +- drivers/usb/dwc2/hcd.c| 8 +--- drivers/usb/dwc2/params.c | 10 ++ 3 files changed, 16 insertions(+),

[PATCH v3 00/24] usb: dwc2: Rework params, FIFO, and other changes

2017-01-23 Thread John Youn
Hi Felipe, This is a consolidation, rebase, and resend of several dwc2 patch series that were submitted to this list in the past month or so. See v2 [1] of this series for a summary. This latest revision is rebased to apply cleanly to your latest testing/next. This series also rebases the FIFO s

[PATCH v3 02/24] Revert "usb: dwc2: Read in the AHB burst property"

2017-01-23 Thread John Youn
This reverts commit 605f91f9f5a6 ("usb: dwc2: Read in the AHB burst property"). This commit was inadvertently applied. Signed-off-by: John Youn --- drivers/usb/dwc2/core.h | 9 --- drivers/usb/dwc2/params.c | 69 --- 2 files changed, 78 deletio

[PATCH v3 01/24] Revert "Documentation: devictree: dwc2: Add AHB burst binding"

2017-01-23 Thread John Youn
This reverts commit d067dad79548 ("Documentation: devictree: dwc2: Add AHB burst binding"). This commit was inadvertently applied. Signed-off-by: John Youn --- Documentation/devicetree/bindings/usb/dwc2.txt | 2 -- 1 file changed, 2 deletions(-) diff --git a/Documentation/devicetree/bindings/u

Re: v4.9 to v4.10 regression: oops when USB cable is plugged in.

2017-01-23 Thread Tony Lindgren
* Pavel Machek [170123 14:26]: > [25392.239837] Unhandled fault: external abort on non-linefetch (0x1028) at > 0xfa0ab060 > [25392.239868] pgd = c0004000 > [25392.239898] [fa0ab060] *pgd=48011452(bad) > [25392.239929] Internal error: : 1028 [#1] ARM > [25392.239929] Modules linked in: > [25392.23

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

2017-01-23 Thread John Youn
On 1/23/2017 2:10 PM, Alan Stern wrote: > On Mon, 23 Jan 2017, John Youn wrote: > >> On 1/22/2017 5:29 PM, Bryan O'Donoghue wrote: >>> - 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

v4.9 to v4.10 regression: oops when USB cable is plugged in.

2017-01-23 Thread Pavel Machek
Hi! v4.9 was ok (this is annoying enought that I'd notice). v4.10-rc5 is not. (And yes, I probably [0.00] Booting Linux on physical CPU 0x0 [0.00] Linux version 4.10.0-rc5-142127-g41f2839-dirty (pavel@amd) (gcc version 4.7.2 (GCC) ) #222 Mon Jan 23 15:13:11 CET 2017 [0.

Claims Requirements

2017-01-23 Thread Daniel Ellmerer
The British National Lottery P O Box 1010 3b Olympic Way, Sefton Business Park, Aintree, Liverpool , L30 1RD (Customer Services) Ref: UK/9420X2/68 Batch: 074/05/ZY369 Ticket number:56475600545 188 Lucky Numbers: 05,06,17,20,28,42(Bonus33) WINNING NOTIFICATION: We wish to congratulate and inf

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

2017-01-23 Thread Alan Stern
On Mon, 23 Jan 2017, John Youn wrote: > On 1/22/2017 5:29 PM, Bryan O'Donoghue wrote: > > - 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 > > endpo

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

2017-01-23 Thread Bin Liu
On Mon, Jan 23, 2017 at 09:44:42AM -0800, Kevin Hilman wrote: > Bin Liu writes: > > > 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). > >

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

2017-01-23 Thread John Youn
On 1/22/2017 5:29 PM, Bryan O'Donoghue wrote: > - 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

Re: [PATCH v4 0/6] usb: musb: cppi41: Add a way to manage DMA irq

2017-01-23 Thread Bin Liu
On Mon, Jan 23, 2017 at 05:48:02PM +0100, Alexandre Bailon wrote: > This series was "dmaengine: cppi41: Make the driver more generic". > I have tried to separate as munch I could CPPI 4.1 MUSB driver changes. > > Currently, the DMA interrupt is managed by the CPPI 4.1 driver. > The issue here is t

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

2017-01-23 Thread John Youn
On 1/23/2017 5:34 AM, Bryan O'Donoghue wrote: > 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 ma

Re: [PATCH V2 1/2] dt-bindings: leds: document new led-triggers property

2017-01-23 Thread Jacek Anaszewski
On 01/23/2017 05:45 PM, Rob Herring wrote: > On Fri, Jan 20, 2017 at 11:35:20PM +0100, Jacek Anaszewski wrote: >> Hi Rafał, >> >> On 01/20/2017 10:56 PM, Rafał Miłecki wrote: >>> From: Rafał Miłecki >>> >>> Some LEDs can be related to particular devices described in DT. This >>> property allows sp

Re: [PATCH v7 3/5] phy: Add set_vbus callback

2017-01-23 Thread Stephen Boyd
Quoting Kishon Vijay Abraham I (2017-01-22 00:46:21) > Hi, > > On Saturday 21 January 2017 12:20 AM, Stephen Boyd wrote: > > Some USB PHYs need to be told about vbus changing state > > explicitly. For example the qcom USB HS PHY needs to toggle a bit > > when vbus goes from low to high (VBUSVLDEXT

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

2017-01-23 Thread John Youn
On 1/23/2017 3:50 AM, Felipe Balbi wrote: > > 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 d

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

2017-01-23 Thread John Youn
On 1/23/2017 3:41 AM, Felipe Balbi wrote: > 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

Re: [PATCH] USB: Add quirk for WORLDE easykey.25 MIDI keyboard

2017-01-23 Thread Lukáš Lalinský
On Sat, Jan 21, 2017 at 10:08 AM, Greg Kroah-Hartman wrote: > Always use scripts/get_maintainer.pl to determine who to send patches > to, and what mailing list. You forgot linux-usb@vger, which I've now > added... I'm sorry about that. I actually did use scripts/get_maintainer.pl, but it only re

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

2017-01-23 Thread Kevin Hilman
Bin Liu writes: > 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, the CPPI 4.1 driver

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

2017-01-23 Thread Magnus Lilja
Hi On 23 January 2017 at 12:51, Felipe Balbi wrote: > > 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. >> >> T

[PATCH] usb: gadget: udc: constify usb_ep_ops structures

2017-01-23 Thread Bhumika Goyal
Declare usb_ep_ops structures as const as they are only stored in the ops field of an usb_ep structure. This field is of type const, so usb_ep_ops structures having this property can be made const too. Done using Coccinelle( A smaller version of the script) @r disable optional_qualifier@ identifie

Re: [PATCH V2 1/2] dt-bindings: leds: document new led-triggers property

2017-01-23 Thread Rob Herring
On Fri, Jan 20, 2017 at 11:35:20PM +0100, Jacek Anaszewski wrote: > Hi Rafał, > > On 01/20/2017 10:56 PM, Rafał Miłecki wrote: > > From: Rafał Miłecki > > > > Some LEDs can be related to particular devices described in DT. This > > property allows specifying such relations. E.g. USB LED should u

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

2017-01-23 Thread David Laight
From: Mathias Nyman > Sent: 20 January 2017 14:47 > Remove duplicate code by using trb_to_noop() when > handling Aborted commads ^n ... > xhci_dbg(xhci, "Turn aborted command %p to no-op\n", >i_cmd->command_trb); > - /* get c

[PATCH] usb: dwc3: gadget: read IN ep FIFO size from HW

2017-01-23 Thread Felipe Balbi
Instead of assuming all IN endpoints support 1024 bytes, let's read the actual value from HW and pass that to gadget API. Signed-off-by: Felipe Balbi --- drivers/usb/dwc3/gadget.c | 43 +++ 1 file changed, 35 insertions(+), 8 deletions(-) diff --git a/dri

Re: [PATCH] usb: dwc3: add quirk to handle DWC_USB3_NUM == DWC_USB3_NUM_IN_EPS

2017-01-23 Thread Bryan O'Donoghue
On 23/01/17 15:38, Rob Herring wrote: >> - tx-fifo-resize: determines if the FIFO *has* to be >> reallocated. >> + - snps,num_in_eps_quirk: when set core will over-ride the num_in_eps value. >> + - snps,num_in_eps_override: the value that will be used for num_in_eps when >> +

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

2017-01-23 Thread David Laight
From: David Laight > Sent: 23 January 2017 11:58 > 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 privat

Re: [PATCH] usb: dwc3: add quirk to handle DWC_USB3_NUM == DWC_USB3_NUM_IN_EPS

2017-01-23 Thread Rob Herring
On Thu, Jan 19, 2017 at 07:58:02PM +, Bryan O'Donoghue wrote: > - 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, inclu

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

2017-01-23 Thread Felipe Balbi
Vincent Pelletier writes: > On Mon, 23 Jan 2017 16:30:57 +0200, Felipe Balbi > wrote: >> well, the IN limit can be lower than what HW reports depending on how >> your TX FIFO space is setup. > > And while I am in regdump, in case it would help (especially all the > GTXFIFOSIZ entries and GDBGFIF

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: > well, the IN limit can be lower than what HW reports depending on how > your TX FIFO space is setup. And while I am in regdump, in case it would help (especially all the GTXFIFOSIZ entries and GDBGFIFOSPACE ?) while lowering the number of

[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

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

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: [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

[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

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

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

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 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 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: [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: 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: [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: [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: [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: [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 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: [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 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: [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 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: [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

[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

[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 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 +

[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 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 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 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 ++

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 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 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 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

  1   2   >