Re: [PATCH v4 05/16] phy: qcom-qmp: Fix PHY block reset sequence

2018-01-12 Thread Vivek Gautam
On Fri, Jan 12, 2018 at 2:16 PM, Manu Gautam wrote: > Hi Vivek, > > > On 1/12/2018 2:14 PM, Vivek Gautam wrote: >> On Wed, Jan 3, 2018 at 4:58 PM, Manu Gautam wrote: >>> PHY block or asynchronous reset requires signal >>> to be asserted before

Re: [PATCH] usb: dwc2: Fix endless deferral probe

2018-01-12 Thread Arnd Bergmann
On Fri, Jan 12, 2018 at 9:06 AM, Stefan Wahren wrote: > Am 12.01.2018 um 00:32 schrieb Arnd Bergmann: >> On Wed, Jan 10, 2018 at 1:15 PM, Stefan Wahren >> diff --git a/drivers/phy/phy-core.c b/drivers/phy/phy-core.c >> index

Re: [PATCH v4 07/16] phy: qcom-qusb2: Add support for different register layouts

2018-01-12 Thread Vivek Gautam
On Wed, Jan 3, 2018 at 4:58 PM, Manu Gautam wrote: > New version of QUSB2 PHY has some registers offset changed. > Add support to have register layout for a target and update > the same in phy_configuration. > > Signed-off-by: Manu Gautam > ---

[PATCH] usb: gadget: ffs: Execute copy_to_user() with USER_DS set

2018-01-12 Thread Lars-Peter Clausen
When using a AIO read() operation on the function FS gadget driver a URB is submitted asynchronously and on URB completion the received data is copied to the userspace buffer associated with the read operation. This is done from a kernel worker thread invoking copy_to_user() (through

Re: [PATCH v2] USB: serial: option: add id for Motorola Solutions TETRA PEI

2018-01-12 Thread Greg KH
On Fri, Jan 12, 2018 at 09:27:15AM +0100, Max Schulze wrote: > Add Motorola Device ID and blacklist entry to the driver usb/serial/option > > Signed-off-by: Max Schulze > --- > v2: reformatted Patch, first version was declined by GK-H's Bot > > Thanks for the help, Johan!

[PATCH] usb: gadget: ffs: Let setup() return USB_GADGET_DELAYED_STATUS

2018-01-12 Thread Lars-Peter Clausen
Some UDC drivers (like the DWC3) expect that the response to a setup() request is queued from within the setup function itself so that it is available as soon as setup() has completed. Upon receiving a setup request the function fs driver creates an event that is made available to userspace. And

Re: [PATCH v4 09/16] phy: qcom-qusb2: Add support for QUSB2 V2 version

2018-01-12 Thread Vivek Gautam
On Wed, Jan 3, 2018 at 4:58 PM, Manu Gautam wrote: > Use register layout to add additional registers present > on QUSB2 PHY V2 version for PHY initialization. > Other than new registers on V2, following two register's > offset and bit definitions are different: POWERDOWN

[PATCH v3] USB: serial: option: add id for Motorola Solutions TETRA PEI

2018-01-12 Thread Max Schulze
Add Motorola Device ID and blacklist entry to the driver usb/serial/option The device responds with URB status: Broken pipe (-EPIPE) (-32) to URB setup requests for setting dtr/rts. So blacklisting to avoid the usb_wwan_send_setup in usb_wwan_dtr_rts of usb_wwan. Tested now to work with

[PATCH] usb: gadget: udc: renesas_usb3: fix oops in renesas_usb3_remove()

2018-01-12 Thread Yoshihiro Shimoda
This patch fixes an issue that the renesas_usb3_remove() causes NULL pointer dereference because the usb3_to_dev() macro will use the gadget instance and it will be deleted before. Fixes: cf06df3fae28 ("usb: gadget: udc: renesas_usb3: move pm_runtime_{en,dis}able()") Signed-off-by: Yoshihiro

Re: [PATCH] usb: gadget: ffs: Let setup() return USB_GADGET_DELAYED_STATUS

2018-01-12 Thread Felipe Balbi
Hi, Lars-Peter Clausen writes: > Some UDC drivers (like the DWC3) expect that the response to a setup() not some, but *all*. You can only queue a response later IFF you return USB_GADGET_DELAYED_STATUS. > request is queued from within the setup function itself so that it is >

Re: [PATCH] usb: gadget: ffs: Let setup() return USB_GADGET_DELAYED_STATUS

2018-01-12 Thread Felipe Balbi
Hi, Lars-Peter Clausen writes: >> Lars-Peter Clausen writes: >>> Some UDC drivers (like the DWC3) expect that the response to a setup() >> >> not some, but *all*. You can only queue a response later IFF you return >> USB_GADGET_DELAYED_STATUS. > > Yeah, but

Re: [PATCH v2] PM / runtime: Rework pm_runtime_force_suspend/resume()

2018-01-12 Thread Rafael J. Wysocki
On Friday, January 12, 2018 12:26:56 PM CET Geert Uytterhoeven wrote: > Hi Rafael, > > On Tue, Jan 9, 2018 at 5:28 PM, Rafael J. Wysocki wrote: > > On Tuesday, January 9, 2018 5:03:18 PM CET Rafael J. Wysocki wrote: > >> On Tue, Jan 9, 2018 at 4:30 PM, Geert Uytterhoeven

Re: [PATCH v2] PM / runtime: Rework pm_runtime_force_suspend/resume()

2018-01-12 Thread Geert Uytterhoeven
Hi Rafael, On Tue, Jan 9, 2018 at 5:28 PM, Rafael J. Wysocki wrote: > On Tuesday, January 9, 2018 5:03:18 PM CET Rafael J. Wysocki wrote: >> On Tue, Jan 9, 2018 at 4:30 PM, Geert Uytterhoeven >> wrote: >> > On Tue, Jan 9, 2018 at 4:00 PM, Rafael J.

Re: [PATCH] usb: gadget: ffs: Let setup() return USB_GADGET_DELAYED_STATUS

2018-01-12 Thread Lars-Peter Clausen
On 01/12/2018 12:26 PM, Felipe Balbi wrote: > > Hi, > > Lars-Peter Clausen writes: >> Some UDC drivers (like the DWC3) expect that the response to a setup() > > not some, but *all*. You can only queue a response later IFF you return > USB_GADGET_DELAYED_STATUS. Yeah, but most

Re: [PATCH v2] usb: uhci: Add clk support to uhci-platform

2018-01-12 Thread Alan Stern
On Fri, 12 Jan 2018, Benjamin Herrenschmidt wrote: > The Aspeed SoCs use uhci-platform. With the new dynamic clock > control framework, the corresponding IP block clock must be > properly enabled. > > This is a simplified variant of what ehci-platform does, it > looks for *one* clock attached to

Re: [PATCH v3 1/3] usb/gadget: Fix "high bandwidth" check in usb_gadget_ep_match_desc()

2018-01-12 Thread Alan Stern
On Fri, 12 Jan 2018, Benjamin Herrenschmidt wrote: > The current code tries to test for bits that are masked out by > usb_endpoint_maxp(). Instead, use the proper accessor to access > the new high bandwidth bits. > > Signed-off-by: Benjamin Herrenschmidt > ---

[PATCH] usb: xhci-mtk: fix semicolon.cocci warnings

2018-01-12 Thread kbuild test robot
From: Fengguang Wu drivers/usb/host/xhci-mtk.c:311:2-3: Unneeded semicolon Remove unneeded semicolon. Generated by: scripts/coccinelle/misc/semicolon.cocci Fixes: a2ecc4df9f84 ("usb: xhci-mtk: supports remote wakeup for mt2712 with two xHCI IPs") CC: Chunfeng Yun

Re: [PATCH] usb: dwc2: Fix endless deferral probe

2018-01-12 Thread Arnd Bergmann
On Fri, Jan 12, 2018 at 6:51 PM, Mauro Carvalho Chehab wrote: > Em Fri, 12 Jan 2018 10:18:59 +0100 > Arnd Bergmann escreveu: > >> On Fri, Jan 12, 2018 at 9:06 AM, Stefan Wahren >> wrote: >> > Am 12.01.2018 um 00:32 schrieb Arnd

[PATCH] usb: gadget: f_uac2: fix bFirstInterface in composite gadget

2018-01-12 Thread John Keeping
If there are multiple functions associated with a configuration, then the UAC2 interfaces may not start at zero. Set the correct first interface number in the association descriptor so that the audio interfaces are enumerated correctly in this case. Signed-off-by: John Keeping

[PATCH] usb: mtu3: fix semicolon.cocci warnings

2018-01-12 Thread kbuild test robot
From: Fengguang Wu drivers/usb/mtu3/mtu3_host.c:58:2-3: Unneeded semicolon Remove unneeded semicolon. Generated by: scripts/coccinelle/misc/semicolon.cocci Fixes: f0ede2c6282b ("usb: mtu3: supports remote wakeup for mt2712 with two SSUSB IPs") CC: Chunfeng Yun

Re: [PATCH v3] USB: serial: option: add id for Motorola Solutions TETRA PEI

2018-01-12 Thread Johan Hovold
On Fri, Jan 12, 2018 at 10:29:54AM +0100, Max Schulze wrote: > Add Motorola Device ID and blacklist entry to the driver usb/serial/option > > The device responds with URB status: Broken pipe (-EPIPE) (-32) > to URB setup requests for setting dtr/rts. This indicates that option isn't the right

[GIT PULL] USB-serial updates for v4.16-rc1

2018-01-12 Thread Johan Hovold
The following changes since commit 4fbd8d194f06c8a3fd2af1ce560ddb31f7ec8323: Linux 4.15-rc1 (2017-11-26 16:01:47 -0800) are available in the Git repository at: https://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial.git tags/usb-serial-4.16-rc1 for you to fetch changes up to

Re: [PATCH] usb: dwc2: Fix endless deferral probe

2018-01-12 Thread Mauro Carvalho Chehab
Em Fri, 12 Jan 2018 10:18:59 +0100 Arnd Bergmann escreveu: > On Fri, Jan 12, 2018 at 9:06 AM, Stefan Wahren wrote: > > Am 12.01.2018 um 00:32 schrieb Arnd Bergmann: > >> On Wed, Jan 10, 2018 at 1:15 PM, Stefan Wahren > > >>

[PATCH 4/4] usb: gadget: fotg210-udc: Fix a potential invalid pointer dereference

2018-01-12 Thread Christophe JAILLET
We should not call 'fotg210_ep_free_request()' with NULL as a 2nd parameter. Depending of the layout of 'struct fotg210_request', this could lead to an un-expected behavior. So, if 'fotg210_ep_alloc_request()' fails, we should return directly. This also gives the opportunity to further simplify

[PATCH 3/4] usb: gadget: fotg210-udc: Simplify code

2018-01-12 Thread Christophe JAILLET
Use 'devm_kzalloc()' and 'devm_ioremap()' to simplify code. While at it, turn some '== NULL' into shorter '!' when testing memory allocation failure. Signed-off-by: Christophe JAILLET --- drivers/usb/gadget/udc/fotg210-udc.c | 25 - 1 file

[PATCH 1/4] usb: gadget: fotg210-udc: Remove a useless

2018-01-12 Thread Christophe JAILLET
There is no need to use an intermediate array for these memory allocations, so, axe it. While at it, turn a '== NULL' into a shorter '!' when testing memory allocation failure. Signed-off-by: Christophe JAILLET --- drivers/usb/gadget/udc/fotg210-udc.c | 6 ++

[PATCH 2/4] usb: gadget: fotg210-udc: Fix a memory leak

2018-01-12 Thread Christophe JAILLET
The memory referenced by the 'fotg210->ep[]' array, is never freed. So there is a memory leak in the error handling path of the probe function and when the driver is unloaded. Use 'devm_kzalloc()' to fix these leaks. Signed-off-by: Christophe JAILLET ---

Re: dvb usb issues since kernel 4.9

2018-01-12 Thread Eric Dumazet
On Fri, 2018-01-12 at 19:13 -0200, Mauro Carvalho Chehab wrote: > > > The .config file used to build the Kernel is at: > https://pastebin.com/wpZghann > Hi Mauro Any chance you can try CONFIG_HZ_1000=y, CONFIG_HZ=1000 ? Thanks. -- To unsubscribe from this list: send the line

[PATCH v3] usb: uhci: Add clk support to uhci-platform

2018-01-12 Thread Benjamin Herrenschmidt
The Aspeed SoCs use uhci-platform. With the new dynamic clock control framework, the corresponding IP block clock must be properly enabled. This is a simplified variant of what ehci-platform does, it looks for *one* clock attached to the device, and if it's there, enables it. Signed-off-by:

[PATCH v3 1/2] usb: dwc3: gadget: Set maxpacket size for ep0 IN

2018-01-12 Thread Thinh Nguyen
There are 2 control endpoint structures for DWC3. However, the driver only updates the OUT direction control endpoint structure during ConnectDone event. DWC3 driver needs to update the endpoint max packet size for control IN endpoint as well. If the max packet size is not properly set, then the

[PATCH v3 2/2] usb: dwc3: ep0: Reset TRB counter for ep0 IN

2018-01-12 Thread Thinh Nguyen
DWC3 tracks TRB counter for each ep0 direction separately. In control read transfer completion handler, the driver needs to reset the TRB enqueue counter for ep0 IN direction. Currently the driver only resets the TRB counter for control OUT endpoint. Check for the data direction and properly reset

[PATCH v3 0/2] usb: dwc3: Properly update ep0 for IN direction

2018-01-12 Thread Thinh Nguyen
This patch series fixes an issue with HS/FS 3-stage control read transfer where DWC3 incorrectly check when to send ZLP. Changes in v3: - Add 'Fixes:' tags - Minor update to commit message for clarity Changes in v2: - Separate from "usb: dwc3: Add new updates for DWC_usb31" patch series -

Re: [PATCH v2] usb: uhci: Add clk support to uhci-platform

2018-01-12 Thread Alan Stern
On Sat, 13 Jan 2018, Benjamin Herrenschmidt wrote: > On Sat, 2018-01-13 at 09:28 +1100, Benjamin Herrenschmidt wrote: > > On Fri, 2018-01-12 at 10:52 -0500, Alan Stern wrote: > > > > > > As Sergei mentioned, please be consistent in the use of tabs vs. > > > spaces. > > > > > > Do you have to

Re: [PATCH v3] usb: uhci: Add clk support to uhci-platform

2018-01-12 Thread Alan Stern
On Sat, 13 Jan 2018, Benjamin Herrenschmidt wrote: > The Aspeed SoCs use uhci-platform. With the new dynamic clock > control framework, the corresponding IP block clock must be > properly enabled. > > This is a simplified variant of what ehci-platform does, it > looks for *one* clock attached to

Re: [PATCH] usb: mtu3: fix semicolon.cocci warnings

2018-01-12 Thread Chunfeng Yun
On Sat, 2018-01-13 at 01:18 +0800, kbuild test robot wrote: > From: Fengguang Wu > > drivers/usb/mtu3/mtu3_host.c:58:2-3: Unneeded semicolon > > > Remove unneeded semicolon. > > Generated by: scripts/coccinelle/misc/semicolon.cocci > > Fixes: f0ede2c6282b ("usb:

Re: [PATCH] usb: xhci-mtk: fix semicolon.cocci warnings

2018-01-12 Thread Chunfeng Yun
On Sat, 2018-01-13 at 01:46 +0800, kbuild test robot wrote: > From: Fengguang Wu > > drivers/usb/host/xhci-mtk.c:311:2-3: Unneeded semicolon > > > Remove unneeded semicolon. > > Generated by: scripts/coccinelle/misc/semicolon.cocci > > Fixes: a2ecc4df9f84 ("usb:

Re: [PATCH v3] usb: uhci: Add clk support to uhci-platform

2018-01-12 Thread Benjamin Herrenschmidt
On Fri, 2018-01-12 at 22:35 -0500, Alan Stern wrote: > On Sat, 13 Jan 2018, Benjamin Herrenschmidt wrote: > > > The Aspeed SoCs use uhci-platform. With the new dynamic clock > > control framework, the corresponding IP block clock must be > > properly enabled. > > > > This is a simplified variant

Re: [PATCH] usb: uhci: Add clk support to uhci-platform

2018-01-12 Thread Benjamin Herrenschmidt
On Fri, 2018-01-12 at 10:35 +0300, Sergei Shtylyov wrote: > Hello! > > On 1/12/2018 8:51 AM, Benjamin Herrenschmidt wrote: > > > The Aspeed SoCs use uhci-platform. With the new dynamic clock > > control framework, the corresponding IP block clock must be > > properly enabled. > > > > This is a

Re: [PATCH v3 1/3] usb/gadget: Fix "high bandwidth" check in usb_gadget_ep_match_desc()

2018-01-12 Thread Benjamin Herrenschmidt
On Fri, 2018-01-12 at 10:53 -0500, Alan Stern wrote: > On Fri, 12 Jan 2018, Benjamin Herrenschmidt wrote: > > > The current code tries to test for bits that are masked out by > > usb_endpoint_maxp(). Instead, use the proper accessor to access > > the new high bandwidth bits. > > > >

Re: [PATCH v2] usb: uhci: Add clk support to uhci-platform

2018-01-12 Thread Benjamin Herrenschmidt
On Fri, 2018-01-12 at 10:52 -0500, Alan Stern wrote: > > As Sergei mentioned, please be consistent in the use of tabs vs. > spaces. > > Do you have to worry about EPROBE_DEFER errors at any point? I don't think so, not on the SoC I'm using but it might be worthwhile adding support for it just

Re: dvb usb issues since kernel 4.9

2018-01-12 Thread Mauro Carvalho Chehab
Em Tue, 9 Jan 2018 09:48:47 -0800 Linus Torvalds escreveu: > On Tue, Jan 9, 2018 at 9:27 AM, Eric Dumazet wrote: > > > > So yes, commit 4cd13c21b207 ("softirq: Let ksoftirqd do its job") has > > shown up multiple times in various 'regressions'

[PATCH 0/4] usb: gadget: fotg210-udc: Fixes and cleanup

2018-01-12 Thread Christophe JAILLET
This serie aims to fix 2 issues. (path 2 & 4) The 2nd patch fixes a memory leak. It uses devm_ function a simplify the handling of the memory. The 4th patch fixes a potential invalid pointer dereference. The 2 other ones, are just clean-ups to remove useless code and add other uses of devm_

Re: [PATCH v2] usb: uhci: Add clk support to uhci-platform

2018-01-12 Thread Benjamin Herrenschmidt
On Sat, 2018-01-13 at 09:28 +1100, Benjamin Herrenschmidt wrote: > On Fri, 2018-01-12 at 10:52 -0500, Alan Stern wrote: > > > > As Sergei mentioned, please be consistent in the use of tabs vs. > > spaces. > > > > Do you have to worry about EPROBE_DEFER errors at any point? > > I don't think

Re: [PATCH v4 04/16] phy: qcom-qusb2: Power-on PHY before initialization

2018-01-12 Thread Vivek Gautam
On Wed, Jan 3, 2018 at 4:58 PM, Manu Gautam wrote: > PHY must be powered on before turning ON clocks and > attempting to initialize it. Driver is exposing > separate init and power_on routines for this. > Apparently USB dwc3 core driver performs power-on > after init.

[PATCH v2] USB: serial: option: add id for Motorola Solutions TETRA PEI

2018-01-12 Thread Max Schulze
Add Motorola Device ID and blacklist entry to the driver usb/serial/option Signed-off-by: Max Schulze --- v2: reformatted Patch, first version was declined by GK-H's Bot Thanks for the help, Johan! To an URB setup request from the host bmRequestType: 0x21 bRequest: 34

Re: [PATCH v2 1/2] usb: dwc3: gadget: Set maxpacket size for ep0 IN

2018-01-12 Thread Felipe Balbi
Hi, Thinh Nguyen writes: > Hi, > > On 1/11/2018 12:16 AM, Felipe Balbi wrote: >> >> Hi, >> >> Thinh Nguyen writes: >>> There are 2 control endpoint structures for DWC3. However, the driver >>> only updates the OUT direction control

Re: [PATCH v4 03/16] phy: qcom-qmp: Power-on PHY before initialization

2018-01-12 Thread Vivek Gautam
On Wed, Jan 3, 2018 at 4:58 PM, Manu Gautam wrote: > PHY regulators which are enabled from power_on() must be ON > before turning-on clocks and initializing it as part of init(). > As most of the core drivers perform power_on() after init(), move > PHY regulators enable to

Re: [PATCH v4 05/16] phy: qcom-qmp: Fix PHY block reset sequence

2018-01-12 Thread Vivek Gautam
On Wed, Jan 3, 2018 at 4:58 PM, Manu Gautam wrote: > PHY block or asynchronous reset requires signal > to be asserted before de-asserting. Driver is only > de-asserting signal which is already low, hence > reset operation is a no-op. Fix this by asserting > signal first.

Re: [PATCH v4 05/16] phy: qcom-qmp: Fix PHY block reset sequence

2018-01-12 Thread Manu Gautam
Hi Vivek, On 1/12/2018 2:14 PM, Vivek Gautam wrote: > On Wed, Jan 3, 2018 at 4:58 PM, Manu Gautam wrote: >> PHY block or asynchronous reset requires signal >> to be asserted before de-asserting. Driver is only >> de-asserting signal which is already low, hence >> reset

Re: [PATCH] usb: dwc2: Fix endless deferral probe

2018-01-12 Thread Stefan Wahren
Am 12.01.2018 um 00:32 schrieb Arnd Bergmann: On Wed, Jan 10, 2018 at 1:15 PM, Stefan Wahren wrote: Hi Arnd, Am 09.01.2018 um 22:33 schrieb Arnd Bergmann: On Tue, Jan 9, 2018 at 8:28 PM, Stefan Wahren wrote: The dwc2 USB driver tries to

Re: [PATCH] usb: gadget: ffs: Let setup() return USB_GADGET_DELAYED_STATUS

2018-01-12 Thread Lars-Peter Clausen
On 01/12/2018 01:01 PM, Felipe Balbi wrote: This fixed random occasional failures that were previously observed on a DWC3 based system under high system load. >>> >>> I need to see tracepoint capture from the failure ;-) Care to send them >>> to me for analysis? >> >> I've attached the