RE: [PATCH v6 07/12] usb: otg: add OTG/dual-role core

2016-04-21 Thread Yoshihiro Shimoda
Hi, > From: Peter Chen > Sent: Friday, April 22, 2016 12:34 PM > > On Fri, Apr 22, 2016 at 09:26:46AM +0800, Peter Chen wrote: > > On Fri, Apr 15, 2016 at 10:03:16AM +, Yoshihiro Shimoda wrote: > > > Hi, > > > > > > > From: Yoshihiro Shimoda > > > > Sent: Friday, April 15, 2016 6:59 PM > > >

[PATCH] usb: core: Do not use sizeof on pointer type

2016-04-21 Thread Vaishali Thakkar
When sizeof is applied to a pointer typed expression, it gives the size of the pointer. So, do not use sizeof on pointer type. Problem found using Coccinelle. Signed-off-by: Vaishali Thakkar --- drivers/usb/core/hcd.c | 2 +- 1 file changed, 1 insertion(+), 1

Re: [PATCH v6 07/12] usb: otg: add OTG/dual-role core

2016-04-21 Thread Peter Chen
On Fri, Apr 22, 2016 at 09:26:46AM +0800, Peter Chen wrote: > On Fri, Apr 15, 2016 at 10:03:16AM +, Yoshihiro Shimoda wrote: > > Hi, > > > > > From: Yoshihiro Shimoda > > > Sent: Friday, April 15, 2016 6:59 PM > > > > > > Hi, > > > > > > > From: Roger Quadros > > > > Sent: Thursday, April

Re: [PATCH v6 07/12] usb: otg: add OTG/dual-role core

2016-04-21 Thread Peter Chen
On Fri, Apr 15, 2016 at 10:03:16AM +, Yoshihiro Shimoda wrote: > Hi, > > > From: Yoshihiro Shimoda > > Sent: Friday, April 15, 2016 6:59 PM > > > > Hi, > > > > > From: Roger Quadros > > > Sent: Thursday, April 14, 2016 8:32 PM > > > > > > On 14/04/16 14:15, Yoshihiro Shimoda wrote: > > > >

Re: [PATCH] usb: musb: jz4740: fix error check of usb_get_phy()

2016-04-21 Thread Vladimir Zapolskiy
Hi Bin, On 09.03.2016 02:57, Vladimir Zapolskiy wrote: > The usb_get_phy() function returns either a valid pointer to phy or > ERR_PTR() error, check for NULL always fails and may lead to oops on > error path, fix this issue. > > Signed-off-by: Vladimir Zapolskiy > --- >

Bug 116821 - Regression: System freeze when unplugging unmounted USB flash drive from powered hub

2016-04-21 Thread John
jbMacAZ 2016-04-20 22:39:07 UTC System hangs requiring hard reboot. System behaves normally with earlier kernels upto 4.6-rc3. Reverting all edits to drivers/USB/ between rc3 and rc4 does NOT fix the problem. Problem first appears at 4.6-rc3-next20160412, still

Re: What are Shared HCD and Companion Controller(HCD?)

2016-04-21 Thread Alan Stern
On Thu, 21 Apr 2016, Peter Chen wrote: > I have one more question, if hcd codes takes primary hcd as USB2 and > shared hcd as USB3, are there any problems if EHCI (or OHCI) as primary > hcd and OHCI (EHCI) as shared hcd like [1], current hcd code seems to > use hcd->shared_hcd at

Re: Microsoft wireless usb mouse frequently fails to detect in ubuntu 15.10/16.04

2016-04-21 Thread Alan Stern
On Thu, 21 Apr 2016, rootsr wrote: > Hello all, > > I am using ubuntu 16.04 (upgraded yesterday from 15.10) on Dell > inspiron 15 3000 series (core i7). While using Microsoft wireless > mouse, it fails to detect most of the time. The issue is not there > when I use the same mouse in Windows /

Re: [PATCH] usb: host: xhci-rcar: Avoid long wait in xhci_reset()

2016-04-21 Thread Felipe Balbi
Hi, Geert Uytterhoeven writes: > On Thu, Apr 21, 2016 at 12:27 PM, Yoshihiro Shimoda > wrote: >>> > [1.565605] xhci-hcd ee00.usb: xHCI Host Controller >>> > [1.570636] xhci-hcd ee00.usb: new USB bus registered, assigned

Re: devicetree: avoid duplicated matching code (was: Re: [PATCH 1/3] xhci: plat: adapt to unified device property interface)

2016-04-21 Thread Felipe Balbi
Hi, Rob Herring writes: > On Thu, Apr 21, 2016 at 6:20 AM, Felipe Balbi > wrote: >> >> Hi, >> >> Heikki Krogerus writes: >>> @@ -197,7 +196,7 @@ static int xhci_plat_probe(struct platform_device *pdev) >>>

Re: devicetree: avoid duplicated matching code (was: Re: [PATCH 1/3] xhci: plat: adapt to unified device property interface)

2016-04-21 Thread Rob Herring
On Thu, Apr 21, 2016 at 6:20 AM, Felipe Balbi wrote: > > Hi, > > Heikki Krogerus writes: >> @@ -197,7 +196,7 @@ static int xhci_plat_probe(struct platform_device *pdev) >> } >> >> xhci = hcd_to_xhci(hcd); >> - match =

Re: [PATCH] usb: host: xhci-rcar: Avoid long wait in xhci_reset()

2016-04-21 Thread Geert Uytterhoeven
On Thu, Apr 21, 2016 at 12:27 PM, Yoshihiro Shimoda wrote: >> > [1.565605] xhci-hcd ee00.usb: xHCI Host Controller >> > [1.570636] xhci-hcd ee00.usb: new USB bus registered, assigned bus >> > number 5 >> > [ 22.270160] xhci-hcd ee00.usb:

[PATCHv3] usb: Add driver for UCSI

2016-04-21 Thread Heikki Krogerus
USB Type-C Connector System Software Interface (UCSI) is specification that defines the registers and data structures that can be used to control USB Type-C ports on a system. UCSI is used on several Intel Broxton SoC based platforms. Things that UCSI can be used to control include at least USB

Re: 4.5.1: UBSAN: Undefined behaviour in ./arch/x86/include/asm/atomic.h:156:9

2016-04-21 Thread Greg KH
On Thu, Apr 21, 2016 at 01:17:19PM +0200, Martin MOKREJŠ wrote: > Greg KH wrote: > > On Thu, Apr 21, 2016 at 11:18:16AM +0200, Martin MOKREJŠ wrote: > > > Hi Greg, > > > > > > thank you for your answer. > > > > > > Greg KH wrote: > > > > On Thu, Apr 21, 2016 at 12:22:49AM +0200, Martin MOKREJŠ

devicetree: avoid duplicated matching code (was: Re: [PATCH 1/3] xhci: plat: adapt to unified device property interface)

2016-04-21 Thread Felipe Balbi
Hi, Heikki Krogerus writes: > @@ -197,7 +196,7 @@ static int xhci_plat_probe(struct platform_device *pdev) > } > > xhci = hcd_to_xhci(hcd); > - match = of_match_node(usb_xhci_of_match, node); > + match = of_match_node(usb_xhci_of_match,

Re: [PATCH 0/3] xhci: get rid of platform data

2016-04-21 Thread Heikki Krogerus
On Thu, Apr 21, 2016 at 02:02:38PM +0300, Felipe Balbi wrote: > > Hi, > > Heikki Krogerus writes: > > Hi, > > > > This depends on API change the device property framework in Rafael's > > linux-pm tree. > > > > Branch linux-next in > >

Re: [PATCH] xhci: Cleanup only when releasing primary hcd.

2016-04-21 Thread Mathias Nyman
On 19.04.2016 21:13, Gabriel Krisman Bertazi wrote: Under stress occasions some TI devices might not return early when reading the status register during the quirk invocation of xhci_irq made by usb_hcd_pci_remove. This means that instead of returning, we end up handling this interruption in

Re: 4.5.1: UBSAN: Undefined behaviour in ./arch/x86/include/asm/atomic.h:156:9

2016-04-21 Thread Martin MOKREJŠ
Greg KH wrote: On Thu, Apr 21, 2016 at 11:18:16AM +0200, Martin MOKREJŠ wrote: Hi Greg, thank you for your answer. Greg KH wrote: On Thu, Apr 21, 2016 at 12:22:49AM +0200, Martin MOKREJŠ wrote: Hi, I am not certain to to forward this to, so I am trying linux-usb and ext4. Please add

Re: [PATCH 1/2] usb: dwc3: pci: use build-in properties instead of platform data

2016-04-21 Thread Heikki Krogerus
On Thu, Apr 21, 2016 at 02:01:47PM +0300, Felipe Balbi wrote: > > @@ -169,20 +161,21 @@ static int dwc3_pci_probe(struct pci_dev *pci, > > return ret; > > } > > > > - pci_set_drvdata(pci, dwc3); > > - ret = dwc3_pci_quirks(pci); > > - if (ret) > > - goto err; > >

Re: [PATCH 0/2] usb: dwc3: remove platform data

2016-04-21 Thread Heikki Krogerus
On Thu, Apr 21, 2016 at 01:58:43PM +0300, Felipe Balbi wrote: > > Hi, > > Heikki Krogerus writes: > > Hi, > > > > The API changes to the device property framework that I've been > > waiting are now part of Rafael's linux-pm tree: > >

Re: [PATCH 0/3] xhci: get rid of platform data

2016-04-21 Thread Felipe Balbi
Hi, Heikki Krogerus writes: > Hi, > > This depends on API change the device property framework in Rafael's > linux-pm tree. > > Branch linux-next in > git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git same comment as other series: should we wait

Re: [PATCH 1/2] usb: dwc3: pci: use build-in properties instead of platform data

2016-04-21 Thread Felipe Balbi
Hi, Heikki Krogerus writes: > This should allow the core driver to drop handling of > platform data and expect the platform specific details to > always come from properties. > > The ACPI companion needs to be set before any build-in > properties are applied as

Re: [PATCH 0/2] usb: dwc3: remove platform data

2016-04-21 Thread Felipe Balbi
Hi, Heikki Krogerus writes: > Hi, > > The API changes to the device property framework that I've been > waiting are now part of Rafael's linux-pm tree: > git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git > > So these depend on, I guess linux-next

Re: [PATCH 0/7] usb: host: add support for threaded IRQs

2016-04-21 Thread Felipe Balbi
Hi, Felipe Balbi writes: > Hi, > > Greg Kroah-Hartman writes: >> On Mon, Apr 11, 2016 at 03:44:09PM +0300, Felipe Balbi wrote: >>> Hi guys, >>> >>> this patchset introduces support for threaded IRQs >>> for host controllers drivers to

Re: 4.5.1: UBSAN: Undefined behaviour in ./arch/x86/include/asm/atomic.h:156:9

2016-04-21 Thread Greg KH
On Thu, Apr 21, 2016 at 11:18:16AM +0200, Martin MOKREJŠ wrote: > Hi Greg, > > thank you for your answer. > > Greg KH wrote: > > On Thu, Apr 21, 2016 at 12:22:49AM +0200, Martin MOKREJŠ wrote: > > > Hi, > > > I am not certain to to forward this to, so I am trying linux-usb and > > > ext4.

RE: [PATCH] usb: host: xhci-rcar: Avoid long wait in xhci_reset()

2016-04-21 Thread Yoshihiro Shimoda
Hi Felipe, > From: Felipe Balbi > Sent: Thursday, April 21, 2016 7:19 PM > > Yoshihiro Shimoda writes: > > > Hi Felipe, > > > >> From: Felipe Balbi > >> Sent: Thursday, April 21, 2016 7:05 PM > >> > >> Yoshihiro Shimoda

RE: [PATCH] usb: host: xhci-rcar: Avoid long wait in xhci_reset()

2016-04-21 Thread Felipe Balbi
Yoshihiro Shimoda writes: > Hi Felipe, > >> From: Felipe Balbi >> Sent: Thursday, April 21, 2016 7:05 PM >> >> Yoshihiro Shimoda writes: >> >> > If kernel configuration is CONFIG_USB_XHCI_PLATFORM=y and >> >

RE: [PATCH] usb: host: xhci-rcar: Avoid long wait in xhci_reset()

2016-04-21 Thread Yoshihiro Shimoda
Hi Felipe, > From: Felipe Balbi > Sent: Thursday, April 21, 2016 7:05 PM > > Yoshihiro Shimoda writes: > > > If kernel configuration is CONFIG_USB_XHCI_PLATFORM=y and > > CONFIG_USB_XHCI_RCAR is not set, R-Car Gen2/3 will cause long wait > > in xhci_reset()

Re: [PATCHv2] usb: Add driver for UCSI

2016-04-21 Thread Heikki Krogerus
On Thu, Apr 21, 2016 at 11:37:34AM +0300, Mathias Nyman wrote: > >+static void ucsi_acpi_notify(acpi_handle handle, u32 event, void *data) > >+{ > >+struct ucsi *ucsi = data; > >+struct ucsi_cci *cci; > >+ > >+spin_lock(>dev_lock); > >+ > >+ucsi->status = UCSI_IDLE; > >+cci =

Re: [PATCH] usb: host: xhci-rcar: Avoid long wait in xhci_reset()

2016-04-21 Thread Felipe Balbi
Yoshihiro Shimoda writes: > If kernel configuration is CONFIG_USB_XHCI_PLATFORM=y and > CONFIG_USB_XHCI_RCAR is not set, R-Car Gen2/3 will cause long wait > in xhci_reset() because such SoCs need specific initialization. where is the delay coming from exactly ?

[PATCH] usb: host: xhci-rcar: Avoid long wait in xhci_reset()

2016-04-21 Thread Yoshihiro Shimoda
If kernel configuration is CONFIG_USB_XHCI_PLATFORM=y and CONFIG_USB_XHCI_RCAR is not set, R-Car Gen2/3 will cause long wait in xhci_reset() because such SoCs need specific initialization. So, this patch modifies the xhci_rcar_init_quirk() in xhci-rcar.h to exit the probe function immediately.

Re: 4.5.1: UBSAN: Undefined behaviour in ./arch/x86/include/asm/atomic.h:156:9

2016-04-21 Thread Martin MOKREJŠ
Hi Greg, thank you for your answer. Greg KH wrote: On Thu, Apr 21, 2016 at 12:22:49AM +0200, Martin MOKREJŠ wrote: Hi, I am not certain to to forward this to, so I am trying linux-usb and ext4. Please add relevant people/lists, thank you. # dmesg | grep "UBSAN: Undefined behaviour" [

Re: [PATCH 1/2] usb: chipidea: add flag CI_HDRC_DP_ALWAYS_PULLUP

2016-04-21 Thread Peter Chen
On Tue, Apr 19, 2016 at 12:20:18PM +0530, maitysancha...@gmail.com wrote: > Hello Peter, > > On 16-04-19 10:40:20, Peter Chen wrote: > > On Mon, Apr 18, 2016 at 02:36:06PM +0530, maitysancha...@gmail.com wrote: > > > Hello Peter, > > > > > > I tested this on a Colibri Vybrid VF61 module with the

Re: [PATCHv2] usb: Add driver for UCSI

2016-04-21 Thread Mathias Nyman
On 20.04.2016 13:19, Heikki Krogerus wrote: USB Type-C Connector System Software Interface (UCSI) is specification that defines the registers and data structures that can be used to control USB Type-C ports on a system. UCSI is used on several Intel Broxton SoC based platforms. Things that UCSI

Re: dwc3 initiated xhci probe problem in arm64 4.4 kernel due to DMA setup

2016-04-21 Thread Felipe Balbi
Hi, Grygorii Strashko writes: > On 04/15/2016 02:31 PM, Felipe Balbi wrote: >> Catalin Marinas writes: >>> On Fri, Apr 15, 2016 at 01:30:01PM +0300, Felipe Balbi wrote: Catalin Marinas writes: > On Fri, Apr

Re: [PATCH v6 07/12] usb: otg: add OTG/dual-role core

2016-04-21 Thread Peter Chen
On Tue, Apr 05, 2016 at 05:05:12PM +0300, Roger Quadros wrote: > It provides APIs for the following tasks > > - Registering an OTG/dual-role capable controller > - Registering Host and Gadget controllers to OTG core > - Providing inputs to and kicking the OTG state machine > > Provide a

Re: What are Shared HCD and Companion Controller(HCD?)

2016-04-21 Thread Peter Chen
On Tue, Apr 19, 2016 at 10:20:33AM -0400, Alan Stern wrote: > On Tue, 19 Apr 2016, Felipe Balbi wrote: > > > Hi, > > > > Peter Chen writes: > > > Hi all, > > > > > > When I review the patch [1] for adding companion controller support for > > > OTG framework, I am puzzled

RE: [PATCH v6 09/12] usb: gadget: udc: adapt to OTG core

2016-04-21 Thread Jun Li
Hi, ... > > /** > + * usb_gadget_start - start the usb gadget controller and connect to > +bus > + * @gadget: the gadget device to start > + * > + * This is external API for use by OTG core. > + * > + * Start the usb device controller and connect to bus (enable pull). > + */ > +static int