[PATCH] usb: dwc2: gadget: Consider VBUS discharge time in disconnect flow

2019-02-05 Thread Minas Harutyunyan
If VBUS discharge time > 3ms then on device cable disconnect, core asserted Early Suspend then Suspend interrupts which no need to handle. VBUS discharge time depend on PHY schematic implementation. Can be up to 1 sec. To unambiguous recognize disconnect event on Early_Suspend interrupt added del

RE: [PATCH v3 2/6] usb:common Separated decoding functions from dwc3 driver.

2019-02-05 Thread Pawel Laszczak
H Greg > >On Thu, Jan 31, 2019 at 11:52:29AM +, Pawel Laszczak wrote: >> Patch moves some decoding functions from driver/usb/dwc3/debug.h driver >> to driver/usb/common/debug.c file. These moved functions include: >> dwc3_decode_get_status >> dwc3_decode_set_clear_feature >> dwc3_de

RE: [PATCH v3 2/6] usb:common Separated decoding functions from dwc3 driver.

2019-02-05 Thread Felipe Balbi
Hi, Pawel Laszczak writes: >>On Thu, Jan 31, 2019 at 11:52:29AM +, Pawel Laszczak wrote: >>> Patch moves some decoding functions from driver/usb/dwc3/debug.h driver >>> to driver/usb/common/debug.c file. These moved functions include: >>> dwc3_decode_get_status >>> dwc3_decode_set_cl

RE: [PATCH v3 5/6] usb:cdns3 Add Cadence USB3 DRD Driver

2019-02-05 Thread Pawel Laszczak
Hi, >On Thu, Jan 31, 2019 at 11:52:32AM +, Pawel Laszczak wrote: >> This patch introduce new Cadence USBSS DRD driver >> to linux kernel. >> >> The Cadence USBSS DRD Driver is a highly >> configurable IP Core which can be >> instantiated as Dual-Role Device (DRD), >> Peripheral Only and Host O

[PATCH 0/8] ARM: davinci: move the da8xx-ohci GPIO logic into the driver

2019-02-05 Thread Bartosz Golaszewski
From: Bartosz Golaszewski In order to drop the hard-coded GPIO base values from the davinci GPIO driver's platform data, we first need to get rid of all calls to the legacy GPIO functions. This series moves the GPIO logic related to da8xx-ohci out of the board files and into the driver code. Fi

[PATCH 8/8] usb: ohci-da8xx: remove unused callbacks from platform data

2019-02-05 Thread Bartosz Golaszewski
From: Bartosz Golaszewski There are no more users of these callbacks. Signed-off-by: Bartosz Golaszewski --- include/linux/platform_data/usb-davinci.h | 14 -- 1 file changed, 14 deletions(-) diff --git a/include/linux/platform_data/usb-davinci.h b/include/linux/platform_data/usb

[PATCH 4/8] ARM: davinci: da830-evm: use gpio lookup entries for usb gpios

2019-02-05 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Add lookup entries for vbus and overcurrent gpios for da830-evm. Signed-off-by: Bartosz Golaszewski --- arch/arm/mach-davinci/board-da830-evm.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/arch/arm/mach-davinci/board-da830-evm.c b/arch/arm/mach-dav

[PATCH 7/8] ARM: davinci: da830-evm: remove legacy usb helpers

2019-02-05 Thread Bartosz Golaszewski
From: Bartosz Golaszewski The logic implemented by these routines now lives in the da8xx-ohci driver. Remove dead code. Signed-off-by: Bartosz Golaszewski --- arch/arm/mach-davinci/board-da830-evm.c | 67 - 1 file changed, 67 deletions(-) diff --git a/arch/arm/mach-dav

[PATCH 6/8] ARM: davinci: omapl138-hawk: remove legacy usb helpers

2019-02-05 Thread Bartosz Golaszewski
From: Bartosz Golaszewski The logic implemented by these routines now lives in the da8xx-ohci driver. Remove dead code. Signed-off-by: Bartosz Golaszewski --- arch/arm/mach-davinci/board-omapl138-hawk.c | 75 + 1 file changed, 1 insertion(+), 74 deletions(-) diff --git a/a

[PATCH 1/8] usb: ohci-da8xx: add a new line after local variables

2019-02-05 Thread Bartosz Golaszewski
From: Bartosz Golaszewski This improves the coding style. Signed-off-by: Bartosz Golaszewski --- drivers/usb/host/ohci-da8xx.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/host/ohci-da8xx.c b/drivers/usb/host/ohci-da8xx.c index a55cbba40a5a..c492c7e6f746 100644 --- a/drivers

[PATCH 5/8] usb: ohci-da8xx: add vbus and overcurrent gpios

2019-02-05 Thread Bartosz Golaszewski
From: Bartosz Golaszewski There are two users upstream which register external callbacks for switching the port power on/off and overcurrent protection. Both users only use two GPIOs for that. Instead of having that functionality in the board files, move the logic into the OHCI driver - including

[PATCH 3/8] ARM: davinci: omapl138-hawk: use gpio lookup entries for usb gpios

2019-02-05 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Add lookup entries for the vbus and overcurrent gpios for omapl138-hawk. Signed-off-by: Bartosz Golaszewski --- arch/arm/mach-davinci/board-omapl138-hawk.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/arch/arm/mach-davinci/board-omapl138-hawk.c b/a

linux-usb@vger.kernel.org

2019-02-05 Thread Bartosz Golaszewski
From: Bartosz Golaszewski This improves readability by removing all the &pdev->dev dereferencing. Signed-off-by: Bartosz Golaszewski --- drivers/usb/host/ohci-da8xx.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/usb/host/ohci-da8xx.c b/drivers/

Re: [PATCH v2 1/2] dt-bindings: Add Qualcomm USB Super-Speed PHY bindings

2019-02-05 Thread Jorge Ramirez
On 1/30/19 21:02, Rob Herring wrote: > On Tue, Jan 29, 2019 at 12:35:14PM +0100, Jorge Ramirez-Ortiz wrote: >> Binding description for Qualcomm's Synopsys 1.0.0 super-speed PHY >> controller embedded in QCS404. >> >> Based on Sriharsha Allenki's original >> definitions. >> >> Signed-off-by: Jorge

[PATCH 1/2] usb: dwc3: trace: pass trace buffer size to decoding functions

2019-02-05 Thread Felipe Balbi
Instead of assuming that our buffer is big enough, let's pass the buffer size around so printing functions can make sure they won't overflow the buffer. Signed-off-by: Felipe Balbi --- drivers/usb/dwc3/debug.h | 142 +-- drivers/usb/dwc3/trace.h | 7 +- 2 fi

[PATCH 2/2] usb: dwc3: debug: purge usage of strcat

2019-02-05 Thread Felipe Balbi
Now that buffer size is always passed around, we don't need to rely on strcat anymore. Signed-off-by: Felipe Balbi --- drivers/usb/dwc3/debug.h | 14 +- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/drivers/usb/dwc3/debug.h b/drivers/usb/dwc3/debug.h index e925a6b7300

Re: Fwd: composite device fails to reset "suspended" flag

2019-02-05 Thread Minas Harutyunyan
Hi Frank, On 12/24/2018 12:41 PM, Minas Harutyunyan wrote: > Hi Frank, > > On 12/21/2018 5:53 PM, Frank Mori Hess wrote: >> On Fri, Dec 21, 2018 at 6:01 AM Minas Harutyunyan >> wrote: >> >>> >>> According data book Disconnect Interrupt asserted only in Host mode. >>> Programming guide says for d

Re: [PATCH 2/3] udc: net2280: Fix overrun of OUT messages

2019-02-05 Thread guido
Zitat von Alan Stern : On Mon, 4 Feb 2019, Guido Kiener wrote: From: Guido Kiener The OUT endpoint normally blocks (NAK) subsequent packets when a short packet is received and returns an incomplete queue entry to the gadget driver. Thereby the gadget driver can detect a short packet when r

Re: [PATCH 3/3] udc: net2280: Fix typo

2019-02-05 Thread guido
Zitat von Alan Stern : On Mon, 4 Feb 2019, Guido Kiener wrote: From: Guido Kiener Fix spelling of automatically. Signed-off-by: Guido Kiener --- drivers/usb/gadget/udc/net2280.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/gadget/udc/net2280.c b/driver

Re: [PATCH 4/5] usb: typec: ucsi: Preliminary support for alternate modes

2019-02-05 Thread Heikki Krogerus
Hi Michael, On Tue, Feb 05, 2019 at 02:20:34AM +, Michael Hsu wrote: > > Your PPM is reporting a separate mode for every pin-assignment it supports. > > It > > really should _not_ do that! You need to be able to get the capabilities > > for DP > > alt mode with GET_ALTERNATE_MODE command in

Re: [PATCH 1/3] udc: net2280: Fix net2280_disable

2019-02-05 Thread guido
Zitat von Alan Stern : On Mon, 4 Feb 2019, Guido Kiener wrote: From: Guido Kiener A reset e.g. calling ep_reset_338x() can happen while endpoints are enabled. How can this happen? That routine is called from only two places. One is in net2280_disable(), so after the endpoint has already

Re: [PATCH 0/8] ARM: davinci: move the da8xx-ohci GPIO logic into the driver

2019-02-05 Thread Alan Stern
On Tue, 5 Feb 2019, Bartosz Golaszewski wrote: > From: Bartosz Golaszewski > > In order to drop the hard-coded GPIO base values from the davinci GPIO > driver's platform data, we first need to get rid of all calls to the > legacy GPIO functions. > > This series moves the GPIO logic related to d

Re: [PATCH 2/3] udc: net2280: Fix overrun of OUT messages

2019-02-05 Thread Alan Stern
On Tue, 5 Feb 2019 gu...@kiener-muenchen.de wrote: > > Zitat von Alan Stern : > > > On Mon, 4 Feb 2019, Guido Kiener wrote: > > > >> From: Guido Kiener > >> > >> The OUT endpoint normally blocks (NAK) subsequent packets when a > >> short packet is received and returns an incomplete queue entry

Re: [PATCH 1/3] udc: net2280: Fix net2280_disable

2019-02-05 Thread Alan Stern
On Tue, 5 Feb 2019 gu...@kiener-muenchen.de wrote: > Zitat von Alan Stern : > > > On Mon, 4 Feb 2019, Guido Kiener wrote: > > > >> From: Guido Kiener > >> > >> A reset e.g. calling ep_reset_338x() can happen while endpoints > >> are enabled. > > > > How can this happen? That routine is called f

Re: Frequent dwc3 crashes on suspend or reboot since 5.0-rc1

2019-02-05 Thread Alan Stern
On Mon, 4 Feb 2019, John Stultz wrote: > On Sat, Feb 2, 2019 at 9:00 AM Alan Stern wrote: > > > > On Fri, 1 Feb 2019, John Stultz wrote: > > > > > Hey all, > > > Since the 5.0 merge window opened, I've been tripping on frequent > > > dwc3 crashes on reboot and suspend, which I've added an examp

Re: [PATCH 2/3] udc: net2280: Fix overrun of OUT messages

2019-02-05 Thread guido
Zitat von Alan Stern : On Tue, 5 Feb 2019 gu...@kiener-muenchen.de wrote: Zitat von Alan Stern : > On Mon, 4 Feb 2019, Guido Kiener wrote: > >> From: Guido Kiener >> >> The OUT endpoint normally blocks (NAK) subsequent packets when a >> short packet is received and returns an incomplete q

[RFC][PATCH] usb: f_fs: Avoid crash due to out-of-scope stack ptr access

2019-02-05 Thread John Stultz
Since the 5.0 merge window opened, I've been seeing frequent crashes on suspend and reboot with the trace: [ 36.911170] Unable to handle kernel paging request at virtual address ff801153d660 [ 36.912769] Unable to handle kernel paging request at virtual address ff84b564 ... [ 3

RE: [PATCH 5/5] usb: typec: ucsi: Support for DisplayPort alt mode

2019-02-05 Thread Ajay Gupta
Hi Heikki, > -Original Message- > From: linux-usb-ow...@vger.kernel.org On > Behalf Of Heikki Krogerus > Sent: Friday, February 1, 2019 2:48 AM > To: Greg Kroah-Hartman ; Ajay Gupta > ; Michael Hsu > Cc: linux-usb@vger.kernel.org > Subject: [PATCH 5/5] usb: typec: ucsi: Support for Displ

[PATCH] USB: gadget: Improve kerneldoc for usb_ep_dequeue()

2019-02-05 Thread Alan Stern
Commit bf594c1070f5 ("USB: gadget: Document that certain ep operations can be called in interrupt context") documented that usb_ep_dequeue() may be called in a non-process context. It follows that the routine must not sleep or wait for events. However, the routine's existing kerneldoc seems to im

[RFC v2] usb: xhci: add Immediate Data Transfer support

2019-02-05 Thread Nicolas Saenz Julienne
Immediate data transfers (IDT) allow the HCD to copy small chunks of data (up to 8bytes) directly into its output transfer TRBs. This avoids the somewhat expensive DMA mappings that are performed by default on most URBs submissions. In the case an URB was suitable for IDT. The data is directly cop

Re: [PATCH 2/2] usb: dwc3: debug: purge usage of strcat

2019-02-05 Thread Jack Pham
Hi Felipe, On Tue, Feb 05, 2019 at 01:11:18PM +0200, Felipe Balbi wrote: > Now that buffer size is always passed around, we don't need to rely on > strcat anymore. > > Signed-off-by: Felipe Balbi > --- > drivers/usb/dwc3/debug.h | 14 +- > 1 file changed, 9 insertions(+), 5 deletion

Re: [PATCH 2/2] usb: dwc3: debug: purge usage of strcat

2019-02-05 Thread Felipe Balbi
Hi, Jack Pham writes: > On Tue, Feb 05, 2019 at 01:11:18PM +0200, Felipe Balbi wrote: >> Now that buffer size is always passed around, we don't need to rely on >> strcat anymore. >> >> Signed-off-by: Felipe Balbi >> --- >> drivers/usb/dwc3/debug.h | 14 +- >> 1 file changed, 9 ins

Re: [PATCH 2/2] usb: dwc3: debug: purge usage of strcat

2019-02-05 Thread Felipe Balbi
Felipe Balbi writes: > Hi, > > Jack Pham writes: >> On Tue, Feb 05, 2019 at 01:11:18PM +0200, Felipe Balbi wrote: >>> Now that buffer size is always passed around, we don't need to rely on >>> strcat anymore. >>> >>> Signed-off-by: Felipe Balbi >>> --- >>> drivers/usb/dwc3/debug.h | 14 ++

Re: [RFC v2] usb: xhci: add Immediate Data Transfer support

2019-02-05 Thread Felipe Balbi
Hi, Nicolas Saenz Julienne writes: > diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c > index 40fa25c4d041..a4efbe62a1a3 100644 > --- a/drivers/usb/host/xhci-ring.c > +++ b/drivers/usb/host/xhci-ring.c > @@ -3272,8 +3272,15 @@ int xhci_queue_bulk_tx(struct xhci_hcd *xhci,

Re: [PATCH] usb: dwc2: Reset device address on EnumDone

2019-02-05 Thread Felipe Balbi
Hi, Minas Harutyunyan writes: > Hi Felipe, > > On 1/21/2019 11:13 AM, Minas Harutyunyan wrote: >> Hi Felipe, >> >> On 12/12/2018 3:43 PM, Minas Harutyunyan wrote: >>> Initially resetting device address was done in USB RESET interrupt >>> handler. In case, when power saving mode enabled (hiberna

Re: [PATCH] usb: dwc3: Enable GBit Ethernet on Odroid XU4

2019-02-05 Thread Felipe Balbi
hi, Jochen Sprickerhof writes: > Note that it only works with USB_XHCI_PLATFORM=y. Also it needs a hard > reset when coming from an unpatched kernel. > > This was included in the original patch in > https://patchwork.kernel.org/patch/9992809/ but got dropped when > accepted in d8c80bb3b55b phy:

Re: [PATCH] usb: gadget: function: f_uac1 add interface assoc desc

2019-02-05 Thread Felipe Balbi
liangshengjun writes: > Add f_uac1 interface association descriptor, make f_uac1 link other > function(like f_uvc) is possible. > > Signed-off-by: Liang Shengjun doesn't apply. Also, remember to break commit log lines at 72 columns -- balbi signature.asc Description: PGP signature