[PATCH v9 1/5] usb: dwc3: add dis_u2_freeclk_exists_quirk

2016-08-15 Thread William Wu
Add a quirk to clear the GUSB2PHYCFG.U2_FREECLK_EXISTS bit, which specifies whether the USB2.0 PHY provides a free-running PHY clock, which is active when the clock control input is active. Signed-off-by: William Wu Acked-by: Rob Herring --- Changes in v9: - None Changes in v8: - add Acked-by (

[PATCH v9 0/5] support rockchip dwc3 driver

2016-08-15 Thread William Wu
This series add support for rockchip DWC3 driver, and add additional optional properties for specific platforms (e.g., rockchip rk3399 platform). And because rockchip DWC3 need additional handling of cable events and mode switch to support DRD mode, so we add a new dwc3-rockchip driver, but not us

[PATCH v9 3/5] usb: dwc3: add dis_del_phy_power_chg_quirk

2016-08-15 Thread William Wu
Add a quirk to clear the GUSB3PIPECTL.DELAYP1TRANS bit, which specifies whether disable delay PHY power change from P0 to P1/P2/P3 when link state changing from U0 to U1/U2/U3 respectively. Signed-off-by: William Wu Acked-by: Rob Herring --- Changes in v9: - None Changes in v8: - add Acked-by (

[PATCH v9 2/5] usb: dwc3: make usb2 phy utmi interface configurable

2016-08-15 Thread William Wu
Support to configure the UTMI+ PHY with an 8- or 16-bit interface via DT. The UTMI+ PHY interface is a hardware capability, and it's platform dependent. Normally, the PHYIF can be configured during coreconsultant. But for some specific USB cores(e.g. rk3399 SoC DWC3), the default PHYIF configurati

[PATCH v9 4/5] usb: dwc3: rockchip: add devicetree bindings documentation

2016-08-15 Thread William Wu
This patch adds the devicetree documentation required for Rockchip USB3.0 core wrapper consisting of USB3.0 IP from Synopsys. It supports DRD mode, and could operate in device mode (SS, HS, FS) and host mode (SS, HS, FS, LS). Signed-off-by: William Wu Acked-by: Rob Herring --- Changes in v9: -

[PATCH v9 5/5] usb: dwc3: add rockchip specific glue layer

2016-08-15 Thread William Wu
Add rockchip specific glue layer to support USB3 Peripheral mode and Host mode on rockchip platforms (e.g. rk3399). The DesignWare USB3 integrated in rockchip SoCs is a configurable IP Core which can be instantiated as Dual-Role Device (DRD), Host Only (XHCI) and Peripheral Only configurations. W

RE: [lkp] [usb] ad05399d68: BUG: unable to handle kernel NULL pointer dereference at 0000000000000012

2016-08-15 Thread Peter Chen
> > >FYI, we noticed the following commit: > >https://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb.git testing/next >commit >ad05399d68b6ae1649cdcfc82ce3ffea1a7c5104 ("usb: udc: core: fix error handling") > Hi Xiaolong, You reported it one month ago, and said it is a false report. see bel

[PATCH v10 2/9] usbip: exporting devices: modifications to host side libraries

2016-08-15 Thread Nobuo Iwata
usbip_get_device() method in usbip_host_driver_ops was not used. It is modified as a function to find an exported device for new operations 'connect' and 'disconnect'. bind and unbind function are exported for the new operations. Signed-off-by: Nobuo Iwata --- tools/usb/usbip/libsrc/usbip_hos

[PATCH v10 0/9] usbip: exporting devices

2016-08-15 Thread Nobuo Iwata
Dear all, This series of patches adds exporting device operation to USB/IP. 1. Overview Exporting devices may not be a new idea. The request and response PDU have been defined in tools/usbip/usbip/src/usbip_network.h. #define OP_EXPORT 0x06 #define OP_REQ_EXPORT (OP_REQUEST | OP_EXPORT)

[PATCH v10 3/9] usbip: exporting devices: new connect operation

2016-08-15 Thread Nobuo Iwata
New connect operation. Signed-off-by: Nobuo Iwata --- tools/usb/usbip/src/Makefile.am | 3 +- tools/usb/usbip/src/usbip.c | 9 +- tools/usb/usbip/src/usbip.h | 5 +- tools/usb/usbip/src/usbip_connect.c | 228 4 files changed, 242 insertions(

[PATCH v10 1/9] usbip: exporting devices: modifications to network header

2016-08-15 Thread Nobuo Iwata
Modification to export and un-export response in tools/usb/usbip/src/usbip_network.h. It just changes return code type from int to uint32_t as same as other responses. Added export and un-export request/response to Documentation/usb/usbip_protocol.txt. Signed-off-by: Nobuo Iwata --- Document

[PATCH v10 4/9] usbip: exporting devices: new disconnect operation

2016-08-15 Thread Nobuo Iwata
New disconnect operation. Signed-off-by: Nobuo Iwata --- tools/usb/usbip/src/Makefile.am| 2 +- tools/usb/usbip/src/usbip.c| 6 + tools/usb/usbip/src/usbip.h| 2 + tools/usb/usbip/src/usbip_disconnect.c | 215 + 4 files changed, 224 i

[PATCH v10 5/9] usbip: exporting devices: modifications to daemon

2016-08-15 Thread Nobuo Iwata
Refactoring to the daemon. usbipd_dev.c is device-side specific code extracted from usbipd.c. usbipd.c is left as common parts for both device(stub)-side and application(vhci)-side daemon. usbip_net_set_nodelay() is the middle of device side daemon operation and it does not make mush sence. In

[PATCH v10 6/9] usbip: exporting devices: modifications to attach and detach

2016-08-15 Thread Nobuo Iwata
Refactoring to attach and detatch operation. Common parts to new application(vhci)-side daemon are moved to libsrc/vhci_driver.c. Signed-off-by: Nobuo Iwata --- tools/usb/usbip/libsrc/vhci_driver.c | 99 tools/usb/usbip/libsrc/vhci_driver.h | 6 +- tools/usb/usbip

[PATCH v10 8/9] usbip: exporting devices: change to usbip_list.c

2016-08-15 Thread Nobuo Iwata
Correction to wording inconsistency around import and export in usbip_list.c. Please, see also cover letter about wording. Signed-off-by: Nobuo Iwata --- tools/usb/usbip/src/usbip_list.c | 22 -- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/tools/usb/usbi

[PATCH v10 7/9] usbip: exporting devices: new application-side daemon

2016-08-15 Thread Nobuo Iwata
New application(vhci)-side daemon. Signed-off-by: Nobuo Iwata --- tools/usb/usbip/libsrc/vhci_driver.c | 19 +++ tools/usb/usbip/libsrc/vhci_driver.h | 1 + tools/usb/usbip/src/Makefile.am | 7 +- tools/usb/usbip/src/usbipd.c | 12 +- tools/usb/usbip/src/usbipd_app.c | 242

[PATCH v10 9/9] usbip: exporting devices: chage to documenattion

2016-08-15 Thread Nobuo Iwata
This patch adds function and usage of new connect operation, disconnect operation and application(vhci)-side daemon to README and manuals. At this point, the wording, 'server' and 'client' are ambiguous in several place. For existing attach command, the daemon runs device side machine and atta

[PATCH v5 0/3] usbip: vhci number of ports extension

2016-08-15 Thread Nobuo Iwata
This series of patches extends number of ports limitaion in application (vhci) side. 1. Background Assuming a system shown below that services distributerd devices in home or office via USB/IP, if the devices are set at every doors and windows, number devices may be up to tens. Home/SOHO/Ente

[PATCH v5 1/3] usbip: vhci extension: modifications to vhci driver

2016-08-15 Thread Nobuo Iwata
Modification to Kconfig, vhci_hc.c, vhci.h and vhci_sysfs.c. 1. kernel config Followings are added. USBIP_VHCI_HC_PORTS: Number of ports per USB/IP virtual host controller. The default is 8 - same as current VHCI_NPORTS. USBIP_VHCI_NR_HCS: Number of USB/IP virtual host controllers. The default

[PATCH v5 2/3] usbip: vhci extension: modifications to userspace

2016-08-15 Thread Nobuo Iwata
Modification to the userspace tools including usbip/libsrc and usbip/src. Changed corresponding to new vhci_sysfs.c. nports in sysfs is used to get total number of ports. Old get_nports() ignores the last status line because udev_device_get_sysattr_value() drops last new line. New version use

[PATCH v5 3/3] usbip: vhci extension: dynamic extension

2016-08-15 Thread Nobuo Iwata
Modification for dynamic device registration and unregistration. 1. kernel config Followings are added. USBIP_VHCI_HC_PORTS: Number of ports per USB/IP virtual host controller. The default is 8 - same as current VHCI_NPORTS. USBIP_VHCI_MAX_HCS: Muximum number of USB/IP virtual host controllers.

Re: [PATCH v9 5/5] usb: dwc3: add rockchip specific glue layer

2016-08-15 Thread kbuild test robot
Hi William, [auto build test ERROR on balbi-usb/next] [also build test ERROR on v4.8-rc2 next-20160815] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/William-Wu/support-rockchip-dwc3-driver

Re: [PATCH v2] usb: gadget: Add per-lun inquiry string

2016-08-15 Thread Philipp Gesang
Ping. @Krzysztof The resubmitted patch bounced from the Cc: to you due to your MX blocking one of our hosters. I can resend in case you didn’t receive the mail from the list. Best, Philipp -<| Quoting Philipp Gesang , on Monday, 2016-08-01 17:04:19 |>- > Introduce an attribute "inquiry_string"

Re: [PATCH] usb: chipidea: udc: don't touch DP when controller is in host mode

2016-08-15 Thread Peter Chen
On Fri, Aug 12, 2016 at 09:18:59AM +, Jun Li wrote: > Hi, > > -Original Message- > > From: Peter Chen [mailto:hzpeterc...@gmail.com] > > Sent: Friday, August 12, 2016 4:48 PM > > To: Jun Li > > Cc: Peter Chen ; linux-usb@vger.kernel.org > > Subject: Re: [PATCH] usb: chipidea: udc: don'

Re: [PATCH 2/2] USB: mos7840: fix non-atomic allocation in write path

2016-08-15 Thread Johan Hovold
On Fri, Aug 12, 2016 at 01:05:09AM +0300, Alexey Khoroshilov wrote: > There is an allocation with GFP_KERNEL flag in mos7840_write(), > while it may be called from interrupt context. > > Follow-up for commit 191252837626 ("USB: kobil_sct: fix non-atomic allocation > in write path") > > Found by

[PATCH v10 0/5] support rockchip dwc3 driver

2016-08-15 Thread William Wu
This series add support for rockchip DWC3 driver, and add additional optional properties for specific platforms (e.g., rockchip rk3399 platform). And because rockchip DWC3 need additional handling of cable events and mode switch to support DRD mode, so we add a new dwc3-rockchip driver, rather tha

[PATCH v10 1/5] usb: dwc3: add dis_u2_freeclk_exists_quirk

2016-08-15 Thread William Wu
Add a quirk to clear the GUSB2PHYCFG.U2_FREECLK_EXISTS bit, which specifies whether the USB2.0 PHY provides a free-running PHY clock, which is active when the clock control input is active. Signed-off-by: William Wu Acked-by: Rob Herring --- Changes in v10: - None Changes in v9: - None Changes

[PATCH v10 2/5] usb: dwc3: make usb2 phy utmi interface configurable

2016-08-15 Thread William Wu
Support to configure the UTMI+ PHY with an 8- or 16-bit interface via DT. The UTMI+ PHY interface is a hardware capability, and it's platform dependent. Normally, the PHYIF can be configured during coreconsultant. But for some specific USB cores(e.g. rk3399 SoC DWC3), the default PHYIF configurati

[PATCH v10 3/5] usb: dwc3: add dis_del_phy_power_chg_quirk

2016-08-15 Thread William Wu
Add a quirk to clear the GUSB3PIPECTL.DELAYP1TRANS bit, which specifies whether disable delay PHY power change from P0 to P1/P2/P3 when link state changing from U0 to U1/U2/U3 respectively. Signed-off-by: William Wu Acked-by: Rob Herring --- Changes in v10: - None Changes in v9: - None Changes

[PATCH v10 4/5] usb: dwc3: rockchip: add devicetree bindings documentation

2016-08-15 Thread William Wu
This patch adds the devicetree documentation required for Rockchip USB3.0 core wrapper consisting of USB3.0 IP from Synopsys. It supports DRD mode, and could operate in device mode (SS, HS, FS) and host mode (SS, HS, FS, LS). Signed-off-by: William Wu Acked-by: Rob Herring --- Changes in v10: -

[PATCH v10 5/5] usb: dwc3: add rockchip specific glue layer

2016-08-15 Thread William Wu
Add rockchip specific glue layer to support USB3 Peripheral mode and Host mode on rockchip platforms (e.g. rk3399). The DesignWare USB3 integrated in rockchip SoCs is a configurable IP Core which can be instantiated as Dual-Role Device (DRD), Host Only (XHCI) and Peripheral Only configurations. W

[PATCH] cdc-wdm: cleanup debug messages

2016-08-15 Thread Oliver Neukum
Dynamic debugging will already add the function (and the line number) to a debug message if one requests that. It makes no sense to add them unconditionally in a driver. Signed-off-by: Oliver Neukum --- drivers/usb/class/cdc-wdm.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) dif

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

2016-08-15 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], I use a generic power sequence library for parsing the power sequence elements on DT, and implement generic power sequence on library. The host driver can allocat

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

2016-08-15 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 insertions(+) create mode 100644 Documentation/devicetree/binding

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

2016-08-15 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 a/Documentation/devicetree/bindings/usb/usb-device.txt b/Documentatio

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

2016-08-15 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 core's device node equals glu

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

2016-08-15 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 crea

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

2016-08-15 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 recogniz

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

2016-08-15 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 Chen --- arch/arm/boot/dts/imx6qdl.dtsi | 6 ++

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

2016-08-15 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 Signed-off-by: Josh

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

2016-08-15 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 Signed-off-by: Peter Chen -

Re: [PATCH] xhci: really enqueue zero length TRBs.

2016-08-15 Thread Mathias Nyman
On 12.08.2016 19:45, Alban Browaeys wrote: Enqueue the first TRB even if full_len is zero. Without this "adb install " freezes the system. Signed-off-by: Alban Browaeys Fixes: 86065c2719a5 ("xhci: don't rely on precalculated value of needed trbs in the enqueue loop") --- drivers/usb/host/xhc

Re: [PATCH v10 5/5] usb: dwc3: add rockchip specific glue layer

2016-08-15 Thread kbuild test robot
Hi William, [auto build test ERROR on balbi-usb/next] [also build test ERROR on v4.8-rc2 next-20160815] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/William-Wu/support-rockchip-dwc3-driver

[PATCH v2 2/6] usb: dwc3: gadget: add sg and num_pending_sgs to dwc3_request

2016-08-15 Thread Felipe Balbi
These two fields will be used in a follow-up patch to track how many entries of request's sglist we have already processed. The reason is that if a gadget driver sends an sglist with more entries then we can fit in the ring, we will have to continue processing remaining afterwards. Signed-off-by:

[PATCH v2 3/6] usb: dwc3: gadget: interrupt on ring full too

2016-08-15 Thread Felipe Balbi
If the ring is full and we are processing a big sglist, then let's interrupt so we can, later, add more TRBs to the ring. Signed-off-by: Felipe Balbi --- drivers/usb/dwc3/gadget.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3

[PATCH v2 4/6] usb: dwc3: gadget: add remaining sg entries to ring

2016-08-15 Thread Felipe Balbi
Upon transfer completion after a full ring, let's add more TRBs to our ring in order to complete our request successfully. Signed-off-by: Felipe Balbi --- drivers/usb/dwc3/gadget.c | 36 1 file changed, 24 insertions(+), 12 deletions(-) diff --git a/drivers/

[PATCH v2 1/6] usb: dwc3: gadget: avoid while (1) loop on completion

2016-08-15 Thread Felipe Balbi
We know that we have to iterate over the list of started requests. Instead of looping forever, we can rely on list_for_each_entry(). Likewise, instead of a do {} while loop over all, maybe available, scatterlist entries, we can detect if $this request uses scatterlist and rely on for_each_sg(). Th

[PATCH v2 5/6] usb: dwc3: gadget: remove condition that never happens

2016-08-15 Thread Felipe Balbi
We don't use LST bit anymore, so this condition will never trigger. Signed-off-by: Felipe Balbi --- drivers/usb/dwc3/gadget.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index 6483991c8013..998e433c2c01 100644 --

[PATCH v2 6/6] usb: dwc3: gadget: improve increment request->actual

2016-08-15 Thread Felipe Balbi
No functional changes, just a slight cosmetic change. Signed-off-by: Felipe Balbi --- drivers/usb/dwc3/gadget.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index 998e433c2c01..c6fe9a3bacab 100644 --- a/drivers/

Re: [PATCH v2 00/10] usb: ulpi: remove "dev" field from struct ulpi_ops

2016-08-15 Thread Heikki Krogerus
Hi, Please forgive me for taking so long to reply. I just returned from paternal leave. On Mon, Aug 01, 2016 at 09:15:48PM +0300, Tal Shorer wrote: > struct ulpi_ops is defined as follows: > > struct ulpi_ops { > struct device *dev; > int (*read)(struct ulpi_ops *ops, u8 addr); >

Re: [PATCH 2/2] usb: Kconfig: move ulpi bus to common

2016-08-15 Thread Heikki Krogerus
Hi, On Fri, Jul 08, 2016 at 04:15:23PM +0800, Peter Chen wrote: > The ULPI bus is not only for host, but for device mode too, so move > it out from host's Kconfig. > > Cc: Heikki Krogerus > Signed-off-by: Peter Chen > --- > drivers/usb/common/Kconfig | 21 + > drivers/usb/c

[PATCH] usb: chipidea: host: disable io watchdog

2016-08-15 Thread Lucas Stach
The Chipidea EHCI core seems to behave sanely and doesn't need the IO watchdog. This kills off 10 non-deferrable wakeup events per second when the controller is otherwise idle. Signed-off-by: Lucas Stach Tested-by: Stefan Agner --- drivers/usb/chipidea/host.c | 3 +++ 1 file changed, 3 insertio

Re: [PATCH] usb: host: xhci-rcar: update firmware for R-Car H3 and M3-W

2016-08-15 Thread Kyle McMartin
On Wed, Aug 10, 2016 at 07:56:39PM +0900, Yoshihiro Shimoda wrote: > This patch updates the firmware files for R-Car H3 and M3-W to fix > the device detection issue. > > The md5sum of the files are: > 645db7e9056029efa15f158e51cc8a11 r8a779x_usb3_v2.dlmem > 687d5d42f38f9850f8d5a6071dca3109 r8a77

Re: [lkp] [usb] ad05399d68: BUG: unable to handle kernel NULL pointer dereference at 0000000000000012

2016-08-15 Thread Ye Xiaolong
On 08/15, Peter Chen wrote: > >> >> >>FYI, we noticed the following commit: >> >>https://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb.git testing/next >>commit >>ad05399d68b6ae1649cdcfc82ce3ffea1a7c5104 ("usb: udc: core: fix error >>handling") >> > >Hi Xiaolong, > >You reported it one month

Re: [PATCH v10 5/5] usb: dwc3: add rockchip specific glue layer

2016-08-15 Thread kbuild test robot
Hi William, [auto build test ERROR on balbi-usb/next] [also build test ERROR on v4.8-rc2 next-20160815] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/William-Wu/support-rockchip-dwc3-driver

[PATCH] USB: core: of: Check device_node before parsing in usb_of_get_child_node()

2016-08-15 Thread Vaibhav Hiremath
In case of HUB devices connected to USB ports, we may not have DT node representing it inside USB, and when devices connected to hub gets enumerated, call to usb_of_get_child_node() leads to NULL pointer dereference. In the usecase we have, where EHCI port is connected to USB HUB device, and downw

Re: [PATCH] USB: core: of: Check device_node before parsing in usb_of_get_child_node()

2016-08-15 Thread Greg KH
On Mon, Aug 15, 2016 at 11:31:10AM -0700, Vaibhav Hiremath wrote: > In case of HUB devices connected to USB ports, we may not have DT > node representing it inside USB, and when devices connected to hub > gets enumerated, call to usb_of_get_child_node() leads to NULL pointer > dereference. Really?

Re: [PATCH] USB: core: of: Check device_node before parsing in usb_of_get_child_node()

2016-08-15 Thread Vaibhav Hiremath
On Monday 15 August 2016 11:41 AM, Greg KH wrote: On Mon, Aug 15, 2016 at 11:31:10AM -0700, Vaibhav Hiremath wrote: In case of HUB devices connected to USB ports, we may not have DT node representing it inside USB, and when devices connected to hub gets enumerated, call to usb_of_get_child_nod

[PATCH v2 3/7] phy-sun4i-usb: Simplify missing dr_mode handling

2016-08-15 Thread Hans de Goede
If we cannot get dr_mode or no id gpio is specified simply assume peripheral mode, as this is always safe. Signed-off-by: Hans de Goede --- Changes in v2: -Keep sun4i_usb_phy0_get_id_det() logic as is rather then re-ordering the switch-case --- drivers/phy/phy-sun4i-usb.c | 42 ++---

[PATCH v2 4/7] phy-sun4i-usb: Add support for phy_set_mode

2016-08-15 Thread Hans de Goede
Together with some musb sunxi glue changes this allows run-time dr_mode switching support via the "mode" musb sysfs attribute. Signed-off-by: Hans de Goede --- drivers/phy/phy-sun4i-usb.c | 24 1 file changed, 24 insertions(+) diff --git a/drivers/phy/phy-sun4i-usb.c b/

[PATCH v2 5/7] phy-sun4i-usb: Warn when external vbus is detected

2016-08-15 Thread Hans de Goede
Warn when external vbus is detected when we're trying to enable our own vbus. Signed-off-by: Hans de Goede --- drivers/phy/phy-sun4i-usb.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/phy/phy-sun4i-usb.c b/drivers/phy/phy-sun4i-usb.c index d369081..c17b099 10064

[PATCH v2 1/7] phy-sun4i-usb: Use bool where appropriate

2016-08-15 Thread Hans de Goede
We're using bool as true/false type in most places in phy-sun4i-usb.c for consistency fixup the remaining uses of ints which are ever only 0 or 1 to be bools too. Signed-off-by: Hans de Goede --- drivers/phy/phy-sun4i-usb.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git

[PATCH v2 6/7] phy-sun4i-usb: Add "allwinner,usb0-usb-a-connector" dt property

2016-08-15 Thread Hans de Goede
On some devices the musb otg controller can be used in both device and host mode, but requires software mode switching since there is no id pin connected. The usb0 phy code will default to device mode in this case. On some systems usb0 is connected to a female USB-A port. It can still be used in d

[PATCH v2 0/7] musb: sunxi: Add support for run-time changing dr-mode through sysfs

2016-08-15 Thread Hans de Goede
Hi All, Here is a patch series which implements run-time changing the dr-mode of sunxi musb controllers through the (already existing) musb "mode" sysfs attribute. This is useful on boards where there is no id pin, e.g. some tv-boxes use the musb controller to get an extra usb A port without need

[PATCH v2 2/7] phy-sun4i-usb: Refactor forced session ending

2016-08-15 Thread Hans de Goede
The phy-sun4i-usb code supports forced ending a session on systems which lack Vbus detection, to allow switching between host and peripheral mode on such systems. Role switching via the musb driver "mode" sysfs attribute requires force ending the session too. This commit refactors the code to allo

[PATCH v2 7/7] musb: sunxi: Add support for platform_set_mode

2016-08-15 Thread Hans de Goede
This allows run-time dr_mode switching support via the "mode" musb sysfs attribute. Signed-off-by: Hans de Goede --- drivers/usb/musb/sunxi.c | 52 1 file changed, 48 insertions(+), 4 deletions(-) diff --git a/drivers/usb/musb/sunxi.c b/drivers/u

Re: [PATCH] USB: core: of: Check device_node before parsing in usb_of_get_child_node()

2016-08-15 Thread Alan Stern
On Mon, 15 Aug 2016, Greg KH wrote: > On Mon, Aug 15, 2016 at 11:31:10AM -0700, Vaibhav Hiremath wrote: > > In case of HUB devices connected to USB ports, we may not have DT > > node representing it inside USB, and when devices connected to hub > > gets enumerated, call to usb_of_get_child_node()

[PATCH] usb: dwc3: gadget: don't rely on jiffies while holding spinlock

2016-08-15 Thread Nicolas Saenz Julienne
__dwc3_gadget_wakeup() is called while holding a spinlock, then depends on jiffies in order to timeout while polling the USB core for a link state update. In the case the wakeup failed, the timeout will never happen and will also cause the cpu to stall until rcu_preempt kicks in. This switches to

How can I tell who created my usb0 network device?

2016-08-15 Thread Patrick Doyle
I have both usb0 and usb1 network devices. At this point, I'm perfectly happy with my usb1 device, but, after having spent all of this time trying to configure usb0 correctly, I would like to learn what module created usb0. How can I figure that out? --wpd -- To unsubscribe from this list: send

Re: musb: am3358: having performance problem with usb1

2016-08-15 Thread ayaka
On 08/13/2016 01:44 AM, Greg KH wrote: On Sat, Aug 13, 2016 at 12:38:46AM +0800, ayaka wrote: On 08/12/2016 03:40 PM, Greg KH wrote: On Fri, Aug 12, 2016 at 10:23:15AM +0800, ayaka wrote: Hello all: I recently add a support for customize am3358 board using the branch processor-sdk-linux

Re: How can I tell who created my usb0 network device?

2016-08-15 Thread Greg KH
On Mon, Aug 15, 2016 at 03:52:10PM -0400, Patrick Doyle wrote: > I have both usb0 and usb1 network devices. > > At this point, I'm perfectly happy with my usb1 device, but, after > having spent all of this time trying to configure usb0 correctly, I > would like to learn what module created usb0. >

Re: How can I tell who created my usb0 network device?

2016-08-15 Thread Patrick Doyle
On Mon, Aug 15, 2016 at 5:02 PM, Greg KH wrote: > ls -l /sys/class/net/usb0/device/driver > > sysfs is fun :) Yes it is... I also managed to find /sys/devices/pci:00/:00:11.0/dwc3-device.1/gadget/net/usb0 with $ find /sys -name usb0 -prune Apparently, usb0 gets created because my system

Re: [PATCH 1/2] usb: dwc2: optionally assert phy "full reset" when waking up

2016-08-15 Thread John Youn
On 7/19/2016 5:06 AM, Randy Li wrote: > From: Doug Anderson > > On the rk3288 USB host-only port (the one that's not the OTG-enabled > port) the PHY can get into a bad state when a wakeup is asserted (not > just a wakeup from full system suspend but also a wakeup from > autosuspend). The problem

Re: [PATCH] usb: dwc2: Add reset control to dwc2

2016-08-15 Thread John Youn
Hi Felipe, On 8/10/2016 6:53 AM, Dinh Nguyen wrote: > From: Dinh Nguyen > > Allow for platforms that have a reset controller driver in place to bring > the USB IP out of reset. > > Signed-off-by: Dinh Nguyen > Acked-by: John Youn > Tested-by: Stefan Wahren > --- > Hi Felipe, > > Can you ple

Re: [PATCH] whci: Remove deprecated create_singlethread_workqueue

2016-08-15 Thread Tejun Heo
On Sat, Aug 13, 2016 at 09:20:40PM +0530, Bhaktipriya Shridhar wrote: > alloc_ordered_workqueue replaces the deprecated > create_singlethread_workqueue. > > The workqueue "workqueue" has multiple workitems which may require > ordering. Hence, a dedicated ordered workqueue has been used. > Since th

Re: [PATCH 1/2] usb: dwc2: optionally assert phy "full reset" when waking up

2016-08-15 Thread Randy Li
On 08/16/2016 06:19 AM, John Youn wrote: On 7/19/2016 5:06 AM, Randy Li wrote: From: Doug Anderson On the rk3288 USB host-only port (the one that's not the OTG-enabled port) the PHY can get into a bad state when a wakeup is asserted (not just a wakeup from full system suspend but also a wake

Re: [PATCH 2/2] usb: Kconfig: move ulpi bus to common

2016-08-15 Thread Peter Chen
On Mon, Aug 15, 2016 at 04:07:14PM +0300, Heikki Krogerus wrote: > Hi, > > On Fri, Jul 08, 2016 at 04:15:23PM +0800, Peter Chen wrote: > > The ULPI bus is not only for host, but for device mode too, so move > > it out from host's Kconfig. > > > > Cc: Heikki Krogerus > > Signed-off-by: Peter Chen

Re: [PATCH V2 RFC 1/6] usb: dwc2: core: Avoid nonsense error in gadget mode

2016-08-15 Thread John Youn
On 7/26/2016 11:54 AM, Stefan Wahren wrote: > In gadget mode On bcm2835 platform the host tx fifo size could be zero. > So add zero to range and avoid such nonsense errors: > > dwc2 2098.usb: 0 invalid for host_nperio_tx_fifo_size. > dwc2 2098.usb: Setting host_nperio_tx_fifo_size to 0 > d

Re: [PATCH] USB: core: of: Check device_node before parsing in usb_of_get_child_node()

2016-08-15 Thread Peter Chen
On Mon, Aug 15, 2016 at 11:31:10AM -0700, Vaibhav Hiremath wrote: > In case of HUB devices connected to USB ports, we may not have DT > node representing it inside USB, and when devices connected to hub > gets enumerated, call to usb_of_get_child_node() leads to NULL pointer > dereference. > > In

Re: [lkp] [usb] ad05399d68: BUG: unable to handle kernel NULL pointer dereference at 0000000000000012

2016-08-15 Thread Peter Chen
On Mon, Aug 15, 2016 at 10:49:55PM +0800, Ye Xiaolong wrote: > On 08/15, Peter Chen wrote: > > > >> > >> > >>FYI, we noticed the following commit: > >> > >>https://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb.git testing/next > >>commit > >>ad05399d68b6ae1649cdcfc82ce3ffea1a7c5104 ("usb: udc

Re: [PATCH] usb: chipidea: host: disable io watchdog

2016-08-15 Thread Peter Chen
On Mon, Aug 15, 2016 at 04:09:07PM +0200, Lucas Stach wrote: > The Chipidea EHCI core seems to behave sanely and doesn't need > the IO watchdog. This kills off 10 non-deferrable wakeup events > per second when the controller is otherwise idle. > > Signed-off-by: Lucas Stach > Tested-by: Stefan Ag

Re: [PATCH 1/2] usb: dwc2: optionally assert phy "full reset" when waking up

2016-08-15 Thread John Youn
On 8/15/2016 6:11 PM, Randy Li wrote: > > > On 08/16/2016 06:19 AM, John Youn wrote: >> On 7/19/2016 5:06 AM, Randy Li wrote: >>> From: Doug Anderson >>> >>> On the rk3288 USB host-only port (the one that's not the OTG-enabled >>> port) the PHY can get into a bad state when a wakeup is asserted

Re: [PATCH v2 3/3] usb: gadget: add f_uac1 variant based on new u_audio api

2016-08-15 Thread Peter Chen
On Sun, Aug 14, 2016 at 01:21:24AM +0300, Ruslan Bilovol wrote: > This patch adds new function f_uac1_newapi that > uses recently created u_audio api. This makes > f_uac1_newapi implementation much simpler by > reusing existing u_audio core utilities. > > This also drops previous f_uac1 approach (

Re: [lkp] [usb] ad05399d68: BUG: unable to handle kernel NULL pointer dereference at 0000000000000012

2016-08-15 Thread Ye Xiaolong
On 08/16, Peter Chen wrote: >On Mon, Aug 15, 2016 at 10:49:55PM +0800, Ye Xiaolong wrote: >> On 08/15, Peter Chen wrote: >> > >> >> >> >> >> >>FYI, we noticed the following commit: >> >> >> >>https://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb.git testing/next >> >>commit >> >>ad05399d68b6a

Re: [PATCH] scsi: introduce a quirk for false cache reporting

2016-08-15 Thread Martin K. Petersen
> "Oliver" == Oliver Neukum writes: Oliver, Oliver> wce_default_on controls the default if the device provides no Oliver> indication. The problem here is that the indication the device Oliver> provides must be overridden, as they are false. Can't you just blacklist the mode select on the de

[PATCH] add COMMON_CLK dependency for rockchip-inno-usb2

2016-08-15 Thread Frank Wang
On kernel builds without COMMON_CLK, the newly added rockchip-inno-usb2 driver fails to build, and this adds the required Kconfig dependency to fix it. Frank Wang (1): phy: rockchip-inno-usb2: add COMMON_CLK dependency drivers/phy/Kconfig |1 + 1 file changed, 1 insertion(+) -- 1.7.9.5

[RESEND PATCH 1/1] phy: rockchip-inno-usb2: add COMMON_CLK dependency

2016-08-15 Thread Frank Wang
On kernel builds without COMMON_CLK, the newly added rockchip-inno-usb2 driver fails to build: drivers/phy/phy-rockchip-inno-usb2.c:124:16: error: field 'clk480m_hw' has incomplete type struct clk_hw clk480m_hw; In file included from include/linux/clk.h:16:0 from drivers/phy/p

[RESEND PATCH 0/1] add COMMON_CLK dependency for rockchip-inno-usb2

2016-08-15 Thread Frank Wang
On kernel builds without COMMON_CLK, the newly added rockchip-inno-usb2 driver fails to build, and this adds the required Kconfig dependency to fix it. Frank Wang (1): phy: rockchip-inno-usb2: add COMMON_CLK dependency drivers/phy/Kconfig |1 + 1 file changed, 1 insertion(+) -- 1.7.9.5

[PATCH] phy: rockchip-inno-usb2: add COMMON_CLK dependency

2016-08-15 Thread Frank Wang
On kernel builds without COMMON_CLK, the newly added rockchip-inno-usb2 driver fails to build: drivers/phy/phy-rockchip-inno-usb2.c:124:16: error: field 'clk480m_hw' has incomplete type struct clk_hw clk480m_hw; In file included from include/linux/clk.h:16:0 from drivers/phy/p