Re: [PATCH 2/2] usb: gadget: composite: Support more than 500mA MaxPower

2019-10-23 Thread Jack Pham
On Tue, Oct 22, 2019 at 11:57:53PM -0700, Jack Pham wrote: > USB 3.x SuperSpeed peripherals can draw up to 900mA of VBUS power > when in configured state. However, if a configuration wanting to > take advantage of this is added with MaxPower greater than 500 > (currently possible if using a ConfigF

Re: [PATCH 2/2] usb: gadget: composite: Support more than 500mA MaxPower

2019-10-23 Thread Felipe Balbi
Hi, Jack Pham writes: > USB 3.x SuperSpeed peripherals can draw up to 900mA of VBUS power > when in configured state. However, if a configuration wanting to > take advantage of this is added with MaxPower greater than 500 > (currently possible if using a ConfigFS gadget) the composite > driver f

Re: [PATCH 00/18] usb: typec: API improvements

2019-10-23 Thread Heikki Krogerus
On Tue, Oct 22, 2019 at 08:43:40PM +, Ajay Gupta wrote: > Hi Heikki, > > > -Original Message- > > From: linux-usb-ow...@vger.kernel.org > > On Behalf Of Heikki Krogerus > > Sent: Tuesday, October 22, 2019 12:41 AM > > To: Ajay Gupta > > Cc: Greg Kroah-Hartman ; Guenter Roeck > > ; li

Re: [PATCH] net: usb: lan78xx: Use phy_mac_interrupt() for interrupt handling

2019-10-23 Thread Daniel Wagner
Sebastian suggested to try this here: --- a/drivers/net/usb/lan78xx.c +++ b/drivers/net/usb/lan78xx.c @@ -1264,8 +1264,11 @@ static void lan78xx_status(struct lan78xx_net *dev, struct urb *urb) netif_dbg(dev, link, dev->net, "PHY INTR: 0x%08x\n", intdata); lan78xx_

Re: [PATCH 2/2] usb: gadget: composite: Support more than 500mA MaxPower

2019-10-23 Thread jackp
On 2019-10-23 00:49, Felipe Balbi wrote: Hi, Jack Pham writes: USB 3.x SuperSpeed peripherals can draw up to 900mA of VBUS power when in configured state. However, if a configuration wanting to take advantage of this is added with MaxPower greater than 500 (currently possible if using a Config

Re: [PATCH] [PATCH v8] USB: serial: pl2303: Add new PID to support PL2303HXN (TYPE_HXN)

2019-10-23 Thread Johan Hovold
On Tue, Sep 24, 2019 at 08:14:00PM +0800, Charles Yeh wrote: > Prolific has developed a new USB to UART chip: PL2303HXN > PL2303HXN : PL2303GC/PL2303GS/PL2303GT/PL2303GL/PL2303GE/PL2303GB > The Vendor request used by the PL2303HXN (TYPE_HXN) is different from > the existing PL2303 series (TYPE_HX &

How to find devices that have gadget support?

2019-10-23 Thread Rogan Dawes
Hi folks, I'm trying to find out which CPU's that are supported by Linux have USB controllers that support gadget mode. In theory, this should be a relatively straightforward matter, given the device tree descriptions, I think. But I am struggling to figure out how to actually create a list of th

Re: BUG report: usb: dwc3: Link TRB triggered an intterupt without IOC being setted

2019-10-23 Thread alex zheng
Hi, all We found that this is a known issue of synopsys DWC3 USB controller, when the PARKMODE_SS of DWC3 is enable, the controller may hang or do wrong TRB schedule in some heavy load conditions. Setting DISABLE_PARKMODE_SS to 1 can work around this bug. Thank you for your help. alex zheng 于2

Re: BUG report: usb: dwc3: Link TRB triggered an intterupt without IOC being setted

2019-10-23 Thread Felipe Balbi
Hi, (please don't top-post) alex zheng writes: > Hi, all > > We found that this is a known issue of synopsys DWC3 USB controller, > when the PARKMODE_SS of DWC3 is enable, the controller may hang or do > wrong TRB schedule in some heavy load conditions. > > Setting DISABLE_PARKMODE_SS to 1 can

[PATCH 1/3] usb: usb251xb: Drop some unused defines

2019-10-23 Thread Uwe Kleine-König
The five removed symbols are unused since they were introduced in commit 3ec72a2a1e5d ("usb: misc: add USB251xB/xBi Hi-Speed Hub Controller Driver") back in 2017. Signed-off-by: Uwe Kleine-König --- drivers/usb/misc/usb251xb.c | 5 - 1 file changed, 5 deletions(-) diff --git a/drivers/usb/m

[PATCH 3/3] usb: usb251xb: Add support for USB2422

2019-10-23 Thread Uwe Kleine-König
The USB2422 uses a different package that the USB251x and only comes in a variant with 2 downstream ports. Other than that it is software compatible. Tested-by: Carsten Stelling Signed-off-by: Uwe Kleine-König --- drivers/usb/misc/usb251xb.c | 12 1 file changed, 12 insertions(+)

[PATCH 2/3] usb: usb251xb: Document chip variant usb2422

2019-10-23 Thread Uwe Kleine-König
The next patch introduces support for the USB2422. Add it to the list of devices supported by the binding. Signed-off-by: Uwe Kleine-König --- Documentation/devicetree/bindings/usb/usb251xb.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/

Re: [PATCH] usb-storage: Revert commit 747668dbc061 ("usb-storage: Set virt_boundary_mask to avoid SG overflows")

2019-10-23 Thread Alan Stern
On Wed, 23 Oct 2019, Christoph Hellwig wrote: > On Mon, Oct 21, 2019 at 11:48:06AM -0400, Alan Stern wrote: > > There is no longer any reason to keep the virt_boundary_mask setting > > for usb-storage. It was needed in the first place only for handling > > devices with a block size smaller than t

[PATCH v2 04/18] usb: typec: tcpm: Start using struct typec_operations

2019-10-23 Thread Heikki Krogerus
Supplying the operation callbacks as part of a struct typec_operations instead of as part of struct typec_capability during port registration. Signed-off-by: Heikki Krogerus Reviewed-by: Guenter Roeck --- drivers/usb/typec/tcpm/tcpm.c | 45 --- 1 file changed, 20

[PATCH v2 03/18] usb: typec: Separate the operations vector

2019-10-23 Thread Heikki Krogerus
Introducing struct typec_operations which has the same callbacks as struct typec_capability. The old callbacks are kept for now, but after all users have been converted, they will be removed. Signed-off-by: Heikki Krogerus Reviewed-by: Guenter Roeck --- drivers/usb/typec/class.c | 39 ++

[PATCH v2 00/18] usb: typec: API improvements

2019-10-23 Thread Heikki Krogerus
Hi, There is now a check in ucsi_exec_command() that makes sure we do not call ucsi_read_error() with UCSI_GET_ERROR_STATUS command. That should prevent endless recursion from happening. The original cover letter: The first patches in this series (patches 1-8) introduce a small change to the USB

[PATCH v2 09/18] usb: typec: Remove unused members from struct typec_capability

2019-10-23 Thread Heikki Krogerus
The members for the muxes are not used, so dropping them. Signed-off-by: Heikki Krogerus Reviewed-by: Guenter Roeck --- include/linux/usb/typec.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/include/linux/usb/typec.h b/include/linux/usb/typec.h index 894798084319..0f52723a11bd 100644 --

[PATCH v2 12/18] usb: typec: ucsi: acpi: Move to the new API

2019-10-23 Thread Heikki Krogerus
Replacing the old "cmd" and "sync" callbacks with an implementation of struct ucsi_operations. The ACPI notification (interrupt) handler will from now on read the CCI (Command Status and Connector Change Indication) register, and call ucsi_connector_change() function and/or complete pending command

[PATCH v2 13/18] usb: typec: ucsi: ccg: Move to the new API

2019-10-23 Thread Heikki Krogerus
Replacing the old "cmd" and "sync" callbacks with an implementation of struct ucsi_operations. The interrupt handler will from now on read the CCI (Command Status and Connector Change Indication) register, and call ucsi_connector_change() function and/or complete pending command completions based o

[PATCH v2 05/18] usb: typec: tps6598x: Start using struct typec_operations

2019-10-23 Thread Heikki Krogerus
Supplying the operation callbacks as part of a struct typec_operations instead of as part of struct typec_capability during port registration. After this there is not need to keep the capabilities stored anywhere in the driver. Signed-off-by: Heikki Krogerus Reviewed-by: Guenter Roeck --- drive

[PATCH v2 14/18] usb: typec: ucsi: Remove the old API

2019-10-23 Thread Heikki Krogerus
The drivers now only use the new API, so removing the old one. Signed-off-by: Heikki Krogerus --- drivers/usb/typec/ucsi/displayport.c | 24 +- drivers/usb/typec/ucsi/trace.h | 17 -- drivers/usb/typec/ucsi/ucsi.c| 346 +++ drivers/usb/typec/ucsi/ucsi.h

[PATCH v2 18/18] usb: typec: ucsi: Optimise ucsi_unregister()

2019-10-23 Thread Heikki Krogerus
There is no need to reset the PPM when the interface is unregistered. Quietly silencing the notifications and then unregistering everything is enough. This speeds up ucsi_unregister() a lot. Signed-off-by: Heikki Krogerus --- drivers/usb/typec/ucsi/ucsi.c | 9 +++-- 1 file changed, 3 inserti

[PATCH v2 17/18] usb: typec: ucsi: New error codes

2019-10-23 Thread Heikki Krogerus
Adding new error codes to the driver that were introduced in UCSI specification v1.1. Signed-off-by: Heikki Krogerus --- drivers/usb/typec/ucsi/ucsi.c | 25 - drivers/usb/typec/ucsi/ucsi.h | 6 ++ 2 files changed, 26 insertions(+), 5 deletions(-) diff --git a/driver

[PATCH v2 06/18] usb: typec: ucsi: Start using struct typec_operations

2019-10-23 Thread Heikki Krogerus
Supplying the operation callbacks as part of a struct typec_operations instead of as part of struct typec_capability during port registration. Signed-off-by: Heikki Krogerus Reviewed-by: Guenter Roeck --- drivers/usb/typec/ucsi/ucsi.c | 22 +++--- 1 file changed, 11 insertions(+

[PATCH v2 07/18] usb: typec: hd3ss3220: Start using struct typec_operations

2019-10-23 Thread Heikki Krogerus
Supplying the operation callbacks as part of a struct typec_operations instead of as part of struct typec_capability during port registration. After this there is not need to keep the capabilities stored anywhere in the driver. Signed-off-by: Heikki Krogerus Reviewed-by: Guenter Roeck --- drive

[PATCH v2 08/18] usb: typec: Remove the callback members from struct typec_capability

2019-10-23 Thread Heikki Krogerus
There are no more users for them. Signed-off-by: Heikki Krogerus Reviewed-by: Guenter Roeck --- drivers/usb/typec/class.c | 40 +++ include/linux/usb/typec.h | 17 - 2 files changed, 11 insertions(+), 46 deletions(-) diff --git a/drivers/usb/

[PATCH v2 15/18] usb: typec: ucsi: Remove struct ucsi_control

2019-10-23 Thread Heikki Krogerus
That data structure was used for constructing the commands before executing them, but it was never really useful. Using the structure just complicated the driver. The commands are 64-bit wide, so it is enough to simply fill a u64 variable. No data structures needed. This simplifies the driver cons

[PATCH v2 16/18] usb: typec: ucsi: Remove all bit-fields

2019-10-23 Thread Heikki Krogerus
We can't use bit fields with data that is received or send to/from the device. Signed-off-by: Heikki Krogerus --- drivers/usb/typec/ucsi/trace.h | 12 ++--- drivers/usb/typec/ucsi/ucsi.c | 52 +++ drivers/usb/typec/ucsi/ucsi.h | 93 +- 3 files ch

[PATCH v2 01/18] usb: typec: Copy everything from struct typec_capability during registration

2019-10-23 Thread Heikki Krogerus
Copying everything from struct typec_capability to struct typec_port during port registration. This will make sure that under no circumstances the driver can change the values in the struct typec_capability that the port uses. Signed-off-by: Heikki Krogerus Reviewed-by: Guenter Roeck --- driver

[PATCH v2 10/18] usb: typec: hd3ss3220: Give the connector fwnode to the port device

2019-10-23 Thread Heikki Krogerus
The driver already finds the node in order to get reference to the USB role switch. Signed-off-by: Heikki Krogerus Tested-by: Biju Das --- drivers/usb/typec/hd3ss3220.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/drivers/usb/typec/hd3ss3220.c b/drivers/usb/t

[PATCH v2 02/18] usb: typec: Introduce typec_get_drvdata()

2019-10-23 Thread Heikki Krogerus
Leaving the private driver_data pointer of the port device to the port drivers. Signed-off-by: Heikki Krogerus Reviewed-by: Guenter Roeck --- drivers/usb/typec/class.c | 11 +++ include/linux/usb/typec.h | 4 2 files changed, 15 insertions(+) diff --git a/drivers/usb/typec/class.

[PATCH v2 11/18] usb: typec: ucsi: Simplified registration and I/O API

2019-10-23 Thread Heikki Krogerus
Adding more simplified API for interface registration and read and write operations. The registration is split into separate creation and registration phases. That allows the drivers to properly initialize the interface before registering it if necessary. The read and write operations are supplie

Re: [PATCH] dmaengine: cppi41: Fix issue with musb and ftdi uart

2019-10-23 Thread Tony Lindgren
* Vinod Koul [191023 04:54]: > Hi Tony, > > On 22-10-19, 07:55, Tony Lindgren wrote: > > Patch subject should reflect the patch changes not the fix. The patch > title here is not telling me anything about the change below. Pls > consider updating the title. Sure, I'll resend with updated descri

[PATCH] dmaengine: cppi41: Fix cppi41_dma_prep_slave_sg() when idle

2019-10-23 Thread Tony Lindgren
Yegor Yefremov reported that musb and ftdi uart can fail for the first open of the uart unless connected using a hub. This is because the first dma call done by musb_ep_program() must wait if cppi41 is PM runtime suspended. Otherwise musb_ep_program() continues with other non-dma packets before t

[PATCH] UAS: Revert commit 3ae62a42090f ("UAS: fix alignment of scatter/gather segments")

2019-10-23 Thread Alan Stern
Commit 3ae62a42090f ("UAS: fix alignment of scatter/gather segments"), copying a similar commit for usb-storage, attempted to solve a problem involving scatter-gather I/O and USB/IP by setting the virt_boundary_mask for mass-storage devices. However, it now turns out that the analogous change in u

Re: [PATCH] dmaengine: cppi41: Fix cppi41_dma_prep_slave_sg() when idle

2019-10-23 Thread Vinod Koul
On 23-10-19, 08:31, Tony Lindgren wrote: > Yegor Yefremov reported that musb and ftdi > uart can fail for the first open of the uart unless connected using > a hub. > > This is because the first dma call done by musb_ep_program() must wait > if cppi41 is PM runtime suspended. Otherwise musb_ep_pr

RE: [PATCH 00/18] usb: typec: API improvements

2019-10-23 Thread Ajay Gupta
Hi Heikki > -Original Message- > From: linux-usb-ow...@vger.kernel.org > On Behalf Of Heikki Krogerus > Sent: Wednesday, October 23, 2019 1:06 AM > To: Ajay Gupta > Cc: Greg Kroah-Hartman ; Guenter Roeck > ; linux-usb@vger.kernel.org > Subject: Re: [PATCH 00/18] usb: typec: API improveme

RE: [PATCH v2 13/18] usb: typec: ucsi: ccg: Move to the new API

2019-10-23 Thread Ajay Gupta
Hi Heikki > -Original Message- > From: Heikki Krogerus > Sent: Wednesday, October 23, 2019 7:40 AM > To: Greg Kroah-Hartman > Cc: Guenter Roeck ; Ajay Gupta ; > linux-usb@vger.kernel.org > Subject: [PATCH v2 13/18] usb: typec: ucsi: ccg: Move to the new API > > Replacing the old "cmd" a

[no subject]

2019-10-23 Thread Joe Bryant
Linuxhttps://llk.dk/8urvkl Joe Bryant

Re: [PATCH] dmaengine: cppi41: Fix cppi41_dma_prep_slave_sg() when idle

2019-10-23 Thread Peter Ujfalusi
Hi Tony, On 10/23/19 6:31 PM, Tony Lindgren wrote: > Yegor Yefremov reported that musb and ftdi > uart can fail for the first open of the uart unless connected using > a hub. > > This is because the first dma call done by musb_ep_program() must wait > if cppi41 is PM runtime suspended. Otherwise

Re: [PATCH] dmaengine: cppi41: Fix cppi41_dma_prep_slave_sg() when idle

2019-10-23 Thread Tony Lindgren
* Peter Ujfalusi [191023 17:04]: > On 10/23/19 6:31 PM, Tony Lindgren wrote: > > diff --git a/drivers/dma/ti/cppi41.c b/drivers/dma/ti/cppi41.c > > --- a/drivers/dma/ti/cppi41.c > > +++ b/drivers/dma/ti/cppi41.c > > @@ -586,9 +586,22 @@ static struct dma_async_tx_descriptor > > *cppi41_dma_prep_s

Re: [PATCH] dmaengine: cppi41: Fix cppi41_dma_prep_slave_sg() when idle

2019-10-23 Thread Sergei Shtylyov
Hello! On 10/23/2019 06:31 PM, Tony Lindgren wrote: > Yegor Yefremov reported that musb and ftdi > uart can fail for the first open of the uart unless connected using > a hub. > > This is because the first dma call done by musb_ep_program() must wait > if cppi41 is PM runtime suspended. Otherwi

Re: [PATCH] dmaengine: cppi41: Fix cppi41_dma_prep_slave_sg() when idle

2019-10-23 Thread Andy Shevchenko
On Wed, Oct 23, 2019 at 9:55 PM Sergei Shtylyov wrote: > On 10/23/2019 06:31 PM, Tony Lindgren wrote: > > + int error; > > + > > + error = pm_runtime_get(cdd->ddev.dev); > > + if (error < 0) { > >I'd call that variable 'status', comparison (error < 0) just doesn't look > right. >

Re: [PATCH] dmaengine: cppi41: Fix cppi41_dma_prep_slave_sg() when idle

2019-10-23 Thread Tony Lindgren
* Sergei Shtylyov [191023 18:56]: > On 10/23/2019 06:31 PM, Tony Lindgren wrote: > > --- a/drivers/dma/ti/cppi41.c > > +++ b/drivers/dma/ti/cppi41.c > > @@ -586,9 +586,22 @@ static struct dma_async_tx_descriptor > > *cppi41_dma_prep_slave_sg( > > enum dma_transfer_direction dir, unsigned long

Re: [PATCH] dmaengine: cppi41: Fix cppi41_dma_prep_slave_sg() when idle

2019-10-23 Thread Peter Ujfalusi
On 10/23/19 8:16 PM, Tony Lindgren wrote: > * Peter Ujfalusi [191023 17:04]: >> On 10/23/19 6:31 PM, Tony Lindgren wrote: >>> diff --git a/drivers/dma/ti/cppi41.c b/drivers/dma/ti/cppi41.c >>> --- a/drivers/dma/ti/cppi41.c >>> +++ b/drivers/dma/ti/cppi41.c >>> @@ -586,9 +586,22 @@ static struct

Re: [PATCH] dmaengine: cppi41: Fix cppi41_dma_prep_slave_sg() when idle

2019-10-23 Thread Tony Lindgren
* Peter Ujfalusi [191023 19:02]: > On 10/23/19 8:16 PM, Tony Lindgren wrote: > > * Peter Ujfalusi [191023 17:04]: > >> On 10/23/19 6:31 PM, Tony Lindgren wrote: > >>> diff --git a/drivers/dma/ti/cppi41.c b/drivers/dma/ti/cppi41.c > >>> --- a/drivers/dma/ti/cppi41.c > >>> +++ b/drivers/dma/ti/cppi

Re: [PATCH] dmaengine: cppi41: Fix cppi41_dma_prep_slave_sg() when idle

2019-10-23 Thread Sergei Shtylyov
Hello! On 10/23/2019 09:58 PM, Andy Shevchenko wrote: >>> + int error; >>> + >>> + error = pm_runtime_get(cdd->ddev.dev); >>> + if (error < 0) { >> >>I'd call that variable 'status', comparison (error < 0) just doesn't look >> right. >> If it was *if* (error), it would have been