RE: [PATCH v8 13/14] usb: gadget: udc: adapt to OTG core

2016-05-17 Thread Jun Li
Hi > -Original Message- > From: Roger Quadros [mailto:rog...@ti.com] > Sent: Monday, May 16, 2016 5:52 PM > To: Peter Chen > Cc: peter.c...@freescale.com; ba...@kernel.org; t...@atomide.com; > gre...@linuxfoundation.org; dan.j.willi...@intel.com; > mathias.ny...@linux.intel.com; joao.pi..

Re: [PATCH] dwc3: gadget: Defer starting the gadget device until gadget is power on

2016-05-17 Thread Baolin Wang
Hi Felipe, On 13 May 2016 at 20:46, Felipe Balbi wrote: > > Hi, > > Baolin Wang writes: > why does it need restart? Why is dwc3 powered off? Who powers it off? Because when the dwc3 Vbus is off (no cable pluging in now), especially for some mobile device, the system need to po

Re: [PATCH] dwc3: gadget: Defer starting the gadget device until gadget is power on

2016-05-17 Thread Felipe Balbi
Hi Baolin Wang writes: > Hi Felipe, > > On 13 May 2016 at 20:46, Felipe Balbi wrote: >> >> Hi, >> >> Baolin Wang writes: >> why does it need restart? Why is dwc3 powered off? Who powers it off? > > Because when the dwc3 Vbus is off (no cable pluging in now), > especially for so

Re: [PATCH v8 13/14] usb: gadget: udc: adapt to OTG core

2016-05-17 Thread Roger Quadros
On 17/05/16 10:38, Jun Li wrote: > Hi > >> -Original Message- >> From: Roger Quadros [mailto:rog...@ti.com] >> Sent: Monday, May 16, 2016 5:52 PM >> To: Peter Chen >> Cc: peter.c...@freescale.com; ba...@kernel.org; t...@atomide.com; >> gre...@linuxfoundation.org; dan.j.willi...@intel.com;

Re: [PATCH] dwc3: gadget: Defer starting the gadget device until gadget is power on

2016-05-17 Thread Baolin Wang
On 17 May 2016 at 16:00, Felipe Balbi wrote: > > Hi > > Baolin Wang writes: >> Hi Felipe, >> >> On 13 May 2016 at 20:46, Felipe Balbi wrote: >>> >>> Hi, >>> >>> Baolin Wang writes: >>> why does it need restart? Why is dwc3 powered off? Who powers it off? >> >> Because when the dwc3

RE: [PATCH v8 13/14] usb: gadget: udc: adapt to OTG core

2016-05-17 Thread Jun Li
Hi Roger, > -Original Message- > From: Roger Quadros [mailto:rog...@ti.com] > Sent: Tuesday, May 17, 2016 4:09 PM > To: Jun Li ; Peter Chen > Cc: peter.c...@freescale.com; ba...@kernel.org; t...@atomide.com; > gre...@linuxfoundation.org; dan.j.willi...@intel.com; > mathias.ny...@linux.int

Re: [PATCH] cdc-wdm: fix "out-of-sync" due to missing notifications

2016-05-17 Thread Oliver Neukum
On Fri, 2016-05-13 at 18:59 +0200, Bjørn Mork wrote: > Bjørn Mork writes: > > > The driver enforces a strict one-to-one relationship between the > > received RESPONSE_AVAILABLE notifications and messages read from > > the device. At the same time, it will cancel the interrupt URB > > when there i

Re: [PATCH] dwc3: gadget: Defer starting the gadget device until gadget is power on

2016-05-17 Thread Felipe Balbi
Hi, Baolin Wang writes: > Make sense. cool, if you wanna work on it, let me know and I can give some details of what I have in mind. >>> >>> Could you explain details to me, and I wanna continue to optimize the >>> power management things. Thanks. >> >> I have it half-way done

Re: [PATCH] dwc3: gadget: Defer starting the gadget device until gadget is power on

2016-05-17 Thread Baolin Wang
On 17 May 2016 at 17:25, Felipe Balbi wrote: > > Hi, > > Baolin Wang writes: >> Make sense. > > cool, if you wanna work on it, let me know and I can give some details > of what I have in mind. Could you explain details to me, and I wanna continue to optimize the pow

Re: [PATCH] asix: Fix offset calculation in asix_rx_fixup() causing slow transmissions

2016-05-17 Thread David Miller
From: John Stultz Date: Mon, 16 May 2016 20:36:15 -0700 > In testing with HiKey, we found that since > commit 3f30b158eba5 ("asix: On RX avoid creating bad Ethernet > frames"), > we're seeing lots of noise during network transfers: ... > And network throughput ends up being pretty bursty and slo

Re: USB kernel debug

2016-05-17 Thread Alan Stern
On Mon, 16 May 2016, Brian T. McKee wrote: > Hi Greg and Alan, > > I just booted windows 10 to see if it can handle the setup and it can't. > The cameras lock up in similar ways to linux. A few frames display and > then they lock up. > > It looks like some kind of hardware failure. Yes. That w

Re: [PATCH] cdc-wdm: fix "out-of-sync" due to missing notifications

2016-05-17 Thread Bjørn Mork
Oliver Neukum writes: > On Fri, 2016-05-13 at 18:59 +0200, Bjørn Mork wrote: >> Bjørn Mork writes: >> >> > The driver enforces a strict one-to-one relationship between the >> > received RESPONSE_AVAILABLE notifications and messages read from >> > the device. At the same time, it will cancel the

Re: [PATCHv2 00/15] Get MUSB PM runtime working again

2016-05-17 Thread Bin Liu
Hi Tony, On Wed, May 11, 2016 at 05:53:01PM -0700, Tony Lindgren wrote: > Hi all, > > Here's the whole series reposted with a bunch of additional changes. > It seems to now properly work with with multiple phy cable status > events, and should work for Ivaylo on n900 too. > > Please re-review an

Re: [PATCH] cdc-wdm: fix "out-of-sync" due to missing notifications

2016-05-17 Thread Oliver Neukum
On Tue, 2016-05-17 at 21:24 +0200, Bjørn Mork wrote: > Oliver Neukum writes: > > > On Fri, 2016-05-13 at 18:59 +0200, Bjørn Mork wrote: > >> Bjørn Mork writes: > >> > >> > The driver enforces a strict one-to-one relationship between the > >> > received RESPONSE_AVAILABLE notifications and messa

UBSAN whinge in ihci-hub.c

2016-05-17 Thread Valdis Kletnieks
=== [2.418579] UBSAN: Undefined behaviour in drivers/usb/host/ehci-hub.c:877:47 [2.418582] index -1 is out of range for type 'u32 [1]' [2.418587] CPU: 1 PID: 1 Comm: swapper/0 Not tainted 4.6.0-next-20160517-1-gede618fce89c

Re: [PATCHv2 00/15] Get MUSB PM runtime working again

2016-05-17 Thread Tony Lindgren
* Bin Liu [160517 14:17]: > Hi Tony, > > On Wed, May 11, 2016 at 05:53:01PM -0700, Tony Lindgren wrote: > > Hi all, > > > > Here's the whole series reposted with a bunch of additional changes. > > It seems to now properly work with with multiple phy cable status > > events, and should work for I

Re: [PATCHv2 00/15] Get MUSB PM runtime working again

2016-05-17 Thread Bin Liu
On Tue, May 17, 2016 at 02:54:04PM -0700, Tony Lindgren wrote: > * Bin Liu [160517 14:17]: > > Hi Tony, > > > > On Wed, May 11, 2016 at 05:53:01PM -0700, Tony Lindgren wrote: > > > Hi all, > > > > > > Here's the whole series reposted with a bunch of additional changes. > > > It seems to now prop

Re: UBSAN whinge in ihci-hub.c

2016-05-17 Thread Greg Kroah-Hartman
On Tue, May 17, 2016 at 05:52:40PM -0400, Valdis Kletnieks wrote: > So, not content in the amount of breakage I generate already, I > compiled with UBSAN enabled... > > The immediately relevant part: > > [2.418576] > ===

Re: [PATCH] asix: Fix offset calculation in asix_rx_fixup() causing slow transmissions

2016-05-17 Thread Dean Jenkins
Hi John, Thanks for your patch. I think the patch has already been applied. The git commit subject of "asix: Fix offset calculation in asix_rx_fixup() causing slow transmissions" I think is a bit misleading as the bug relates to reception and not transmission. I guess that your intent was to

[PATCH 02/13] usb: dwc2: gadget: Remove unnecessary line

2016-05-17 Thread John Youn
From: Vardan Mikayelyan Removed "ctrl |= DXEPCTL_USBACTEP" from dwc2_hsotg_start_req() function because this step is done in dwc2_hsotg_ep_enable(). Signed-off-by: Vardan Mikayelyan Signed-off-by: John Youn --- drivers/usb/dwc2/gadget.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drive

[PATCH 06/13] usb: dwc2: gadget: Add dwc2_gadget_incr_frame_num()

2016-05-17 Thread John Youn
From: Vardan Mikayelyan Increases and checks targeted frame number of current ep if overrun happened, sets flag and masks with DSTS_SOFFN_LIMIT Added following fields to struct dwc2_hsotg_ep -target_frame: Targeted frame num to setup next ISOC transfer -frame_overrun: Indicates SOF number overru

[PATCH 07/13] usb: dwc2: gadget: Corrected interval calculation

2016-05-17 Thread John Youn
From: Vardan Mikayelyan According "Table 9-13" of USB2 Specification For full-/high-speed isochronous endpoints, bInterval value must be in the range from 1 to 16. The bInterval value is used as the exponent for a 2^(bInterval-1) value; Signed-off-by: Vardan Mikayelyan S

[PATCH 10/13] usb: dwc2: gadget: Add OUTTKNEPDIS and NAKINTRPT handlers

2016-05-17 Thread John Youn
From: Vardan Mikayelyan NAKINTRPT interrupt is starting point for isoc-in transfer, synchronization done with first in token received from host, core asserts this interrupt when responds with 0 length data to in token, received from host. The first IN token is asynchronous for device - device do

[PATCH 03/13] usb: dwc2: gadget: Remove unnecessary code

2016-05-17 Thread John Youn
From: Vardan Mikayelyan This chunk is not needed here. There is no functionality depend on this, so if no-op, I think we do not need to have this interrupt unmasked. Signed-off-by: Vardan Mikayelyan Signed-off-by: John Youn --- drivers/usb/dwc2/gadget.c | 8 1 file changed, 8 deletio

[PATCH 01/13] usb: dwc2: Add missing register field definitions

2016-05-17 Thread John Youn
From: Vardan Mikayelyan Added register field definitions, register names are according DWC-OTG databook. Signed-off-by: Vardan Mikayelyan Signed-off-by: John Youn --- drivers/usb/dwc2/hw.h | 13 + 1 file changed, 13 insertions(+) diff --git a/drivers/usb/dwc2/hw.h b/drivers/usb/d

[PATCH 08/13] usb: dwc2: gadget: Add dwc2_gadget_read_ep_interrupts function

2016-05-17 Thread John Youn
From: Vardan Mikayelyan Reads and returns interrupts for given endpoint, by masking epint_reg with corresponding mask. Signed-off-by: Vardan Mikayelyan Signed-off-by: John Youn --- drivers/usb/dwc2/gadget.c | 30 +- 1 file changed, 29 insertions(+), 1 deletion(-)

[PATCH 11/13] usb: dwc2: gadget: Add Incomplete ISO IN/OUT Interrupt handlers

2016-05-17 Thread John Youn
From: Vardan Mikayelyan Incomplete ISO IN interrupt indicates one of the following conditions occurred while transmitting an ISOC transaction. - Corrupted IN Token for ISOC EP. - Packet not complete in FIFO. Incomplete ISO OUT indicates that there is at least one isochronous OUT endpoint on whic

[PATCH 13/13] usb: dwc2: gadget: Final fixes for BDMA ISOC

2016-05-17 Thread John Youn
From: Vardan Mikayelyan Done fixes and tested hsotg gadget's BDMA mode. Tested Control, Bulk, Isoc, Inter transfers. Added code for isoc transfers, removed unusable code, done minor fixes. Affected functions and IRQ handlers: - dwc2_hsotg_start_req(), - dwc2_hsotg_ep_enable(), - dwc2_hsotg_ep_que

[PATCH 00/13] usb: dwc2: Fix up gadget isochronous support

2016-05-17 Thread John Youn
The following patch series fixes up isochronous support for the dwc2 gadget. The existing isochronous support lacked a few features. Most notably it did not properly sync up with the first packet and it didn't handle the Incomplete ISO IN/OUT interrupts. These patches have been sitting in our inte

[PATCH 09/13] usb: dwc2: gadget: Add dwc2_gadget_start_next_request function

2016-05-17 Thread John Youn
From: Vardan Mikayelyan Replaced repeating code with function call. Starts next request from ep queue. If queue is empty and ep is isoc -In case of OUT-EP unmasks OUTTKNEPDIS. OUTTKNEPDIS is masked in it's handler, so we need to unmask it here to be able to do resynchronization. Signed-off-by:

[PATCH 04/13] usb: dwc2: gadget: Corrected field names

2016-05-17 Thread John Youn
From: Vardan Mikayelyan No-op change. Changed field names to prevent misunderstanding. Signed-off-by: Vardan Mikayelyan Signed-off-by: John Youn --- drivers/usb/dwc2/gadget.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2

[PATCH 05/13] usb: dwc2: gadget: Fix transfer stop programming for out endpoint

2016-05-17 Thread John Youn
From: Vardan Mikayelyan According DWC-OTG databook, "GOUTNakEff" is read only and can be cleared only by "DCTL.CGOUTNak", but here we do not need to clear it because DWC-OTG programming guide says that before disabling any OUT endpoint, the application must enable Global OUT NAK mode, so if this

[PATCH 12/13] usb: dwc2: gadget: Add EP disabled interrupt handler

2016-05-17 Thread John Youn
From: Vardan Mikayelyan Reimplemented EP disabled interrupt handler and moved to corresponding function. This interrupt indicates that the endpoint has been disabled per the application's request. For IN endpoints flushes txfifo, in case of BULK clears DCTL_CGNPINNAK, in case of ISOC completes

Re: [PATCH] cdc-wdm: fix "out-of-sync" due to missing notifications

2016-05-17 Thread Bjørn Mork
Oliver Neukum writes: > On Tue, 2016-05-17 at 21:24 +0200, Bjørn Mork wrote: >> Oliver Neukum writes: >> >> > On Fri, 2016-05-13 at 18:59 +0200, Bjørn Mork wrote: >> >> Bjørn Mork writes: >> >> >> >> > The driver enforces a strict one-to-one relationship between the >> >> > received RESPONSE_A

Re: usb: dwc2: regression on MyBook Live Duo / Canyonlands since 4.3.0-rc4

2016-05-17 Thread John Youn
On 5/14/2016 6:11 AM, Christian Lamparter wrote: > On Thursday, May 12, 2016 11:40:28 AM John Youn wrote: >> On 5/12/2016 6:30 AM, Christian Lamparter wrote: >>> On Thursday, May 12, 2016 01:55:44 PM Arnd Bergmann wrote: On Thursday 12 May 2016 11:58:18 Christian Lamparter wrote: Dete

[PATCH 1/1] net: pegasus: remove dead coding

2016-05-17 Thread Heinrich Schuchardt
(!count || count < 4) is always true. So let's remove the coding which is dead at least since 2005. Signed-off-by: Heinrich Schuchardt --- drivers/net/usb/pegasus.c | 53 --- 1 file changed, 53 deletions(-) diff --git a/drivers/net/usb/pegasus.c b/dri

Re: [PATCH v8 13/14] usb: gadget: udc: adapt to OTG core

2016-05-17 Thread Peter Chen
On Mon, May 16, 2016 at 12:51:53PM +0300, Roger Quadros wrote: > On 16/05/16 12:23, Peter Chen wrote: > > On Mon, May 16, 2016 at 11:26:57AM +0300, Roger Quadros wrote: > >> Hi, > >> > >> On 16/05/16 10:02, Peter Chen wrote: > >>> On Fri, May 13, 2016 at 01:03:27PM +0300, Roger Quadros wrote: > >>>

Re: [PATCH 1/1] net: pegasus: remove dead coding

2016-05-17 Thread Petko Manolov
On 16-05-18 02:13:30, Heinrich Schuchardt wrote: > (!count || count < 4) is always true. > So let's remove the coding which is dead at least since 2005. You may want to reconsider the above statement. Just assume that 'count' is typically between 56 and 1514 bytes. Petko > Si

Re: [1/1] net: pegasus: remove dead coding

2016-05-17 Thread Guenter Roeck
On Wed, May 18, 2016 at 02:13:30AM +0200, Heinrich Schuchardt wrote: > (!count || count < 4) is always true. Even if count >= 4 ? Guenter > So let's remove the coding which is dead at least since 2005. > > Signed-off-by: Heinrich Schuchardt > > --- > drivers/net/usb/pegasus.c | 53 ---