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

2016-11-07 Thread Kai-Heng Feng
Hi, On Mon, Nov 7, 2016 at 7:02 PM, Oliver Neukum wrote: > On Fri, 2016-11-04 at 17:57 +0800, Kai-Heng Feng wrote: >> Sometimes cdc_mbim failed to probe if runtime pm is enabled: >> [9.305626] cdc_mbim: probe of 2-2:1.12 failed with error -22 >> >> This can be solved by

Re: [PATCH] usb: renesas_usbhs: simplify list handling

2016-11-07 Thread Nicholas Mc Guire
On Tue, Nov 08, 2016 at 12:26:45PM +0900, Masahiro Yamada wrote: > >> Fixes: 6acb95d4e070 ("usb: renesas_usbhs: modify packet queue control > >> method") > > > This is not a fix, but a clean-up patch. true - I´ve been using it incorrectly to basically just record the origin of the issue found

Re: [PATCH v3 2/2] USB hub_probe: put initialization before usage

2016-11-07 Thread Greg Kroah-Hartman
On Mon, Nov 07, 2016 at 09:55:09PM +0300, Eugene Korenevsky wrote: > Minor optimization: move initialization immediately before usage. > This gives a chance for more accurate register allocation by the compiler. This is a probe function, a very slow path. Don't do micro optimizations where they

Re: [PATCH v3 1/2] USB hub_probe: rework ugly goto-into-compound-statement

2016-11-07 Thread Greg Kroah-Hartman
On Mon, Nov 07, 2016 at 09:53:50PM +0300, Eugene Korenevsky wrote: > Rework smelling code (goto inside compound statement). Perhaps this is > legacy. Anyway such code is not appropriate for Linux kernel. > > Signed-off-by: Eugene Korenevsky > --- > drivers/usb/core/hub.c

Re: [PATCH v3 1/2] USB hub_probe: rework ugly goto-into-compound-statement

2016-11-07 Thread Greg Kroah-Hartman
On Mon, Nov 07, 2016 at 09:53:50PM +0300, Eugene Korenevsky wrote: > Rework smelling code (goto inside compound statement). Perhaps this is > legacy. Anyway such code is not appropriate for Linux kernel. > > Signed-off-by: Eugene Korenevsky > --- > drivers/usb/core/hub.c

Re: [PATCH v4] Net Driver: Add Cypress GX3 VID=04b4 PID=3610.

2016-11-07 Thread Greg KH
On Mon, Nov 07, 2016 at 04:44:20PM -0600, Chris Roth wrote: > From: Allan Chou > > Add support for Cypress GX3 SuperSpeed to Gigabit Ethernet > Bridge Controller (Vendor=04b4 ProdID=3610). > > Patch verified on x64 linux kernel 4.7.4, 4.8.6, 4.9-rc4 systems > with the

Re: [PATCH] usb: renesas_usbhs: simplify list handling

2016-11-07 Thread Masahiro Yamada
>> Fixes: 6acb95d4e070 ("usb: renesas_usbhs: modify packet queue control >> method") This is not a fix, but a clean-up patch. >> Signed-off-by: Nicholas Mc Guire >> --- >> Found by simple coccinelle scanner >> >> Compile tested with: multi_v7_defconfig (implies >>

[PATCH v9 5/8] usb: chipidea: let chipidea core device of_node equal's glue layer device of_node

2016-11-07 Thread Peter Chen
From: Peter Chen At device tree, we have no device node for chipidea core, the glue layer's node is the parent node for host and udc device. But in related driver, the parent device is chipidea core. So, in order to let the common driver get parent's node, we let the

[PATCH v9 3/8] binding-doc: usb: usb-device: add optional properties for power sequence

2016-11-07 Thread Peter Chen
Add optional properties for power sequence. Signed-off-by: Peter Chen Acked-by: Rob Herring --- Documentation/devicetree/bindings/usb/usb-device.txt | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git

[PATCH v9 7/8] ARM: dts: imx6qdl-udoo.dtsi: fix onboard USB HUB property

2016-11-07 Thread Peter Chen
The current dts describes USB HUB's property at USB controller's entry, it is improper. The USB HUB should be the child node under USB controller, and power sequence properties are under it. Besides, using gpio pinctrl setting for USB2415's reset pin. Signed-off-by: Peter Chen

[PATCH v9 6/8] ARM: dts: imx6qdl: Enable usb node children with

2016-11-07 Thread Peter Chen
From: Joshua Clayton Give usb nodes #address and #size attributes, so that a child node representing a permanently connected device such as an onboard hub may be addressed with a attribute Signed-off-by: Joshua Clayton Signed-off-by: Peter

[PATCH v9 2/8] power: add power sequence library

2016-11-07 Thread Peter Chen
We have an well-known problem that the device needs to do some power sequence before it can be recognized by related host, the typical example like hard-wired mmc devices and usb devices. This power sequence is hard to be described at device tree and handled by related host driver, so we have

[PATCH v9 8/8] ARM: dts: imx6q-evi: Fix onboard hub reset line

2016-11-07 Thread Peter Chen
From: Joshua Clayton Previously the onboard hub was made to work by treating its reset gpio as a regulator enable. Get rid of that kludge now that pwseq has added reset gpio support Move pin muxing the hub reset pin into the usbh1 group Signed-off-by: Joshua Clayton

[PATCH v9 4/8] usb: core: add power sequence handling for USB devices

2016-11-07 Thread Peter Chen
Some hard-wired USB devices need to do power sequence to let the device work normally, the typical power sequence like: enable USB PHY clock, toggle reset pin, etc. But current Linux USB driver lacks of such code to do it, it may cause some hard-wired USB devices works abnormal or can't be

[PATCH v9 1/8] binding-doc: power: pwrseq-generic: add binding doc for generic power sequence library

2016-11-07 Thread Peter Chen
Add binding doc for generic power sequence library. Signed-off-by: Peter Chen Acked-by: Philipp Zabel Acked-by: Rob Herring --- .../bindings/power/pwrseq/pwrseq-generic.txt | 48 ++ 1 file changed, 48

[PATCH v9 0/8] power: add power sequence library

2016-11-07 Thread Peter Chen
Hi all, This is a follow-up for my last power sequence framework patch set [1]. According to Rob Herring and Ulf Hansson's comments[2]. The kinds of power sequence instances will be added at postcore_initcall, the match criteria is compatible string first, if the compatible string is not matched

[PATCH v2 1/1] usb: gadget: f_uac2: fix error handling at afunc_bind

2016-11-07 Thread Peter Chen
The current error handling flow uses incorrect goto label, fix it Cc: Fixes: d12a8727171c ("usb: gadget: function: Remove redundant usb_free_all_descriptors") Signed-off-by: Peter Chen --- Changes for v2: - Delete changes for improving error

RE: [PATCH] usb: renesas_usbhs: simplify list handling

2016-11-07 Thread Yoshihiro Shimoda
Hi, > From: Nicholas Mc Guire > Sent: Tuesday, November 08, 2016 4:07 AM > > The current code is effectively equivalent to list_first_entry_or_null() > so simply switch and simplify the code. > > Fixes: 6acb95d4e070 ("usb: renesas_usbhs: modify packet queue control method") > Signed-off-by:

[PATCH v3 00/10] Add DT support for ohci-da8xx

2016-11-07 Thread Axel Haslam
The purpose of this patch series is to add DT support for the davinci ohci driver. To be able to use device tree to probe the driver, we need to remove the platform callbacks that are handling vbus and over current. The first four patches prepare the stage by allowing to use a regulator instead

[PATCH v2 1/1] usb: gadget: fix request length error for isoc transfer

2016-11-07 Thread Peter Chen
For isoc endpoint descriptor, the wMaxPacketSize is not real max packet size (see Table 9-13. Standard Endpoint Descriptor, USB 2.0 specifcation), it may contain the number of packet, so the real max packet should be ep->desc->wMaxPacketSize && 0x7ff. Cc: Felipe F. Tonello

Re: [PATCH] usb: gadget: u_ether: remove interrupt throttling

2016-11-07 Thread Peter Chen
On Mon, Nov 07, 2016 at 02:36:51PM +0200, Felipe Balbi wrote: > > Hi, > > Peter Chen writes: > >> Peter Chen writes: > >> >> > Peter Chen writes: > >> >> > > On Wed, Nov 02, 2016 at 11:22:54AM -0400, David Miller wrote: > >>

[PATCH v3 02/10] USB: ohci: da8xx: Prepare to remove platform callbacks

2016-11-07 Thread Axel Haslam
Wrap the platform data callbacks into separate functions. This will help migrate to using a regulator by providing a well defined place to implement the regulator functions while the platform calls are still in place and users have not been converted. The platform callbacks will be removed on a

[PATCH v4] Net Driver: Add Cypress GX3 VID=04b4 PID=3610.

2016-11-07 Thread Chris Roth
From: Allan Chou Add support for Cypress GX3 SuperSpeed to Gigabit Ethernet Bridge Controller (Vendor=04b4 ProdID=3610). Patch verified on x64 linux kernel 4.7.4, 4.8.6, 4.9-rc4 systems with the Kensington SD4600P USB-C Universal Dock with Power, which uses the Cypress GX3

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

2016-11-07 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 22/30] usb: dwc2: gadget: Adjust ISOC OUT request's actual len for DDMA

2016-11-07 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 21/30] usb: dwc2: gadget: Add start and complete calls for DDMA ISOC

2016-11-07 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 27/30] usb: dwc2: Add support of dedicated full-speed PHY interface

2016-11-07 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 29/30] usb: dwc2: gadget: Program ep0_mps for LS

2016-11-07 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 25/30] usb: dwc2: gadget: Correct dwc2_hsotg_ep_stop_xfr() function

2016-11-07 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 28/30] usb: dwc2: gadget: Add IOT device IDs, configure core accordingly

2016-11-07 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 24/30] usb: dwc2: gadget: For DDMA parse setup only after SetUp interrupt

2016-11-07 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 26/30] usb: dwc2: gadget: Disable enabled HW endpoint in dwc2_hsotg_ep_disable

2016-11-07 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 23/30] usb: dwc2: gadget: Adjustments in debug prints

2016-11-07 Thread John Youn
From: Vahram Aharonyan During USB CV tests found timing issues in Slave mode caused by amount of data printed out to the console. Changed WARNON statement by dev_warn in dwc2_hsotg_init_fifo() and dev_info by dev_dbg in dwc2_hsotg_ep_sethalt(). Signed-off-by: Vahram

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

2016-11-07 Thread John Youn
From: Vahram Aharonyan Corrected unmasking of StsPhseRcvd interrupt not to be performed during gadget initialization if operating in Slave mode. Also moved StsPhsRcvd interrupt checking in endpoint interrupt handler to correspond HW databook register field sequence.

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

2016-11-07 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 12/30] usb: dwc2: gadget: DDMA transfer start and complete

2016-11-07 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 15/30] usb: dwc2: gadget: Enable descriptor DMA mode

2016-11-07 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 20/30] usb: dwc2: gadget: In DDMA keep incompISOOUT and incompISOIN masked

2016-11-07 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 18/30] usb: dwc2: gadget: Fill isoc descriptor and start transfer in DDMA

2016-11-07 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 14/30] usb: dwc2: gadget: Start DDMA IN status phase in StsPhseRcvd handler

2016-11-07 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 19/30] usb: dwc2: gadget: Add completions for DDMA isoc transfers

2016-11-07 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 16/30] usb: dwc2: Enable gadget DDMA by default for HAPS

2016-11-07 Thread John Youn
Enables the gadget descriptor DMA mode by default in the HAPS PCI driver. Signed-off-by: John Youn --- drivers/usb/dwc2/pci.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/dwc2/pci.c b/drivers/usb/dwc2/pci.c index 46a9d2b..57e4d82f 100644 ---

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

2016-11-07 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 08/30] usb: dwc2: gadget: Transfer length limit checking for DDMA

2016-11-07 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 09/30] usb: dwc2: gadget: Add DDMA chain pointers to dwc2_hsotg_ep structure

2016-11-07 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 | 36

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

2016-11-07 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 11/30] usb: dwc2: gadget: EP 0 specific DDMA programming

2016-11-07 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 05/30] usb: dwc2: gadget: Enable BNA interrupt in descriptor DMA mode

2016-11-07 Thread John Youn
From: Vahram Aharonyan Update endpoint related register descriptions to add DOEPMSK_BNAMSK. Add BNA interrupt's unmasking during gadget initalization if descriptor DMA mode is selected. Signed-off-by: Vahram Aharonyan Signed-off-by: John Youn

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

2016-11-07 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. Also make it __packed. Signed-off-by: Vahram Aharonyan Signed-off-by: John Youn ---

[PATCH 03/30] usb: dwc2: gadget: Add descriptor DMA binding

2016-11-07 Thread John Youn
From: Vahram Aharonyan Add the devicetree binding to enable descriptor DMA and read it in to the corresponding parameter during probe. Signed-off-by: Vahram Aharonyan Signed-off-by: John Youn ---

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

2016-11-07 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

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

2016-11-07 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 00/30] usb: dwc2: Gadget descriptor DMA and IOT

2016-11-07 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 01/30] usb: dwc2: Deprecate g-use-dma binding

2016-11-07 Thread John Youn
Add a vendor prefix and make the name more consistent by renaming it to "snps,gadget-dma-enable". Signed-off-by: John Youn --- Documentation/devicetree/bindings/usb/dwc2.txt | 5 - arch/arm/boot/dts/rk3036.dtsi | 2 +- arch/arm/boot/dts/rk3288.dtsi

[PATCH 3/4] usb: musb: Fix PM for hub disconnect

2016-11-07 Thread Tony Lindgren
With a USB hub disconnected, devctl can be 0x19 for about a second on am335x and will stay forever on at least omap3. And we get no further interrupts when devctl session bit clears. This keeps PM runtime active. Let's fix the issue by polling devctl until the session bit clears or times out. We

[PATCH 4/4] phy: twl4030-usb: Fix for musb session bit based PM

2016-11-07 Thread Tony Lindgren
Now with musb driver implementing generic session bit based PM, we need to have the USB PHYs behaving in a sane way for platforms implementing PM. Currently twl4030-usb enables PM in twl4030_phy_power_on() and then disables it in twl4030_phy_power_off(). This will block PM runtime for the SoC

[PATCH 0/4] musb fixes for v4.9-rc cycle

2016-11-07 Thread Tony Lindgren
Hi all, Here are musb fixes for the issues that I've been able to track down. Not sure if these will help with the problem Ladis was seeing as I'm not able to reproduce that one it seems. As many people depend on this driver I'd like to have these merged for v4.9-rc cycle after review and

[PATCH 1/4] usb: musb: Fix broken use of static variable for multiple instances

2016-11-07 Thread Tony Lindgren
We can't use static variable first for checking when musb is initialized when we have multiple musb instances like on am335x. Signed-off-by: Tony Lindgren --- drivers/usb/musb/musb_core.c | 9 + drivers/usb/musb/musb_core.h | 2 ++ 2 files changed, 7 insertions(+), 4

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

2016-11-07 Thread Tony Lindgren
Commit 65b3f50ed6fa ("usb: musb: Add PM runtime support for MUSB DSPS glue layer") wrongly added a call for pm_runtime_get_sync to otg_timer that runs in softirq context. That causes a "BUG: sleeping function called from invalid context" every time when polling the cable status: []

Re: [RFC PATCH] usb: hub: Fix auto-remount of safely removed or ejected USB-3 devices

2016-11-07 Thread Alan Stern
On Fri, 4 Nov 2016, Mathias Nyman wrote: > USB-3 does not have any link state that will avoid negotiating a connection > with a plugged-in cable but will signal the host when the cable is > unplugged. > > For USB-3 we used to first set the link to Disabled, then to RxDdetect to > be able to

Re: [PATCH v18 0/4] Introduce usb charger framework to deal with the usb gadget power negotation

2016-11-07 Thread NeilBrown
On Mon, Nov 07 2016, Baolin Wang wrote: > On 3 November 2016 at 09:25, NeilBrown wrote: >> On Tue, Nov 01 2016, Baolin Wang wrote: > > I agree with your most opinions, but these are optimization. I see them as bug fixes, not optimizations. >

[PATCH v3 01/10] USB: ohci: da8xx: use ohci priv data instead of globals

2016-11-07 Thread Axel Haslam
Instead of global variables, use the extra_priv_size of the ohci driver. We cannot yet move the ocic mask because this is used on the interrupt handler which is registerded through platform data and does not have an hcd pointer. This will be moved on a later patch. Signed-off-by: Axel Haslam

[PATCH v3 10/10] ARM: dts: da850: add usb device node

2016-11-07 Thread Axel Haslam
This adds the ohci device node for the da850 soc. It also enables it for the omapl138 hawk board. Signed-off-by: Axel Haslam --- arch/arm/boot/dts/da850-lcdk.dts | 8 arch/arm/boot/dts/da850.dtsi | 8 2 files changed, 16 insertions(+) diff --git

[PATCH v3 06/10] USB: ohci: da8xx: Remove ohci platform callbacks

2016-11-07 Thread Axel Haslam
Now that all ohci users are are using a regulator, we can remove the platform callbacks and data. potpgt is no longer necessary as a power on delay time can be specified for the regulator itself. Signed-off-by: Axel Haslam --- arch/arm/mach-davinci/board-da830-evm.c |

[PATCH v3 04/10] ARM: davinci: da830: Handle vbus with a regulator

2016-11-07 Thread Axel Haslam
The usb driver can now take a regulator instead of the platform callbacks for vbus handling. Lets use a regulator so we can remove the callbacks in a later patch. Signed-off-by: Axel Haslam --- arch/arm/mach-davinci/board-da830-evm.c | 108 +++-

[PATCH v3 05/10] ARM: davinci: hawk: Remove vbus and over current gpios

2016-11-07 Thread Axel Haslam
The hawk board VBUS is fixed to a 5v source, and the over current pin is actually not connected to the SoC. Do not reseve these gpios for OHCI as they are not related to usb. Signed-off-by: Axel Haslam --- arch/arm/mach-davinci/board-omapl138-hawk.c | 99

[PATCH v3 08/10] USB: ohci: da8xx: Add devicetree bindings

2016-11-07 Thread Axel Haslam
This patch documents the device tree bindings required for the ohci controller found in TI da8xx family of SoC's Cc: devicet...@vger.kernel.org Signed-off-by: Axel Haslam --- .../devicetree/bindings/usb/ohci-da8xx.txt | 39 ++ 1 file changed, 39

[PATCH v3 07/10] USB: ohci: da8xx: use a flag instead of mask for ocic

2016-11-07 Thread Axel Haslam
Now that the platform callback is removed, we can move the over current indictor changed flag to the private data structure. Since the driver only handles a single port, there is no need for ocic to be a mask, we can use a simple flag instead. Signed-off-by: Axel Haslam

[PATCH v3 03/10] USB: ohci: da8xx: Allow a regulator to handle VBUS

2016-11-07 Thread Axel Haslam
We need to remove the platform callbacks to be able to probe the driver using device tree. Using a regulator to handle VBUS will eliminate the need for these callbacks once all users are converted to use a regulator. The regulator equivalents to the platform callbacks are: set_power ->

[PATCH] usb: dwc2: gadget: simplify list handling

2016-11-07 Thread Nicholas Mc Guire
The current code is effectively equivalent to list_first_entry_or_null() so simply switch and simplify the code. Fixes: 9c39ddc60ee9 ("USB: s3c-hsotg: Fix stall condition processing") Signed-off-by: Nicholas Mc Guire --- Found by simple coccinelle scanner Compile tested with:

Re: usbip device reset

2016-11-07 Thread Lars Täuber
Ok, I'll try to get kernel 4.8.6 compiled for my openwrt device. Thanks Lars On Mon, 7 Nov 2016 01:08:05 + fx IWATA NOBUO wrote: > Sorry. I missed the mail archive URL. > Merged patch is : > http://www.mail-archive.com/linux-usb@vger.kernel.org/msg73658.html

Re: [PATCH] usb: dwc2: gadget: simplify list handling

2016-11-07 Thread John Youn
On 11/7/2016 11:06 AM, Nicholas Mc Guire wrote: > The current code is effectively equivalent to list_first_entry_or_null() > so simply switch and simplify the code. > > Fixes: 9c39ddc60ee9 ("USB: s3c-hsotg: Fix stall condition processing") > Signed-off-by: Nicholas Mc Guire >

[PATCH v3 2/2] USB hub_probe: put initialization before usage

2016-11-07 Thread Eugene Korenevsky
Minor optimization: move initialization immediately before usage. This gives a chance for more accurate register allocation by the compiler. Signed-off-by: Eugene Korenevsky --- drivers/usb/core/hub.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH v3 1/2] USB hub_probe: rework ugly goto-into-compound-statement

2016-11-07 Thread Eugene Korenevsky
Rework smelling code (goto inside compound statement). Perhaps this is legacy. Anyway such code is not appropriate for Linux kernel. Signed-off-by: Eugene Korenevsky --- drivers/usb/core/hub.c | 33 - 1 file changed, 16 insertions(+), 17

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

2016-11-07 Thread John Youn
On 11/6/2016 11:32 PM, Felipe Balbi wrote: > > Hi, > > 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 the endpoint * @mps: The maximum packet size

Re: [PATCH v2] USB hub_probe: remove ugly goto-into-compound-statement

2016-11-07 Thread Eugene Korenevsky
On Mon, Nov 07, 2016 at 10:09:17AM +0100, Greg Kroah-Hartman wrote: > > Rework smelling code (goto inside compound statement). Perhaps this is > > legacy. > > Anyway such code is not appropriate for Linux kernel. > > > > Signed-off-by: Eugene Korenevsky > > --- > >

Re: musb RPM sleep-while-atomic in 4.9-rc1

2016-11-07 Thread Tony Lindgren
* Johan Hovold [161104 07:16]: > Perhaps sleep in musb_host_finish_resume() instead of always adding this > delay which is only needed for deasserting resume signalling and not for > generic (runtime) resume work (if you decide to use a common work > queue). Looking at your

Re: [PATCH] usb: gadget: u_ether: remove interrupt throttling

2016-11-07 Thread David Miller
From: Felipe Balbi Date: Mon, 07 Nov 2016 14:39:21 +0200 > > Hi, > > David Miller writes: >> From: Felipe Balbi >> Date: Thu, 03 Nov 2016 09:04:54 +0200 >> >>> What Dave Miller is saying is that it's ALWAYS a

[PATCH v5 1/4] usb: musb: da8xx: Call earlier clk_prepare_enable()

2016-11-07 Thread Alexandre Bailon
The first attempt to read a register may fail because the clock may not be enabled, and then the probe of musb driver will fail. Call clk_prepare_enable() before the first register read. Signed-off-by: Alexandre Bailon --- drivers/usb/musb/da8xx.c | 17 - 1

[PATCH v5 0/4] usb: musb: da8xx: Fix few issues

2016-11-07 Thread Alexandre Bailon
Currently, the USB OTG of the da8xx doesn't work. This series intend to fix them. Change in v2: * Fix the error path da8xx_musb_init() Changes in v3: * Remove the host workaround that was not working on every platform * Add a property to the devicetree node of phy to force the phy in a specific

[PATCH v5 4/4] usb: musb: da8xx: Set phy in OTG mode by default

2016-11-07 Thread Alexandre Bailon
The DA8xx OTG PHY has some issues when it is forced in host or peripheral mode. Actually, most of the time, OTG is the best mode because host or peripheral mode are only required for hardware that miss some circuitry. Init the PHY mode OTG mode by default. Signed-off-by: Alexandre Bailon

[PATCH v5 2/4] phy: da8xx-usb: Configure CFGCHIP2 to support OTG workaround

2016-11-07 Thread Alexandre Bailon
If we configure the da8xx OTG phy in OTG mode, neither device or host mode will work. That is because the PHY is not able to detect and notify the driver that value of ID pin changed. To work despite this hardware limitation, the da8xx glue implement a workaround. But to work, the workaround

[PATCH v5 3/4] usb: musb: Add a new argument to musb_platform_set_mode()

2016-11-07 Thread Alexandre Bailon
During the init, the driver will use musb_platform_set_mode() to configure the controller mode and the PHY mode. The PHY of DA8xx has some issues when the PHY is forced in host or device, so we want to keep it in OTG mode unless the user request a specific mode by using the sysfs. Add the init

Re: [PATCH] usb: gadget: u_ether: remove interrupt throttling

2016-11-07 Thread Felipe Balbi
Hi, David Miller writes: > From: Felipe Balbi > Date: Thu, 03 Nov 2016 09:04:54 +0200 > >> What Dave Miller is saying is that it's ALWAYS a bug to delay >> completion of SKBs. The only thing you're doing with chipidea is >> delaying interrupt

Re: [PATCH] usb: gadget: u_ether: remove interrupt throttling

2016-11-07 Thread Felipe Balbi
Hi, Peter Chen writes: >> Peter Chen writes: >> >> > Peter Chen writes: >> >> > > On Wed, Nov 02, 2016 at 11:22:54AM -0400, David Miller wrote: >> >> > >> From: Peter Chen >> >> > >> Date: Wed, 2 Nov

Re: [PATCH 3/6] Documentation: devicetree: dwc3: Add interrupt moderation

2016-11-07 Thread Mark Rutland
On Tue, Nov 01, 2016 at 01:18:17PM +0200, Felipe Balbi wrote: > > Hi, > > John Youn writes: > John Youn writes: > > Add interrupt moderation interval binding for dwc3. > > > > Signed-off-by: John Youn >

Re: [PATCH 4/4] cdc-acm: clear halt condition

2016-11-07 Thread Oliver Neukum
On Mon, 2016-11-07 at 11:50 +0100, Ladislav Michl wrote: > On Mon, Nov 07, 2016 at 11:26:10AM +0100, Oliver Neukum wrote: > > This is looking good. Please resend so Greg can pick it up. > > One more question. I rather point on it explicitely as it changes > driver behaviour. Previously, urb was

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

2016-11-07 Thread Oliver Neukum
On Fri, 2016-11-04 at 17:57 +0800, Kai-Heng Feng wrote: > Sometimes cdc_mbim failed to probe if runtime pm is enabled: > [9.305626] cdc_mbim: probe of 2-2:1.12 failed with error -22 > > This can be solved by increase its pm usage counter. > > Signed-off-by: Kai-Heng Feng

Re: [PATCH 1/1] usb: xhci: move slot_id from xhci_hcd to xhci_command structure

2016-11-07 Thread Mathias Nyman
On 07.11.2016 09:30, Lu Baolu wrote: xhci->slot_id is used for providing a way to pass slot id from the command completion handler to the funtion waiting for completion. It's shared by enumerations of all USB devices connected to an xhci host. Hence, it's a source for possible races. Since we've

Re: [PATCH 4/4] cdc-acm: clear halt condition

2016-11-07 Thread Ladislav Michl
On Mon, Nov 07, 2016 at 11:26:10AM +0100, Oliver Neukum wrote: > This is looking good. Please resend so Greg can pick it up. One more question. I rather point on it explicitely as it changes driver behaviour. Previously, urb was submitted again only on status == 0. This caused driver to run out

Re: [PATCH 4/4] cdc-acm: clear halt condition

2016-11-07 Thread Oliver Neukum
On Sun, 2016-11-06 at 23:31 +0100, Ladislav Michl wrote: > On Sun, Nov 06, 2016 at 10:30:02PM +0100, Oliver Neukum wrote: > > Hi, > > > > almost. Two issues left with this section. > > > > 1. It makes no sense to check the results of usb_clear_halt() > > If it fails, we cannot do anything

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

2016-11-07 Thread Oliver Neukum
On Fri, 2016-11-04 at 09:26 -0400, Alan Stern wrote: > On Fri, 4 Nov 2016, Kai-Heng Feng wrote: > > > Sometimes cdc_mbim failed to probe if runtime pm is enabled: > > [9.305626] cdc_mbim: probe of 2-2:1.12 failed with error -22 > > > > This can be solved by increase its pm usage counter. >

Re: [PATCH] USB: serial: ftdi_sio: add support for TI CC3200 LaunchPad

2016-11-07 Thread Johan Hovold
On Fri, Nov 04, 2016 at 09:18:20PM -0700, Doug Brown wrote: > This patch adds support for the TI CC3200 LaunchPad board, which uses a > custom USB vendor ID and product ID. Channel A is used for JTAG, and > channel B is used for a UART. > > Signed-off-by: Doug Brown Now

Re: [PATCH v2] USB hub_probe: remove ugly goto-into-compound-statement

2016-11-07 Thread Greg Kroah-Hartman
On Wed, Nov 02, 2016 at 08:59:44PM +0300, Eugene Korenevsky wrote: > Rework smelling code (goto inside compound statement). Perhaps this is legacy. > Anyway such code is not appropriate for Linux kernel. > > Signed-off-by: Eugene Korenevsky > --- > drivers/usb/core/hub.c

Re: [PATCH v18 0/4] Introduce usb charger framework to deal with the usb gadget power negotation

2016-11-07 Thread Baolin Wang
On 3 November 2016 at 09:25, NeilBrown wrote: > On Tue, Nov 01 2016, Baolin Wang wrote: > > >>> So I won't be responding on this topic any further until I see a genuine >>> attempt to understand and resolve the inconsistencies with >>> usb_register_notifier(). >> >> Any better