Re: [PATCH] USB: OHCI: Fix NULL dereference in HCDs using HCD_LOCAL_MEM

2018-03-09 Thread Alan Stern
On Fri, 9 Mar 2018, Fredrik Noring wrote: > Scatter-gather needs to be disabled when using dma_declare_coherent_memory > and HCD_LOCAL_MEM. Andrea Righi made the equivalent fix for EHCI drivers > in commit 4307a28eb01284 "USB: EHCI: fix NULL pointer dererence in HCDs > that use HCD_LOCAL_MEM". >

Re: [PATCH v6 01/12] drivers: base: Unified device connection lookup

2018-03-09 Thread Greg Kroah-Hartman
On Fri, Mar 02, 2018 at 11:20:46AM +0100, Hans de Goede wrote: > From: Heikki Krogerus > > Several frameworks - clk, gpio, phy, pmw, etc. - maintain > lookup tables for describing connections and provide custom > API for handling them. This introduces a single generic > lookup table and API for t

Re: [PATCH] usb: typec: Separate the definitions for data and power roles

2018-03-09 Thread Greg Kroah-Hartman
On Fri, Mar 09, 2018 at 02:09:18PM +0300, Heikki Krogerus wrote: > USB Type-C specification v1.2 separated the power and data > roles more clearly. Dual-Role-Data term was introduced, and > the meaning of DRP was changed from "Dual-Role-Port" to > "Dual-Role-Power". > > In order to allow the port

[PATCH] USB: OHCI: Fix NULL dereference in HCDs using HCD_LOCAL_MEM

2018-03-09 Thread Fredrik Noring
Scatter-gather needs to be disabled when using dma_declare_coherent_memory and HCD_LOCAL_MEM. Andrea Righi made the equivalent fix for EHCI drivers in commit 4307a28eb01284 "USB: EHCI: fix NULL pointer dererence in HCDs that use HCD_LOCAL_MEM". The following NULL pointer WARN_ON_ONCE triggered wit

Re: [PATCH v4 0/7] typec: tcpm: Add sink side support for PPS

2018-03-09 Thread Greg Kroah-Hartman
On Tue, Jan 02, 2018 at 03:50:48PM +, Adam Thomson wrote: > This patch set adds sink side support for the PPS feature introduced in the > USB PD 3.0 specification. > > The source PPS supply is represented using the Power Supply framework to > provide > access and control APIs for dealing with

Re: [PATCH v1 11/14] USB: host: sl811: Re-use DEFINE_SHOW_ATTRIBUTE() macro

2018-03-09 Thread Greg Kroah-Hartman
On Wed, Feb 14, 2018 at 06:08:27PM +0200, Andy Shevchenko wrote: > ...instead of open coding file operations followed by custom ->open() > callbacks per each attribute. > > Signed-off-by: Andy Shevchenko > --- > drivers/usb/host/sl811-hcd.c | 17 +++-- > 1 file changed, 3 insertions(

Re: [PATCH v7] staging: typec: handle vendor defined part and modify drp toggling flow

2018-03-09 Thread Guenter Roeck
On Tue, Mar 06, 2018 at 09:50:32AM +0800, ShuFan Lee wrote: > From: ShuFan Lee > > Handle vendor defined behavior in tcpci_init, tcpci_set_vconn, > tcpci_start_drp_toggling > and export tcpci_irq. More operations can be extended in tcpci_data if needed. > According to TCPCI specification, 4.4.5.

Re: [PATCH v2] usb: core: introduce per-port over-current counters

2018-03-09 Thread Greg KH
On Tue, Feb 20, 2018 at 12:50:33PM +0100, Richard Leitner wrote: > From: Richard Leitner > > For some userspace applications information on the number of > over-current conditions at specific USB hub ports is relevant. > > In our case we have a series of USB hardware (using the cp210x driver) >

Re: [PATCH 3/4] usb: host: xhci-plat: revert "usb: host: xhci-plat: enable clk in resume timing"

2018-03-09 Thread Greg KH
On Fri, Mar 09, 2018 at 01:48:37AM +, Yoshihiro Shimoda wrote: > Hi Greg, > > > From: Greg KH, Sent: Friday, March 9, 2018 2:06 AM > > > > On Thu, Mar 08, 2018 at 05:17:16PM +0200, Mathias Nyman wrote: > > > From: Yoshihiro Shimoda > > > > > > This patch reverts the commit 835e4241e714 ("usb

Re: [PATCH 4/4] xhci: Fix front USB ports on ASUS PRIME B350M-A

2018-03-09 Thread Greg KH
On Fri, Mar 09, 2018 at 11:29:20AM +0800, Kai Heng Feng wrote: > Hi, > > > On Mar 9, 2018, at 1:06 AM, Greg KH wrote: > > > > On Thu, Mar 08, 2018 at 05:17:17PM +0200, Mathias Nyman wrote: > > > From: Kai-Heng Feng > > > > > > When a USB device gets plugged on ASUS PRIME B350M-A's front ports,

Re: [PATCH] usb: typec: Separate the definitions for data and power roles

2018-03-09 Thread Guenter Roeck
On Fri, Mar 09, 2018 at 02:09:18PM +0300, Heikki Krogerus wrote: > USB Type-C specification v1.2 separated the power and data > roles more clearly. Dual-Role-Data term was introduced, and > the meaning of DRP was changed from "Dual-Role-Port" to > "Dual-Role-Power". > > In order to allow the port

Re: Without US_FL_NEEDS_CAP16 read_capacity_10 is forced despite of the device capability and HDD size

2018-03-09 Thread Menion
Yeah I am in touch with scsi mantainers I have already suggested to lower it to KERN_DEBUG, not really pushed it, but they have said that from their perspective, this is a sub-optimal read_capacity path taken, that shall be logged Also, since this flag is named "try_rc_10_first" I have also suggest

Re: Without US_FL_NEEDS_CAP16 read_capacity_10 is forced despite of the device capability and HDD size

2018-03-09 Thread Alan Stern
On Fri, 9 Mar 2018, Menion wrote: > Hi all > I am discussing about an issue I get with my Orico USBtoSATA 5 bays enclosure > The issue is that every 5 minutes the BTRFS perform a revalidate > action that will fill the dmesg with this log: > > [ 98.917660] sd 0:0:0:1: [sdb] Very big device. Tryi

[RFC PATCH v2 0/3] usb: typec: Support for Alternate Modes

2018-03-09 Thread Heikki Krogerus
Hi guys, This is second version of my proposal for more complete USB Type-C Alternate Mode support. The original proposal can be read from here: https://www.spinics.net/lists/linux-usb/msg161098.html These patches now depend on series from Hans where he is introducing mux handling support for USB

[RFC PATCH v2 2/3] usb: typec: Bus type for alternate modes

2018-03-09 Thread Heikki Krogerus
Introducing a simple bus for the alternate modes. Bus allows binding drivers to the discovered alternate modes the partners support. Signed-off-by: Heikki Krogerus --- Documentation/ABI/obsolete/sysfs-class-typec | 48 +++ Documentation/ABI/testing/sysfs-bus-typec| 51 Documentation/A

[RFC PATCH v2 1/3] usb: typec: Register a device for every mode

2018-03-09 Thread Heikki Krogerus
Before a device was created for every discovered SVID, but this will create a device for every discovered mode of every SVID. The idea is to make it easier to create mode specific drivers once a bus for the alternate mode is added. Signed-off-by: Heikki Krogerus --- drivers/usb/typec/class.c | 1

[RFC PATCH v2 3/3] usb: typec: tcpm: Support for Alternate Modes

2018-03-09 Thread Heikki Krogerus
This adds more complete handling of VDMs and registration of partner alternate modes, and introduces callbacks for alternate mode operations. Only DFP role is supported for now. Signed-off-by: Heikki Krogerus --- drivers/usb/typec/tcpm.c | 133 +++ 1

Re: [PATCHv4] phy: mapphone-mdm6600: Add USB PHY driver for MDM6600 on Droid 4

2018-03-09 Thread Tony Lindgren
* Pavel Machek [180309 09:45]: > Hi! > > > Let's add support for the GPIO controlled USB PHY on the MDM6600 modem. > > It is used on some Motorola Mapphone series of phones and tablets such > > as Droid 4. > ... > > So it seems that MDM6600 is currently not yet idling even with it's > > radio tur

Re: [PATCH v2] usb: musb: Fix external abort in musb_remove on omap2430

2018-03-09 Thread Bin Liu
Hi, On Thu, Mar 08, 2018 at 11:19:48PM +0100, Merlijn Wajer wrote: > This fixes an oops on unbind / module unload (on the musb omap2430 > platform). > > musb_remove function now calls musb_platform_exit before disabling > runtime pm. > > Signed-off-by: Merlijn Wajer Applied. Thanks. Regards,

Re: [PATCH v1 10/14] usb: dwc2: Add dwc2_enter_hibernation(), dwc2_exit_hibernation()

2018-03-09 Thread Grigor Tovmasyan
Hi Balbi, This patch didn't apply, because you missing 01/14 and 02/14 commits from this patch seria. Please apply following patches and try again. [PATCH v1 01/14] usb: dwc2: Rename hibernation to partial_power_down [PATCH v1 02/14] usb: dwc2: Add hibernation field into dwc2_hw_params On 3/9/201

Re: [PATCH] usb: musb: Fix external abort in musb_remove

2018-03-09 Thread Bin Liu
On Thu, Mar 08, 2018 at 11:17:48PM +0100, Merlijn Wajer wrote: > Hi, > > On 08/03/18 22:15, Bin Liu wrote: > > > please add patch version numbers in the subject when necessary. This > > helps cross-referencing. > > Will do. I naively assumed that the first patch would implicitly be > number 1. W

Re: [PATCH v1 10/14] usb: dwc2: Add dwc2_enter_hibernation(), dwc2_exit_hibernation()

2018-03-09 Thread Grigor Tovmasyan
Hi Balbi, Seems like your testing/next was changed. I will rebese and send them again. On 3/9/2018 1:07 PM, Felipe Balbi wrote: > Grigor Tovmasyan writes: > >> From: Vardan Mikayelyan >> >> These are wrapper functions which are calling device or host >> enter/exit hibernation functions. >> >>

Re: [PATCH 11/11] usb: dwc2: Enable LPM

2018-03-09 Thread Grigor Tovmasyan
Hi John, Could you please add your Signed-off to this patch? On 3/9/2018 12:06 PM, Felipe Balbi wrote: > Hi, > > Grigor Tovmasyan writes: >> From: John Youn >> >> Set 'lpm_capable' flag in the gadget structure so >> indicating that LPM is supported. >> >> Signed-off-by: Sevak Arakelyan >> Sign

Re: [balbi-usb:testing/next 45/57] drivers/usb/dwc2/core.c:438:13: error: static declaration of 'dwc2_clear_force_mode' follows non-static declaration

2018-03-09 Thread Grigor Tovmasyan
Hi Balbi, I saw you applied "e9c07984979d usb: dwc2: Force mode optimizations" patch to your testing/next. Please re-apply this commit. On 2/15/2018 6:37 PM, Grigor Tovmasyan wrote: > Hi Balbi > > On 2/15/2018 17:34, Felipe Balbi wrote: >> Hi, >> >> kbuild test robot writes: >>> tree: >>> htt

[PATCH v2] usb: dwc3: Prevent indefinite sleep in _dwc3_set_mode during suspend/resume

2018-03-09 Thread Roger Quadros
In the following test we get stuck by sleeping forever in _dwc3_set_mode() after which dual-role switching doesn't work. On dra7-evm's dual-role port, - Load g_zero gadget driver and enumerate to host - suspend to mem - disconnect USB cable to host and connect otg cable with Pen drive in it. - res

Re: [PATCH 2/3] usb: xhci: tegra: Add runtime PM support

2018-03-09 Thread Jon Hunter
On 09/03/18 09:13, Mathias Nyman wrote: > On 09.03.2018 10:36, Thierry Reding wrote: >> On Thu, Mar 08, 2018 at 09:31:07PM +, Jon Hunter wrote: >>> >>> On 01/03/18 14:18, Mathias Nyman wrote: On 14.02.2018 18:34, Jon Hunter wrote: > Add runtime PM support to the Tegra XHCI driver and

Re: [PATCH 2/3] usb: xhci: tegra: Add runtime PM support

2018-03-09 Thread Jon Hunter
On 09/03/18 08:36, Thierry Reding wrote: > On Thu, Mar 08, 2018 at 09:31:07PM +, Jon Hunter wrote: >> >> On 01/03/18 14:18, Mathias Nyman wrote: >>> On 14.02.2018 18:34, Jon Hunter wrote: Add runtime PM support to the Tegra XHCI driver and move the function calls to enable/disable th

[PATCH] usb: typec: Separate the definitions for data and power roles

2018-03-09 Thread Heikki Krogerus
USB Type-C specification v1.2 separated the power and data roles more clearly. Dual-Role-Data term was introduced, and the meaning of DRP was changed from "Dual-Role-Port" to "Dual-Role-Power". In order to allow the port drivers to describe the capabilities of the ports more clearly according to t

Re: [PATCH] usb: dwc3: Prevent indefinite sleep in _dwc3_set_mode during suspend/resume

2018-03-09 Thread Felipe Balbi
Hi, Roger Quadros writes: >> When we set up the DWC3_DEPCMD_ENDTRANSFER command in >> dwc3_stop_active_transfer(), we can do not set DWC3_DEPCMD_CMDIOC, >> then there will no endpoint command complete interrupts I think. >> >> cmd |= DWC3_DEPCMD_CMDIOC; > > I remember

Re: [PATCH] usb: dwc3: Prevent indefinite sleep in _dwc3_set_mode during suspend/resume

2018-03-09 Thread Felipe Balbi
Hi, Roger Quadros writes: >>> This is what the v3.10 databook says >>> >>> "When issuing an End Transfer command, software must set the CmdIOC >>> bit (field 8) so that an Endpoint Command Complete event is generated >>> after the transfer ends. This is necessary to synchronize the >>> conclusio

Re: [PATCH v5 1/6] dt-bindings: add bindings for USB physical connector

2018-03-09 Thread Roger Quadros
Hi, On 27/02/18 09:11, Andrzej Hajda wrote: > These bindings allow to describe most known standard USB connectors > and it should be possible to extend it if necessary. > USB connectors, beside USB can be used to route other protocols, > for example UART, Audio, MHL. In such case every device pass

Re: [PATCH] usb: dwc3: Prevent indefinite sleep in _dwc3_set_mode during suspend/resume

2018-03-09 Thread Roger Quadros
On 09/03/18 11:26, Roger Quadros wrote: > On 09/03/18 11:23, Felipe Balbi wrote: >> >> Hi, >> >> Roger Quadros writes: >> >> >> > When we set up the DWC3_DEPCMD_ENDTRANSFER command in > dwc3_stop_active_transfer(), we can do not set DWC3_DEPCMD_CMDIOC, > then there will no endpoint co

Re: [PATCHv4] phy: mapphone-mdm6600: Add USB PHY driver for MDM6600 on Droid 4

2018-03-09 Thread Pavel Machek
Hi! > Let's add support for the GPIO controlled USB PHY on the MDM6600 modem. > It is used on some Motorola Mapphone series of phones and tablets such > as Droid 4. ... > So it seems that MDM6600 is currently not yet idling even with it's > radio turned off, but that's something that is beyond the

Re: [PATCH] usb: dwc3: Prevent indefinite sleep in _dwc3_set_mode during suspend/resume

2018-03-09 Thread Roger Quadros
On 09/03/18 11:23, Felipe Balbi wrote: > > Hi, > > Roger Quadros writes: > > > When we set up the DWC3_DEPCMD_ENDTRANSFER command in dwc3_stop_active_transfer(), we can do not set DWC3_DEPCMD_CMDIOC, then there will no endpoint command complete interrupts I think. cmd

Re: [PATCH] usb: dwc3: Prevent indefinite sleep in _dwc3_set_mode during suspend/resume

2018-03-09 Thread Felipe Balbi
Hi, Roger Quadros writes: >>> When we set up the DWC3_DEPCMD_ENDTRANSFER command in >>> dwc3_stop_active_transfer(), we can do not set DWC3_DEPCMD_CMDIOC, >>> then there will no endpoint command complete interrupts I think. >>> >>> cmd |= DWC3_DEPCMD_CMDIOC; >> >> I remember some part of the

Re: [PATCH v5 0/6] dt-bindings: add bindings for USB physical connector

2018-03-09 Thread Andrzej Hajda
Hi Chanwoo, On 08.03.2018 02:52, Chanwoo Choi wrote: > Hi Andrzej, Archit, > > On 2018년 03월 07일 20:13, Andrzej Hajda wrote: >> Hi Chanwoo, Archit, >> >> On 07.03.2018 05:48, Chanwoo Choi wrote: >>> On 2018년 03월 07일 11:12, Chanwoo Choi wrote: Hi Rob and Andrzej, On 2018년 03월 06일 21:5

Re: [PATCH v4 2/2] usb/gadget: Add driver for Aspeed SoC virtual hub

2018-03-09 Thread Felipe Balbi
Benjamin Herrenschmidt writes: > The Aspeed BMC SoCs support a "virtual hub" function. It provides some > HW support for a top-level USB2 hub behind which sit 5 gadget "ports". > > This driver adds support for the full functionality, emulating the > hub standard requests and exposing 5 UDC gadget

Re: [PATCH] usb: dwc3: Prevent indefinite sleep in _dwc3_set_mode during suspend/resume

2018-03-09 Thread Roger Quadros
On 05/03/18 13:27, Felipe Balbi wrote: > > Hi, > > Baolin Wang writes: >> void dwc3_gadget_exit(struct dwc3 *dwc) >> { >> + int epnum; >> + unsigned long flags; >> + >> + spin_lock_irqsave(&dwc->lock, flags); >> + for (epnum = 2; epnu

Re: [PATCH] usb: dwc2: Print error if unable to set DMA coherent mask

2018-03-09 Thread Felipe Balbi
Stefan Wahren writes: >> Stefan Wahren hat am 12. Februar 2018 um 21:20 >> geschrieben: >> >> >> We better print an error in case probing of dwc2 fails on >> setting the DMA coherent mask. >> >> Signed-off-by: Stefan Wahren >> --- >> drivers/usb/dwc2/platform.c | 4 +++- >> 1 file changed,

Re: [PATCH 2/3] usb: xhci: tegra: Add runtime PM support

2018-03-09 Thread Mathias Nyman
On 09.03.2018 10:36, Thierry Reding wrote: On Thu, Mar 08, 2018 at 09:31:07PM +, Jon Hunter wrote: On 01/03/18 14:18, Mathias Nyman wrote: On 14.02.2018 18:34, Jon Hunter wrote: Add runtime PM support to the Tegra XHCI driver and move the function calls to enable/disable the clocks, regul

Re: [PATCH v1 10/14] usb: dwc2: Add dwc2_enter_hibernation(), dwc2_exit_hibernation()

2018-03-09 Thread Felipe Balbi
Grigor Tovmasyan writes: > From: Vardan Mikayelyan > > These are wrapper functions which are calling device or host > enter/exit hibernation functions. > > Signed-off-by: Vardan Mikayelyan > Signed-off-by: John Youn > Signed-off-by: Grigor Tovmasyan didn't apply to testing/next. Care to reba

Re: [PATCH 2/4] usb: dwc3: add dwc3 glue layer for UniPhier SoCs

2018-03-09 Thread Felipe Balbi
Hi, Masahiro Yamada writes: > +static void dwc3u_reset_init(struct dwc3u_priv *priv) > +{ > + dwc3u_maskwrite(priv, RESET_CTL, LINK_RESET, 0); > + usleep_range(1000, 2000); > + dwc3u_maskwrite(priv, RESET_CTL, LINK_RESET, LINK_RESET); > +} > + > +static

Re: [PATCH] usb: dwc3: core: power on PHYs before initializing core

2018-03-09 Thread Felipe Balbi
Hi, Roger Quadros writes: > Hi, > > On 08/03/18 18:49, Brian Norris wrote: >> Hi, >> >> On Thu, Mar 08, 2018 at 12:43:40PM +0200, Felipe Balbi wrote: >>> William Wu writes: The dwc3_core_init() gets the PHYs and initializes the PHYs with the usb_phy_init() and phy_init() functions be

Re: [PATCH] usb: dwc3: core: power on PHYs before initializing core

2018-03-09 Thread Roger Quadros
Hi, On 08/03/18 18:49, Brian Norris wrote: > Hi, > > On Thu, Mar 08, 2018 at 12:43:40PM +0200, Felipe Balbi wrote: >> William Wu writes: >>> The dwc3_core_init() gets the PHYs and initializes the PHYs with >>> the usb_phy_init() and phy_init() functions before initializing >>> core, and power on

RE: [PATCH 4.16 REGRESSION fix] Revert "typec: tcpm: Only request matching pdos"

2018-03-09 Thread Jun Li
Hi, > -Original Message- > From: linux-usb-ow...@vger.kernel.org > [mailto:linux-usb-ow...@vger.kernel.org] On Behalf Of Heikki Krogerus > Sent: 2018年3月6日 20:33 > To: Hans de Goede > Cc: Greg Kroah-Hartman ; Guenter Roeck > ; linux-usb@vger.kernel.org; Badhri Jagan Sridharan > > Subject:

Re: [PATCH 2/3] usb: xhci: tegra: Add runtime PM support

2018-03-09 Thread Thierry Reding
On Thu, Mar 08, 2018 at 09:31:07PM +, Jon Hunter wrote: > > On 01/03/18 14:18, Mathias Nyman wrote: > > On 14.02.2018 18:34, Jon Hunter wrote: > >> Add runtime PM support to the Tegra XHCI driver and move the function > >> calls to enable/disable the clocks, regulators and PHY into the runtime

Without US_FL_NEEDS_CAP16 read_capacity_10 is forced despite of the device capability and HDD size

2018-03-09 Thread Menion
Hi all I am discussing about an issue I get with my Orico USBtoSATA 5 bays enclosure The issue is that every 5 minutes the BTRFS perform a revalidate action that will fill the dmesg with this log: [ 98.917660] sd 0:0:0:1: [sdb] Very big device. Trying to use READ CAPACITY(16). [ 99.057592] sd

Re: [PATCH v7 4/4] soc/tegra: pmc: Use the new reset APIs to manage reset controllers

2018-03-09 Thread Thierry Reding
On Wed, Jul 19, 2017 at 05:59:08PM +0200, Philipp Zabel wrote: > From: Vivek Gautam > > Make use of of_reset_control_array_get_exclusive() to manage > an array of reset controllers available with the device. > > Cc: Jon Hunter > Cc: Thierry Reding > Signed-off-by: Vivek Gautam > [p.za...@peng

Re: [PATCH 11/11] usb: dwc2: Enable LPM

2018-03-09 Thread Felipe Balbi
Hi, Grigor Tovmasyan writes: > From: John Youn > > Set 'lpm_capable' flag in the gadget structure so > indicating that LPM is supported. > > Signed-off-by: Sevak Arakelyan > Signed-off-by: Grigor Tovmasyan Missing John's Signed-off-by. What gives? I'll drop this from my queue for now. -- b