Re: [PATCH v4] USB hub_probe: rework ugly goto-into-compound-statement

2016-11-09 Thread Baolin Wang
Hi, On 9 November 2016 at 23:35, Eugene Korenevsky wrote: > Rework smelling code (goto inside compound statement). Perhaps this is > legacy. Anyway such code is not appropriate for Linux kernel. > > Changes since v3: fix typo > Changes since v2: extract the code to static

Re: [PATCH] usbnet: prevent device rpm suspend in usbnet_probe function

2016-11-09 Thread Kai-Heng Feng
Hi, On Wed, Nov 9, 2016 at 8:32 PM, Bjørn Mork wrote: > Oliver Neukum writes: > >> On Tue, 2016-11-08 at 13:44 -0500, Alan Stern wrote: >> >>> These problems could very well be caused by running at SuperSpeed >>> (USB-3) instead of high speed (USB-2). Yes, it's

[PATCH] r8152: Fix error path in open function

2016-11-09 Thread Guenter Roeck
If usb_submit_urb() called from the open function fails, the following crash may be observed. r8152 8-1:1.0 eth0: intr_urb submit failed: -19 ... r8152 8-1:1.0 eth0: v1.08.3 Unable to handle kernel paging request at virtual address 6b6b6b6b6b6b6b7b pgd = ffc0e7305000 [6b6b6b6b6b6b6b7b]

[PATCH v2 25/30] usb: dwc2: gadget: Correct dwc2_hsotg_ep_stop_xfr() function

2016-11-09 Thread John Youn
From: Vahram Aharonyan Correct dwc2_hsotg_ep_stop_xfr() function to follow dwc2 programming guide for setting NAK on specific endpoint, disabling it and flushing corresponding FIFO. Current code does not take into account whether core acts in shared or dedicated FIFO mode,

[PATCH v2 09/30] usb: dwc2: gadget: Transfer length limit checking for DDMA

2016-11-09 Thread John Youn
From: Vahram Aharonyan Add dwc2_gadget_get_chain_limit() function and its call in transfer start routine to correctly estimate one go on transfer size if descriptor DMA mode is selected. Signed-off-by: Vahram Aharonyan Signed-off-by: John Youn

[PATCH v2 24/30] usb: dwc2: gadget: For DDMA parse setup only after SetUp interrupt

2016-11-09 Thread John Youn
From: Vahram Aharonyan Tests with various hosts show that depend on time difference between host sending SETUP packet and IN/OUT token SW could get Xfercomplete interrupt without SetUp interrupt. On the other hand, SW should parse received SETUP packet only after ensuring

[PATCH v2 12/30] usb: dwc2: gadget: EP 0 specific DDMA programming

2016-11-09 Thread John Youn
From: Vahram Aharonyan Add dwc2_gadget_set_ep0_desc_chain() function to switch between EP0 DDMA chains depend on the stage of control transfer. Include EP0 DDMA chain selection during ep_queue called from dwc2_hsotg_enqueue_setup() for setup stage. Selecting and filling

[PATCH v2 13/30] usb: dwc2: gadget: DDMA transfer start and complete

2016-11-09 Thread John Youn
From: Vahram Aharonyan Update transfer starting dwc2_hsotg_start_req() routine with call of function dwc2_gadget_config_nonisoc_xfer_ddma() to fill descriptor chain. Add call of dwc2_gadget_get_xfersize_ddma() in dwc2_hsotg_handle_outdone() and dwc2_hsotg_complete_in()

[PATCH v2 22/30] usb: dwc2: gadget: Enable the BNA interrupt

2016-11-09 Thread John Youn
From: Vahram Aharonyan Enable the BNA (Buffer Not Available) interrupt in descriptor DMA mode. Signed-off-by: Vahram Aharonyan Signed-off-by: John Youn --- drivers/usb/dwc2/gadget.c | 4 drivers/usb/dwc2/hw.h | 1 +

[PATCH v2 17/30] usb: dwc2: gadget: Add DDMA isoc related fields to dwc2_hsotg_ep

2016-11-09 Thread John Youn
From: Vahram Aharonyan Preparing for isochronous transfers support adding in DDMA mode. In DDMA isochronous transfers are handled differently compared to Slave and BDMA modes. This is caused by fact that isoc requests contain data for one frame/microframe. HW descriptor

[PATCH v2 21/30] usb: dwc2: gadget: Add start and complete calls for DDMA ISOC

2016-11-09 Thread John Youn
From: Vahram Aharonyan Add dwc2_gadget_start_isoc_ddma() function calls in NAK and OUTTknEPDis interrupts to start isochronous transfer once Host has sent a token. Add call of dwc2_gadget_fill_isoc_desc() function in dwc2_hsotg_ep_queue() to fill descriptor chain's half

[PATCH v2 16/30] usb: dwc2: gadget: Enable descriptor DMA mode

2016-11-09 Thread John Youn
From: Vahram Aharonyan Add DCFG register field macro for descriptor DMA mode and update core initialization routine to set that bit accordingly. Signed-off-by: Vahram Aharonyan Signed-off-by: John Youn ---

[PATCH v2 30/30] usb: dwc2: gadget: Add new core parameter for low speed

2016-11-09 Thread John Youn
From: Vardan Mikayelyan Added new core param for low speed, which can be used only when SNPSID is equal to DWC2_CORE_FS_IOT. When LS mode is enabled, we are restricting ep types and providing to upper layer only INTR and CTRL endpoints. Signed-off-by: Vardan Mikayelyan

[PATCH v2 18/30] usb: dwc2: gadget: Fill isoc descriptor and start transfer in DDMA

2016-11-09 Thread John Youn
From: Vahram Aharonyan Add function dwc2_gadget_fill_isoc_desc() - initializes DMA descriptor for isochronous transfer based on the received request data and endpoint characteristics. Added function dwc2_gadget_start_isoc_ddma() - prepare DMA chain for isochronous transfer

[PATCH v2 23/30] usb: dwc2: gadget: Adjust ISOC OUT request's actual len for DDMA

2016-11-09 Thread John Youn
From: Vahram Aharonyan In DDMA mode if programmed ISOC OUT transfer length is not DWORD aligned, after closing descriptor HW leaves value of 4 - (ureq->length % 4) in the RX bytes. This is caused because DMA works using 4B chunks. Example: if length = 9 and all 9 bytes were

[PATCH v2 20/30] usb: dwc2: gadget: In DDMA keep incompISOOUT and incompISOIN masked

2016-11-09 Thread John Youn
From: Vahram Aharonyan In DDMA mode incompISOOUT should be masked, similar as Bulk Out - XferCompl and BNA should be handled. incompISOIN is not valid in DDMA and is not getting asserted. Signed-off-by: Vahram Aharonyan Signed-off-by: John Youn

[PATCH v2 26/30] usb: dwc2: gadget: Disable enabled HW endpoint in dwc2_hsotg_ep_disable

2016-11-09 Thread John Youn
From: Vahram Aharonyan Check if endpoint is enabled during dwc2_hsotg_ep_disable() function processing and call dwc2_hsotg_ep_stop_xfr() to disable it and flush associated FIFO. Move dwc2_hsotg_ep_stop_xfr() and dwc2_hsotg_wait_bit_set() functions upper before

[PATCH v2 28/30] usb: dwc2: gadget: Add IOT device IDs, configure core accordingly

2016-11-09 Thread John Youn
From: Vardan Mikayelyan Add new device IDs for IOT gadget. Done changes in probe to configure core accordingly depending on device ID value. Signed-off-by: Vardan Mikayelyan Signed-off-by: John Youn ---

[PATCH v2 27/30] usb: dwc2: Add support of dedicated full-speed PHY interface

2016-11-09 Thread John Youn
From: Vahram Aharonyan Do modifications in dwc2_hsotg_core_init_disconnected() function to enable USB 1.1 Full-Speed Serial Transceiver Select in GUSBCFG register if corresponding speed and PHY types are chosen. Adjust device speed selection in DCFG register as well.

[PATCH v2 29/30] usb: dwc2: gadget: Program ep0_mps for LS

2016-11-09 Thread John Youn
From: Vardan Mikayelyan When device is enumerated in LS we should program ep0_mps accordingly. USB2 spec says that in LS mode, control ep mps must be 8. Signed-off-by: Vardan Mikayelyan Signed-off-by: John Youn ---

[PATCH v2 19/30] usb: dwc2: gadget: Add completions for DDMA isoc transfers

2016-11-09 Thread John Youn
From: Vahram Aharonyan For DDMA mode in case of isochronous transfers completion performed differently than other transfer types. This is because each usb request was mapped to one descriptor in the chain and SW gets xfercomplete interrupt on all descriptors. The endpoint

[PATCH v2 05/30] usb: dwc2: Add bindings to disable gadget DMA modes

2016-11-09 Thread John Youn
Now that the gadget driver automatically detects DMA modes, we need to provide a way to disable them. Certain platforms may still have issues with DMA and require it to be disabled. It is also needed for IP validation purposes. Signed-off-by: John Youn ---

[PATCH v2 01/30] usb: dwc2: Deprecate g-use-dma binding

2016-11-09 Thread John Youn
This is not needed as the gadget now fully supports DMA and it can autodetect it. This was initially added because gadget DMA mode was only partially implemented so could not be automatically enabled. Signed-off-by: John Youn ---

[PATCH v2 08/30] usb: dwc2: host: Rename MAX_DMA_DESC_SIZE to HOST_DMA_NBYTES_LIMIT

2016-11-09 Thread John Youn
From: Vahram Aharonyan Rename MAX_DMA_DESC_SIZE to HOST_DMA_NBYTES_LIMIT as it stores value of host DMA descriptor transfer bytes' limit. Values are different in case of gadget DMA descriptors. Signed-off-by: Vahram Aharonyan Signed-off-by: John Youn

[PATCH v2 14/30] usb: dwc2: gadget: Fixes for StsPhseRcvd interrupt

2016-11-09 Thread John Youn
From: Vahram Aharonyan The StsPhseRcvd interrupt should not be enabled in slave mode. Also move the StsPhsRcvd interrupt checking in the endpoint interrupt handler to the correct order according to the databook. The interrupt itself will be implemented in a later commit.

[PATCH v2 10/30] usb: dwc2: gadget: Add DDMA chain pointers to dwc2_hsotg_ep structure

2016-11-09 Thread John Youn
From: Vahram Aharonyan Add DMA descriptor members to the dwc2_hsotg_ep structure. Signed-off-by: Vahram Aharonyan Signed-off-by: John Youn --- drivers/usb/dwc2/core.h | 7 +++ drivers/usb/dwc2/gadget.c | 33

[PATCH v2 00/30] usb: dwc2: Gadget descriptor DMA and IOT

2016-11-09 Thread John Youn
This series implements gadget-side descriptor DMA for the DWC_hsotg controller. It also includes support for DWC USB IOT controllers which use the descriptor DMA mode of operation exclusively. These are two new device-only USB controller IPs based on DWC_hsotg. Tested on HAPS platform with: *

[PATCH v2 11/30] usb: dwc2: gadget: Add DDMA chain fill and parse functions

2016-11-09 Thread John Youn
From: Vahram Aharonyan Add dwc2_gadget_get_desc_params() function to define descriptor entry parameters based on the endpoint type. Add dwc2_gadget_config_nonisoc_xfer_ddma() function, which programs DDMA chain entries with corresponding values based on the received DMA

[PATCH v2 07/30] usb: dwc2: gadget: Add DMA descriptor chains for EP 0

2016-11-09 Thread John Youn
From: Vahram Aharonyan Update dwc2_hsotg structure to add descriptor chains for EP 0: two DMA descriptors for Setup phase, per one for IN/OUT data and status phases. Add their allocation function dwc2_gadget_alloc_ctrl_desc_chains() and its call during gadget probe.

[PATCH v2 15/30] usb: dwc2: gadget: Start DDMA IN status phase in StsPhseRcvd handler

2016-11-09 Thread John Youn
From: Vahram Aharonyan In DDMA mode of operation IN status phase of control write transfer should start after getting StsPhseRcvd interrupt. This interrupt is issued by HW once host starts to send IN tokens after data stage. Signed-off-by: Vahram Aharonyan

[PATCH v2 03/30] usb: dwc2: Make the DMA descriptor structure packed

2016-11-09 Thread John Youn
From: Vahram Aharonyan Make the DMA descriptor structure packed to guarantee alignment and size in memory. Signed-off-by: John Youn --- drivers/usb/dwc2/hw.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/dwc2/hw.h

[PATCH v2 04/30] usb: dwc2: gadget: Add descriptor DMA parameter

2016-11-09 Thread John Youn
From: Vahram Aharonyan Add a parameter for descriptor DMA and set it based on hardware capabilities. This won't actually be used by the gadget until later, when the descriptor DMA code is in place. Signed-off-by: Vahram Aharonyan Signed-off-by: John

[PATCH v2 02/30] usb: dwc2: Update DMA descriptor structure

2016-11-09 Thread John Youn
From: Vahram Aharonyan Rename DMA descriptor structure from dwc2_hcd_dma_desc to dwc2_dma_desc as it is applies to both host and gadget. Signed-off-by: Vahram Aharonyan Signed-off-by: John Youn --- drivers/usb/dwc2/hcd.c

[PATCH v2 06/30] usb: dwc2: gadget: Add DMA descriptor status quadlet fields

2016-11-09 Thread John Youn
From: Vahram Aharonyan Add device mode DMA transfer descriptor status quadlet field notations. Signed-off-by: Vahram Aharonyan Signed-off-by: John Youn --- drivers/usb/dwc2/hw.h | 37 + 1

Re: [PATCH V11 1/1] usb:serial: Add Fintek F81532/534 driver

2016-11-09 Thread Ji-Ze Hong (Peter Hong)
Hi Johan, Johan Hovold 於 2016/11/2 下午 08:37 寫道: On Fri, Oct 14, 2016 at 04:20:46PM +0800, Ji-Ze Hong (Peter Hong) wrote: Reviewed-by: Johan Hovold You must never add other peoples' Reviewed-by tags unless you've explicitly been given permission to do so (e.g. "fix this

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

2016-11-09 Thread Lu Baolu
Hi, On 11/09/2016 05:37 PM, Thomas Gleixner wrote: > On Tue, 1 Nov 2016, Lu Baolu wrote: >> +static void early_xdbc_write(struct console *con, const char *str, u32 n) >> +{ >> +int chunk, ret; >> +static char buf[XDBC_MAX_PACKET]; >> +int use_cr = 0; >> + >> +if (!xdbc.xdbc_reg)

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

2016-11-09 Thread Lu Baolu
Hi, On 11/09/2016 05:23 PM, Thomas Gleixner wrote: > On Tue, 1 Nov 2016, Lu Baolu wrote: >> +static int __init xdbc_init(void) >> +{ > ... >> +base = ioremap_nocache(xdbc.xhci_start, xdbc.xhci_length); >> +if (!base) { >> +xdbc_trace("failed to remap the io address\n"); >> +

[PATCH 1/2] usb: dwc3: gadget: Remove descriptor arguments to ep_enable

2016-11-09 Thread John Youn
The __dwc3_gadget_endpoint_enable() function has access to the endpoint descriptors via the usb_ep. So we don't need to pass them in as arguments. The descriptors should be set by the caller prior to calling usb_ep_enable(). Signed-off-by: John Youn ---

[PATCH 2/2] usb: dwc3: gadget: Remove descriptor arguments to ep_config

2016-11-09 Thread John Youn
This function has access to the descriptors via the usb_ep. Signed-off-by: John Youn --- drivers/usb/dwc3/gadget.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index 0e73383..4914182

Re: Multiple chatty devices on Intel 5 Series/3400 USB2 EHCI controller act erratic

2016-11-09 Thread sonofagun
Why didn't you say so (given that you were replying to a message that I sent)? Because I thought it would go to the correct existing subject on the first place. I don't know. What new subject are you referring to? Some days ago, the first two messages I have sent were not linked there:

Re: C-Media USB speakers do not work on AMD USB 2.0 port

2016-11-09 Thread sonofagun
Good question. I don't know the answer; it may be hidden in a part of the system log that you didn't post. Nothing unusual was found on the log. If you need more information, just tell me what you need. This is a known bug in the 4.8 kernel, caused by changes to the timer code. A

Re: [PATCH 02/30] usb: dwc2: Update DMA descriptor structure

2016-11-09 Thread John Youn
On 11/9/2016 4:18 AM, David Laight wrote: > From: John Youn >> Sent: 08 November 2016 22:30 > ... Also make it __packed. >>> >>> why are you making it packed? Does it _have_ to be packed? If it must, >>> why wasn't it before? >> >> We want to guarantee that it reflects the exact descriptor

Re: [PATCH 01/30] usb: dwc2: Deprecate g-use-dma binding

2016-11-09 Thread John Youn
On 11/8/2016 11:54 PM, Felipe Balbi wrote: > > Hi, > > John Youn writes: >> On 11/8/2016 1:12 AM, Felipe Balbi wrote: >>> >>> Hi, >>> >>> John Youn writes: Add a vendor prefix and make the name more consistent by renaming it to

Re: [PATCH] usb: dwc2: gadget: Update for new usb_endpoint_maxp()

2016-11-09 Thread John Youn
On 11/9/2016 12:02 AM, Felipe Balbi wrote: > > Hi, > > John Youn writes: >>> John Youn writes: > John Youn writes: @@ -1812,17 +1812,17 @@ static u32 dwc2_hsotg_ep0_mps(unsigned int mps) * @hsotg:

Re: [PATCH 2/4] usb: musb: Fix sleeping function called from invalid context for hdrc glue

2016-11-09 Thread Tony Lindgren
* Johan Hovold [161109 08:40]: > On Tue, Nov 08, 2016 at 06:26:07PM -0700, Tony Lindgren wrote: > > * Johan Hovold [161108 12:03]: > > > On Tue, Nov 08, 2016 at 10:34:13AM -0700, Tony Lindgren wrote: > > > > * Johan Hovold [161108 10:09]: >

Re: [PATCH] usb: musb: omap2430: make complain on -EPROBE_DEFER dev_dbg

2016-11-09 Thread Tony Lindgren
* Ladislav Michl [161109 07:11]: > There is no point having this complaint to be dev_err as it is just adding > noise to bootlog. Acked-by: Tony Lindgren > Signed-off-by: Ladislav Michl > --- > drivers/usb/musb/omap2430.c | 2 +- >

Re: [PATCH] usb: musb: omap2430: use dev_err

2016-11-09 Thread Tony Lindgren
* Ladislav Michl [161109 07:09]: > Replace pr_err with dev_err to print also device name. > > Signed-off-by: Ladislav Michl Acked-by: Tony Lindgren > --- > drivers/usb/musb/omap2430.c | 6 +++--- > 1 file changed, 3

Re: [PATCH] usb: musb: don't complain on -EPROBE_DEFER when initializing controller

2016-11-09 Thread Tony Lindgren
* Ladislav Michl [161109 07:08]: > Don't complain on -EPROBE_DEFER when initializing controller, > the driver probe will be retried later. > > Signed-off-by: Ladislav Michl Acked-by: Tony Lindgren > --- >

Re: [PATCH] usb: ehci-omap: don't complain on -EPROBE_DEFER when no PHY found

2016-11-09 Thread Tony Lindgren
* Ladislav Michl [161109 07:03]: > Don't complain on -EPROBE_DEFER when when no PHY found, the driver > probe will be retried later. Please send this directly to Alan and Greg: Acked-by: Tony Lindgren > Signed-off-by: Ladislav Michl

[PATCH 1/2] dma: cppi41: Fix list not empty warning on module removal

2016-11-09 Thread Tony Lindgren
If musb controller is configured with USB peripherals and we have enumerated with a USB host, we can get warnings on removal of the modules: WARNING: CPU: 0 PID: 1269 at drivers/dma/cppi41.c:391 cppi41_dma_free_chan_resources Fix the issue by adding the missing pm_runtime_get to

[PATCH 0/2] Two cpp41 pm runtime found when testing with usb

2016-11-09 Thread Tony Lindgren
Hi, I found two pm runtime issues when testing with usb on beaglebone. In the am335x case cppi41 and two instances of musb controller share the same interconnect wrapper module, so any pm issues with musb or cppi41 will keep the interconnect wrapper module busy. Regards, Tony Tony Lindgren

[PATCH 2/2] dma: cppi41: Fix unpaired pm runtime when only a USB hub is connected

2016-11-09 Thread Tony Lindgren
On am335x with musb host we can end up with unpaired pm runtime calls if a hub with no devices is connected and disconnected. This is because of the conditional pm runtime calls which are always a bad idea. Let's fix the issue by making them unconditional and paired in each function. Fixes:

Re: [PATCH v2 3/5] usb: dwc3: gadget: Write the event count in interrupt

2016-11-09 Thread Janusz Dziedzic
On 9 November 2016 at 09:05, Felipe Balbi wrote: > > Hi, > > John Youn writes: >>> + dwc3_writel(dwc->regs, DWC3_GEVNTCOUNT(0), count); >>> + > After that evt->buf[lpos, lpos + count] seems goes back to HW, so > thread should not

Re: [PATCH 2/4] usb: musb: Fix sleeping function called from invalid context for hdrc glue

2016-11-09 Thread Johan Hovold
On Wed, Nov 09, 2016 at 04:39:53PM +0100, Johan Hovold wrote: > On Tue, Nov 08, 2016 at 06:26:07PM -0700, Tony Lindgren wrote: > > @@ -2065,6 +2147,7 @@ musb_init_controller(struct device *dev, int nIrq, > > void __iomem *ctrl) > > } > > > > spin_lock_init(>lock); > > +

Re: [PATCH 2/4] usb: musb: Fix sleeping function called from invalid context for hdrc glue

2016-11-09 Thread Johan Hovold
On Wed, Nov 09, 2016 at 08:34:10AM -0700, Tony Lindgren wrote: > * Tony Lindgren [161108 18:26]: > > * Johan Hovold [161108 12:03]: > > +int musb_queue_resume_work(struct musb *musb, > > + int (*callback)(struct musb *musb, void *data), >

Re: [PATCH 2/4] usb: musb: Fix sleeping function called from invalid context for hdrc glue

2016-11-09 Thread Tony Lindgren
* Tony Lindgren [161108 18:26]: > * Johan Hovold [161108 12:03]: > +int musb_queue_resume_work(struct musb *musb, > +int (*callback)(struct musb *musb, void *data), > +void *data) > +{ > + struct

[PATCH v4] USB hub_probe: rework ugly goto-into-compound-statement

2016-11-09 Thread Eugene Korenevsky
Rework smelling code (goto inside compound statement). Perhaps this is legacy. Anyway such code is not appropriate for Linux kernel. Changes since v3: fix typo Changes since v2: extract the code to static function Changes since v1: fix spaces instead of tab, add missing 'Signed-off-by'

Re: [PATCH 2/4] usb: musb: Fix sleeping function called from invalid context for hdrc glue

2016-11-09 Thread Johan Hovold
On Tue, Nov 08, 2016 at 06:26:07PM -0700, Tony Lindgren wrote: > * Johan Hovold [161108 12:03]: > > On Tue, Nov 08, 2016 at 10:34:13AM -0700, Tony Lindgren wrote: > > > * Johan Hovold [161108 10:09]: > > > > On Mon, Nov 07, 2016 at 02:50:18PM -0700, Tony

Re: C-Media USB speakers do not work on AMD USB 2.0 port

2016-11-09 Thread Alan Stern
On Tue, 8 Nov 2016 sonofa...@openmailbox.org wrote: > My C-Media USB speakers do not work on Ubuntu 16.10 with 4.8.0 on my AMD > KABINI USB 2.0 port. Using Ubuntu 16.04 with 4.4.0 on the same machine > at the same port with the same cable fixes the issue. > If I put the speakers on any USB 3.0

Re: Multiple chatty devices on Intel 5 Series/3400 USB2 EHCI controller act erratic

2016-11-09 Thread Alan Stern
On Tue, 8 Nov 2016 sonofa...@openmailbox.org wrote: > > > I never had them in the first place. > Yes I know, the question was asked to the thread creator! Why didn't you say so (given that you were replying to a message that I sent)? > Why did the messages move to a new subject and were not

[PATCH] usb: musb: omap2430: use dev_err

2016-11-09 Thread Ladislav Michl
Replace pr_err with dev_err to print also device name. Signed-off-by: Ladislav Michl --- drivers/usb/musb/omap2430.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c index cc12254..451b372

[PATCH] usb: musb: omap2430: make complain on -EPROBE_DEFER dev_dbg

2016-11-09 Thread Ladislav Michl
There is no point having this complaint to be dev_err as it is just adding noise to bootlog. Signed-off-by: Ladislav Michl --- drivers/usb/musb/omap2430.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/musb/omap2430.c

[PATCH] usb: musb: don't complain on -EPROBE_DEFER when initializing controller

2016-11-09 Thread Ladislav Michl
Don't complain on -EPROBE_DEFER when initializing controller, the driver probe will be retried later. Signed-off-by: Ladislav Michl --- drivers/usb/musb/musb_core.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/usb/musb/musb_core.c

[PATCH] usb: ehci-omap: don't complain on -EPROBE_DEFER when no PHY found

2016-11-09 Thread Ladislav Michl
Don't complain on -EPROBE_DEFER when when no PHY found, the driver probe will be retried later. Signed-off-by: Ladislav Michl --- drivers/usb/host/ehci-omap.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/usb/host/ehci-omap.c

Re: [PATCH] usbnet: prevent device rpm suspend in usbnet_probe function

2016-11-09 Thread Bjørn Mork
Oliver Neukum writes: > On Tue, 2016-11-08 at 13:44 -0500, Alan Stern wrote: > >> These problems could very well be caused by running at SuperSpeed >> (USB-3) instead of high speed (USB-2). >> >> Is there any way to test what happens when the device is attached to >> the

RE: [PATCH 02/30] usb: dwc2: Update DMA descriptor structure

2016-11-09 Thread David Laight
From: John Youn > Sent: 08 November 2016 22:30 ... > >> Also make it __packed. > > > > why are you making it packed? Does it _have_ to be packed? If it must, > > why wasn't it before? > > We want to guarantee that it reflects the exact descriptor structure > in memory, so probably yes. It was

Re: [PATCH 1/2] USB: cdc-acm: fix invalid user-pointer check

2016-11-09 Thread Oliver Neukum
On Tue, 2016-11-08 at 13:28 +0100, Johan Hovold wrote: > Drop invalid user-pointer check from TIOCGSERIAL handler. > > A NULL-pointer can be valid in user space and copy_to_user() takes > care > of sanity checking. > > Signed-off-by: Johan Hovold Acked-by: Oliver Neukum

Re: [PATCH] usbnet: prevent device rpm suspend in usbnet_probe function

2016-11-09 Thread Oliver Neukum
On Tue, 2016-11-08 at 13:44 -0500, Alan Stern wrote: > These problems could very well be caused by running at SuperSpeed > (USB-3) instead of high speed (USB-2). > > Is there any way to test what happens when the device is attached to > the computer by a USB-2 cable? That would prevent it from

[PATCH 5/5] cdc-acm: handle read pipe errors

2016-11-09 Thread Ladislav Michl
Read urbs are submitted back only on success, causing read pipe running out of urbs after few errors. No more characters can be read from tty device then until it is reopened and no errors are reported. Fix that by always submitting urbs back and clearing stall on -EPIPE. Signed-off-by: Ladislav

[PATCH 4/5] cdc-acm: store in and out pipes in acm structure

2016-11-09 Thread Ladislav Michl
Clearing stall needs pipe descriptor, store it in acm structure. Signed-off-by: Ladislav Michl --- drivers/usb/class/cdc-acm.c | 27 ++- drivers/usb/class/cdc-acm.h | 1 + 2 files changed, 15 insertions(+), 13 deletions(-) diff --git

[PATCH 3/5] cdc-acm: refactor killing urbs

2016-11-09 Thread Ladislav Michl
Move urb killing code into separate function and use it instead of copying that code pattern over. Signed-off-by: Ladislav Michl --- drivers/usb/class/cdc-acm.c | 43 --- 1 file changed, 16 insertions(+), 27 deletions(-) diff --git

[PATCH 2/5] cdc-acm: avoid interface_to_usbdev call

2016-11-09 Thread Ladislav Michl
Pointer to usb_device is already stored in acm structure. Signed-off-by: Ladislav Michl --- drivers/usb/class/cdc-acm.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c index

[PATCH 1/5] cdc-acm: reindent log messages

2016-11-09 Thread Ladislav Michl
Signed-off-by: Ladislav Michl --- drivers/usb/class/cdc-acm.c | 35 +-- 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c index 78f0f85..b511289 100644 ---

Re: [PATCH] USB: serial: fix invalid user-pointer checks

2016-11-09 Thread Oliver Neukum
On Tue, 2016-11-08 at 16:41 +0100, Johan Hovold wrote: > On Tue, Nov 08, 2016 at 03:13:13PM +0100, Oliver Neukum wrote: > > On Tue, 2016-11-08 at 13:26 +0100, Johan Hovold wrote: > > > Drop invalid user-pointer checks from ioctl handlers. > > > > > > A NULL-pointer can be valid in user space and

Re: [PATCH] USB: serial: fix invalid user-pointer checks

2016-11-09 Thread Johan Hovold
On Wed, Nov 09, 2016 at 11:58:31AM +0100, Oliver Neukum wrote: > On Tue, 2016-11-08 at 16:41 +0100, Johan Hovold wrote: > > On Tue, Nov 08, 2016 at 03:13:13PM +0100, Oliver Neukum wrote: > > > On Tue, 2016-11-08 at 13:26 +0100, Johan Hovold wrote: > > > > Drop invalid user-pointer checks from

[PATCH 5/5] usb: dwc3: warn on once when no trbs

2016-11-09 Thread Janusz Dziedzic
Seems last time we hit few issues where we get trb_left = 0, mainly because of HWO bit still set in previous TRB. Add warn on once to catch/fix such problems much faster. Signed-off-by: Janusz Dziedzic --- drivers/usb/dwc3/gadget.c | 4 +++- 1 file changed, 3

[PATCH 1/5] usb: dwc3: decrement queued_requests

2016-11-09 Thread Janusz Dziedzic
In case we will fail to STARTTRANSFER we should also decrement queued_requests. Signed-off-by: Janusz Dziedzic --- drivers/usb/dwc3/gadget.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index

[PATCH 2/5] usb: dwc3: clean TRB if STARTTRANSFER fail

2016-11-09 Thread Janusz Dziedzic
In case STARTTRANSFER will fail, clean TRB. Seems HW in such case don't clean HWO bit. So, without this cleanup prev_trb still have HWO bit set. In my case (without patch), after first START failed: - dep->enqueue == 1 - dep->dequeue == 1 - prev_trb still have HWO set - left_trb() == 0 No way to

[PATCH 4/5] usb: dwc3: isoc clean DWC3_EP_PENDING_REQUEST flag

2016-11-09 Thread Janusz Dziedzic
After we kick_transfer we should clean DWC3_EP_PENDING_REQUEST endpoint flag. Signed-off-by: Janusz Dziedzic --- drivers/usb/dwc3/gadget.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index

[PATCH 3/5] usb: dwc3: fix post-increment

2016-11-09 Thread Janusz Dziedzic
Use pre-increment and set -ETIMEDOUT correctly. Signed-off-by: Janusz Dziedzic --- drivers/usb/dwc3/gadget.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index 19bea3b..0cd98c0 100644

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

2016-11-09 Thread Thomas Gleixner
On Tue, 1 Nov 2016, Lu Baolu wrote: > +static void early_xdbc_write(struct console *con, const char *str, u32 n) > +{ > + int chunk, ret; > + static char buf[XDBC_MAX_PACKET]; > + int use_cr = 0; > + > + if (!xdbc.xdbc_reg) > + return; > + memset(buf, 0,

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

2016-11-09 Thread Thomas Gleixner
On Tue, 1 Nov 2016, Lu Baolu wrote: > +static int __init xdbc_init(void) > +{ ... > + base = ioremap_nocache(xdbc.xhci_start, xdbc.xhci_length); > + if (!base) { > + xdbc_trace("failed to remap the io address\n"); > + ret = -ENOMEM; > + goto

Re: [PATCH v2 3/5] usb: dwc3: gadget: Write the event count in interrupt

2016-11-09 Thread Felipe Balbi
Hi, John Youn writes: >> + dwc3_writel(dwc->regs, DWC3_GEVNTCOUNT(0), count); >> + After that evt->buf[lpos, lpos + count] seems goes back to HW, so thread should not rely on this? Or I miss something? >>> >>> Hi, >>> >>> Yes, you're

Re: [PATCH] usb: dwc2: gadget: Update for new usb_endpoint_maxp()

2016-11-09 Thread Felipe Balbi
Hi, John Youn writes: >> John Youn writes: John Youn writes: >>> @@ -1812,17 +1812,17 @@ static u32 dwc2_hsotg_ep0_mps(unsigned int mps) >>> * @hsotg: The driver state. >>> * @ep: The index number of