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

2016-04-21 Thread Bjørn Mork
Vaishali Thakkar writes: > When sizeof is applied to a pointer typed expression, it gives > the size of the pointer. So, do not use sizeof on pointer type. What if the intended result was the size of the pointer? > Problem found using Coccinelle. Yes, sure. But you cannot just blindly apply t

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

2016-04-21 Thread Clemens Ladisch
Vaishali Thakkar wrote: > When sizeof is applied to a pointer typed expression, it gives > the size of the pointer. And why would that be wrong in this case? > +++ b/drivers/usb/core/hcd.c > @@ -1386,7 +1386,7 @@ static int hcd_alloc_coherent(struct usb_bus *bus, > return -EFAULT; >

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

2016-04-21 Thread Yoshihiro Shimoda
Hi, > From: linux-renesas-soc-ow...@vger.kernel.org > [mailto:linux-renesas-soc-ow...@vger.kernel.org] On Behalf Of Yoshihiro > Shimoda > Sent: Thursday, April 21, 2016 7:28 PM > > Hi Felipe, > > > From: Felipe Balbi > > Sent: Thursday, April 21, 2016 7:19 PM > > > > Yoshihiro Shimoda writes:

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

2016-04-21 Thread Peter Chen
On Wed, Apr 20, 2016 at 10:03:34AM +0300, Roger Quadros wrote: > On 20/04/16 08:08, Yoshihiro Shimoda wrote: > > Hi, > > > >> From: Peter Chen > >> Sent: Tuesday, April 19, 2016 6:18 PM > >> > >> On Fri, Apr 15, 2016 at 10:03:16AM +, Yoshihiro Shimoda wrote: > >>> Hi, > >>> > From: Yoshih

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 deletion(-) diff --git a/drivers/u

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 14

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: > > > > H

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 > --- > drivers/usb/musb/jz4740

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 p

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 drivers/usb/core/

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 / oth

Re: [PATCH v2 5/6] usb: host: xhci: plat: make use of new methods in xhci_plat_priv

2016-04-21 Thread Mathias Nyman
On 21.04.2016 16:10, Mathias Nyman wrote: depends on how Mathias wants this to be handled. Mathias, do you want me to send the full series again ? any comments here ??? No need to send full series, I'll pick the updated 5/6 Appears that 5ad3b03 usb: host: xhci-plat: fix cannot work if R-C

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 >>> > bus number 5 >>> > [ 22.270160] xhci-hcd ee00.

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) >>> } >>> >>> xhci = hcd_to_xhci(hcd); >>> - match = of_match_node(usb_xhci_

Re: [PATCH v2 5/6] usb: host: xhci: plat: make use of new methods in xhci_plat_priv

2016-04-21 Thread Mathias Nyman
depends on how Mathias wants this to be handled. Mathias, do you want me to send the full series again ? any comments here ??? No need to send full series, I'll pick the updated 5/6 -Mathias -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to m

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 = of_match_node(usb_xhci_of_match, node); >> + match = of_mat

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: can't setup: -110 >> > [ 22.274931]

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

2016-04-21 Thread Greg Kroah-Hartman
On Thu, Apr 21, 2016 at 01:56:58PM +0300, Felipe Balbi wrote: > > 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 h

[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 Dat

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Š wr

RE: [PATCH v2 5/6] usb: host: xhci: plat: make use of new methods in xhci_plat_priv

2016-04-21 Thread Felipe Balbi
Mathias, Felipe Balbi writes: > Hi, > > Yoshihiro Shimoda writes: >> Hi, >> >>> Sent: Wednesday, March 30, 2016 2:59 PM >>> >>> Yoshihiro Shimoda writes: >>> > [ text/plain ] >>> > Hi Felipe, >>> > >>> > Thank you for the patch! >>> >>> hey, no problem :-) >>> >>> >> Sent: Tuesday, March 29

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, pdev->dev.of_node); Rob, it's weird

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 > > git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

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 the

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 relev

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: > > git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.

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 for v4.8 ? -- balbi signature

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 setting it would otherwise > overr

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 branch of that tree. > > > Heikki

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 use. Right now, only >>> XHCI has been converted, but more

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. Plea

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 writes: > >> > >> > If kernel configuration is CONFIG_USB_XHCI_PLATFORM=y

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 >> > CONFIG_USB_XHCI_RCAR is not set, R-Car Gen2/3 will cause long wait >> > in xhci_reset(

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() because such SoCs need specific initi

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(&ucsi->dev_lock); > >+ > >+ucsi->status = UCSI_IDLE; > >+cc

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 ? > So, this patch modifies the xhc

[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. Fix

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" [2.

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 c

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 15, 2016 at 11:01:08AM +0100, Catalin Marinas wrote: >> On Fri, Apr 15, 20

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 dual-role