Re: [PATCH 2/3] usb: dwc3: use BIT() macro where possible

2017-02-16 Thread Felipe Balbi
Hi, Roger Quadros writes: > On 15/02/17 13:44, Felipe Balbi wrote: >> >> Hi, >> >> Roger Quadros writes: >>> To avoid checkpatch warnings with new patches let's >>> start using the BIT() macro wherever possible. >>> >>> Signed-off-by: Roger Quadros >>> --- >>> drivers/usb/dwc3/core.h |

RE: How to get related device pointer via DT?

2017-02-16 Thread Yoshihiro Shimoda
Hi Peter, > From: Peter Chen > Sent: Wednesday, February 15, 2017 7:02 PM > > On Wed, Feb 15, 2017 at 02:21:55AM +, Yoshihiro Shimoda wrote: < snip > > > If my idea A), ehci0 will have companion = <&ohci>; > > If my idea B), no need to add any property. > > > > What do you think? > > Anyway,

Re: [PATCH] drivers: usb-misc: sisusbvga: remove dead code

2017-02-16 Thread Oliver Neukum
Am Dienstag, den 07.02.2017, 22:01 -0600 schrieb Gustavo A. R. Silva: > The condition modex % 16 cannot be true when modex value is equal to > 640 > The condition du & 0xff cannot be true when du value is equal to > 0x1400 >  Sorry for speaking up so late, but this is not a good idea. We lose the

Re: [PATCH 2/3] usb: dwc3: use BIT() macro where possible

2017-02-16 Thread Roger Quadros
On 16/02/17 10:54, Felipe Balbi wrote: > > Hi, > > Roger Quadros writes: >> On 15/02/17 13:44, Felipe Balbi wrote: >>> >>> Hi, >>> >>> Roger Quadros writes: To avoid checkpatch warnings with new patches let's start using the BIT() macro wherever possible. Signed-off-by: Roge

[PATCH v2 2/3] usb: dwc3: use BIT() macro where possible

2017-02-16 Thread Roger Quadros
To avoid checkpatch warnings with new patches let's start using the BIT() macro wherever possible. Signed-off-by: Roger Quadros --- v2: -include bitops.h drivers/usb/dwc3/core.h | 193 ++- drivers/usb/dwc3/dwc3-omap.c | 48 +-- drivers/usb/d

Re: v4.10-rc8 (-rc6) boot regression on Intel desktop, does not boot after cold boots, boots after reboot

2017-02-16 Thread Pavel Machek
Hi! On Wed 2017-02-15 15:34:27, Linus Torvalds wrote: > On Wed, Feb 15, 2017 at 3:20 PM, Pavel Machek wrote: > > 4.10-rc4 broken > > 4.10-rc3 ok > > Hmm. If those actually end up being reliable, then there's not a whole > lot in between them wrt PCI or USB. > > What looked like the most likely

RE: RE: Re: Re: Re: Subject: [PATCH v2] USB:Core: BugFix: Proper handling of Race Condition when two USB class drivers try to call init_usb_class simultaneously

2017-02-16 Thread Ajay Kaher
  > > At boot time, probe function of multiple connected devices > > (proprietary devices) execute simultaneously. > >  What exactly do you mean here?  How can probe happen "simultaneously"? >  The USB core prevents this, right? >   >> >>> I have observed two scenarios to 

[PATCH v2 2/4] usb: dwc3: omap: don't miss events during suspend/resume

2017-02-16 Thread Roger Quadros
The USB cable state can change during suspend/resume so be sure to check and update the extcon state. Signed-off-by: Roger Quadros --- drivers/usb/dwc3/dwc3-omap.c | 16 1 file changed, 16 insertions(+) diff --git a/drivers/usb/dwc3/dwc3-omap.c b/drivers/usb/dwc3/dwc3-omap.c in

[PATCH v2 3/4] usb: dwc3: add dual-role support

2017-02-16 Thread Roger Quadros
If dr_mode is "otg" then support dual role mode of operation. Get ID and VBUS information from the OTG controller and put the controller in the appropriate state. This is our dual-role state table. ID VBUSdual-role state -- --- 0 x A_HOST - Host cont

[PATCH v2 0/4] usb: dwc3: dual-role support

2017-02-16 Thread Roger Quadros
Hi, We rely on the OTG controller block or Extcon to provide us with VBUS and ID line status via an interrupt. This is then used to switch the controller between host, peripheral and idle roles based on the following table. ID VBUSdual-role state -- --- 0

[PATCH v2 1/4] usb: dwc3: core.h: add some register definitions

2017-02-16 Thread Roger Quadros
Add OTG and GHWPARAMS6 register definitions Signed-off-by: Roger Quadros --- drivers/usb/dwc3/core.h | 82 + 1 file changed, 82 insertions(+) diff --git a/drivers/usb/dwc3/core.h b/drivers/usb/dwc3/core.h index d514dca..fc82d2e 100644 --- a/driver

[PATCH v2 4/4] usb: dwc3: Workaround for super-speed host on dra7 in dual-role mode

2017-02-16 Thread Roger Quadros
dra7 OTG core limits the host controller to USB2.0 (high-speed) mode when we're operating in dual-role. We work around that by bypassing the OTG core and reading the extcon framework directly for ID/VBUS events. Signed-off-by: Roger Quadros --- Documentation/devicetree/bindings/usb/dwc3.txt |

Re: Fwd: snd_usb_toneport stops working on Linux >=4.9 (Line6 POD Studio UX1)

2017-02-16 Thread Maxim Moseychuk
>> fatal: BUG: attempt to snprintf into too-small buffer > Huh?  Where did that bug line come from?  git? Bug in git l10n. For fix run git with en locale "LANG=c git bisect ..." -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kerne

[PATCH] Revert "usb: gadget: f_fs: Fix ExtCompat descriptor validation"

2017-02-16 Thread Janusz Dziedzic
This reverts commit ac670a3a650b899fc020b81f63e810d06015b865. This introduce bug we already fixed in commit 53642399aa71 ("usb: gadget: f_fs: Fix wrong check on reserved1 wof OS_DESC_EXT_COMPAT") Next FFS (adb) SS enumeration fail with Windows OS. Signed-off-by: Janusz Dziedzic --- drivers/us

Re: [PATCH v5] usb: misc: add USB251xB/xBi Hi-Speed Hub Controller Driver

2017-02-16 Thread Greg KH
On Thu, Feb 16, 2017 at 07:36:48AM +0100, Richard Leitner wrote: > On 02/16/2017 03:30 AM, Rob Herring wrote: > > On Fri, Feb 10, 2017 at 09:19:27AM +0100, Richard Leitner wrote: > > > This patch adds a driver for configuration of the Microchip USB251xB/xBi > > > USB 2.0 hub controller series with

Re: Fwd: snd_usb_toneport stops working on Linux >=4.9 (Line6 POD Studio UX1)

2017-02-16 Thread Vitaly Tonkacheyev
I have found a patch here https://bugzilla.kernel.org/show_bug.cgi?id=193221#c9 Sound appears after patching 4.9 sources, but dmesg message left the same. 2017-02-16 15:28 GMT+02:00 Maxim Moseychuk : >>> fatal: BUG: attempt to snprintf into too-small buffer >> Huh? Where did that bug line come fr

[GIT PULL] USB-serial updates for v4.11-rc1 part 2

2017-02-16 Thread Johan Hovold
The following changes since commit 5182c2cf2a9bfb7f066ef0bdd2bb6330b94dd74e: USB: serial: mos7840: fix another NULL-deref at open (2017-02-09 13:15:07 +0100) are available in the git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial.git tags/usb-serial-4.11-rc1-

RE: RE: Re: Re: Re: Subject: [PATCH v2] USB:Core: BugFix: Proper handling of Race Condition when two USB class drivers try to call init_usb_class simultaneously

2017-02-16 Thread Alan Stern
On Thu, 16 Feb 2017, Ajay Kaher wrote: > > On Thu, 14 Feb 2017, Alan Stern wrote: > >  > > I think Ajay's argument is correct and a patch is needed.  But this > > patch misses the race between init_usb_class() and release_usb_class().   > > Thanks Alan for your comments, in patch v2 I have taken

Re: usb 2-1.5:1.0: rebind failed: -517

2017-02-16 Thread Oliver Neukum
Am Sonntag, den 12.02.2017, 22:57 -0300 schrieb Cristian Aravena: > Hello, > > My report: > https://bugzilla.kernel.org/show_bug.cgi?id=194571 > > "dmesg: > [ 5519.078456] usb 2-1.5:1.0: rebind failed: -517 > [ 5519.078461] usb 2-1.5:1.1: rebind failed: -517 Which kernel version? Which device? W

[PATCH] usb: ohci-at91: revert patch 2e2aa1bc7eff90ec on cpu without SFR register

2017-02-16 Thread Jelle Martijn Kok
External USB hubs seems to go into suspend, but never wakeup again. Tested on an AT91SAM9G20 Signed-off-by: Jelle Martijn Kok --- drivers/usb/host/ohci-at91.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/host/ohci-at91.c b/drivers/usb/host/ohci-at91.c inde

Re: [GIT PULL] USB-serial updates for v4.11-rc1 part 2

2017-02-16 Thread Greg Kroah-Hartman
On Thu, Feb 16, 2017 at 03:14:18PM +0100, Johan Hovold wrote: > The following changes since commit 5182c2cf2a9bfb7f066ef0bdd2bb6330b94dd74e: > > USB: serial: mos7840: fix another NULL-deref at open (2017-02-09 13:15:07 > +0100) > > are available in the git repository at: > > git://git.kerne

Re: [PATCH] drivers: usb-misc: sisusbvga: remove dead code

2017-02-16 Thread Greg KH
On Thu, Feb 16, 2017 at 11:28:49AM +0100, Oliver Neukum wrote: > Am Dienstag, den 07.02.2017, 22:01 -0600 schrieb Gustavo A. R. Silva: > > The condition modex % 16 cannot be true when modex value is equal to > > 640 > > The condition du & 0xff cannot be true when du value is equal to > > 0x1400 > >

Re: [PATCH] usb: ohci-at91: revert patch 2e2aa1bc7eff90ec on cpu without SFR register

2017-02-16 Thread Greg KH
On Thu, Feb 16, 2017 at 04:19:44PM +0100, Jelle Martijn Kok wrote: > External USB hubs seems to go into suspend, but never wakeup again. > Tested on an AT91SAM9G20 > > Signed-off-by: Jelle Martijn Kok > --- > drivers/usb/host/ohci-at91.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-

Re: v4.10-rc8 (-rc6) boot regression on Intel desktop, does not boot after cold boots, boots after reboot

2017-02-16 Thread Pavel Machek
Hi! > > > 4.10-rc4 broken > > > 4.10-rc3 ok > > > > Hmm. If those actually end up being reliable, then there's not a whole > > lot in between them wrt PCI or USB. > > > > What looked like the most likely candidate seems to be xhci-specific, > > though. > > > > But maybe it's something that isn

Re: v4.10-rc8 (-rc6) boot regression on Intel desktop, does not boot after cold boots, boots after reboot

2017-02-16 Thread Frederic Weisbecker
On Thu, Feb 16, 2017 at 06:25:35PM +0100, Pavel Machek wrote: > Hi! > > > > > 4.10-rc4 broken > > > > 4.10-rc3 ok > > > > > > Hmm. If those actually end up being reliable, then there's not a whole > > > lot in between them wrt PCI or USB. > > > > > > What looked like the most likely candidate se

Re: v4.10-rc8 (-rc6) boot regression on Intel desktop, does not boot after cold boots, boots after reboot

2017-02-16 Thread Linus Torvalds
On Thu, Feb 16, 2017 at 10:13 AM, Frederic Weisbecker wrote: > > I haven't followed the discussion but this patch has a known issue which is > fixed > with: > 7bdb59f1ad474bd7161adc8f923cdef10f2638d1 > "tick/nohz: Fix possible missing clock reprog after tick soft restart" > > I hope this

Re: v4.10-rc8 (-rc6) boot regression on Intel desktop, does not boot after cold boots, boots after reboot

2017-02-16 Thread Frederic Weisbecker
On Thu, Feb 16, 2017 at 10:20:14AM -0800, Linus Torvalds wrote: > On Thu, Feb 16, 2017 at 10:13 AM, Frederic Weisbecker > wrote: > > > > I haven't followed the discussion but this patch has a known issue which is > > fixed > > with: > > 7bdb59f1ad474bd7161adc8f923cdef10f2638d1 > > "tick/n

Re: v4.10-rc8 (-rc6) boot regression on Intel desktop, does not boot after cold boots, boots after reboot

2017-02-16 Thread Pavel Machek
On Thu 2017-02-16 18:25:35, Pavel Machek wrote: > Hi! > > > > > 4.10-rc4 broken > > > > 4.10-rc3 ok > > > > > > Hmm. If those actually end up being reliable, then there's not a whole > > > lot in between them wrt PCI or USB. > > > > > > What looked like the most likely candidate seems to be xhci

Re: v4.10-rc8 (-rc6) boot regression on Intel desktop, does not boot after cold boots, boots after reboot

2017-02-16 Thread Thomas Gleixner
On Thu, 16 Feb 2017, Frederic Weisbecker wrote: > On Thu, Feb 16, 2017 at 10:20:14AM -0800, Linus Torvalds wrote: > > On Thu, Feb 16, 2017 at 10:13 AM, Frederic Weisbecker > > wrote: > > > > > > I haven't followed the discussion but this patch has a known issue which > > > is fixed > > > with: >

Re: v4.10-rc8 (-rc6) boot regression on Intel desktop, does not boot after cold boots, boots after reboot

2017-02-16 Thread Pavel Machek
On Thu 2017-02-16 20:34:45, Thomas Gleixner wrote: > On Thu, 16 Feb 2017, Frederic Weisbecker wrote: > > On Thu, Feb 16, 2017 at 10:20:14AM -0800, Linus Torvalds wrote: > > > On Thu, Feb 16, 2017 at 10:13 AM, Frederic Weisbecker > > > wrote: > > > > > > > > I haven't followed the discussion but th

Re: v4.10-rc8 (-rc6) boot regression on Intel desktop, does not boot after cold boots, boots after reboot

2017-02-16 Thread Linus Torvalds
On Thu, Feb 16, 2017 at 12:06 PM, Pavel Machek wrote: > > Hmm, that would explain problems at boot _and_ problems during > suspend/resume. I've committed the revert, and I'm just assuming that the revert also fixed your suspend/resume issues, but I wanted to just double-check that since it's only

Re: v4.10-rc8 (-rc6) boot regression on Intel desktop, does not boot after cold boots, boots after reboot

2017-02-16 Thread Pavel Machek
On Thu 2017-02-16 12:21:13, Linus Torvalds wrote: > On Thu, Feb 16, 2017 at 12:06 PM, Pavel Machek wrote: > > > > Hmm, that would explain problems at boot _and_ problems during > > suspend/resume. > > I've committed the revert, and I'm just assuming that the revert also > fixed your suspend/resum

Re: [PATCH] drivers: usb-misc: sisusbvga: remove dead code

2017-02-16 Thread Felipe Balbi
Hi, Greg KH writes: > On Thu, Feb 16, 2017 at 11:28:49AM +0100, Oliver Neukum wrote: >> Am Dienstag, den 07.02.2017, 22:01 -0600 schrieb Gustavo A. R. Silva: >> > The condition modex % 16 cannot be true when modex value is equal to >> > 640 >> > The condition du & 0xff cannot be true when du val

[PATCH] ARM: imx25: set default phy_type and dr_mode for usbotg port

2017-02-16 Thread Uwe Kleine-König
All currently supported i.MX25-based machines use phy_type = "utmi" and dr_mode = "otg". So this seems to be a sensible default. This also doesn't hurt out-of-tree machines because up to now they had to specify these two properties in the machine.dts which still takes precedence by just overwriti

[PATCH] usb: misc: remove unnecessary code

2017-02-16 Thread Gustavo A. R. Silva
'val' is an unsigned variable, and less-than-zero comparison of an unsigned variable is never true. Addresses-Coverity-ID: 1230256 Signed-off-by: Gustavo A. R. Silva --- drivers/usb/misc/lvstest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/misc/lvstest.c b/dr

[PATCH] usb: atm: remove unnecessary code

2017-02-16 Thread Gustavo A. R. Silva
'index' is an unsigned variable, and less-than-zero comparison of an unsigned variable is never true. Addresses-Coverity-ID: 115396 Signed-off-by: Gustavo A. R. Silva --- drivers/usb/atm/cxacru.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/atm/cxacru.c b/drive

[PATCH] usb: host: add cast to avoid potential integer overflow

2017-02-16 Thread Gustavo A. R. Silva
The type of variable 'sel' is unsigned int. Such variable is being used multiple times in a context that expects an expression of type unsigned long long. So, to avoid any potential integer overflow, a cast to type unsigned long long is added. Addresses-Coverity-ID: 703408 Signed-off-by: Gustavo A

Re: [PATCH] ARM: imx25: set default phy_type and dr_mode for usbotg port

2017-02-16 Thread Fabio Estevam
On Thu, Feb 16, 2017 at 7:18 PM, Uwe Kleine-König wrote: > All currently supported i.MX25-based machines use phy_type = "utmi" and > dr_mode = "otg". So this seems to be a sensible default. > > This also doesn't hurt out-of-tree machines because up to now they had > to specify these two propertie

Re: v4.10-rc8 (-rc6) boot regression on Intel desktop, does not boot after cold boots, boots after reboot

2017-02-16 Thread Greg Kroah-Hartman
On Thu, Feb 16, 2017 at 09:06:24PM +0100, Pavel Machek wrote: > On Thu 2017-02-16 20:34:45, Thomas Gleixner wrote: > > On Thu, 16 Feb 2017, Frederic Weisbecker wrote: > > > On Thu, Feb 16, 2017 at 10:20:14AM -0800, Linus Torvalds wrote: > > > > On Thu, Feb 16, 2017 at 10:13 AM, Frederic Weisbecker

Re: [PATCH] Revert "usb: gadget: f_fs: Fix ExtCompat descriptor validation"

2017-02-16 Thread Vincent Pelletier
On Thu, 16 Feb 2017 14:54:12 +0100, Janusz Dziedzic wrote: > This reverts commit ac670a3a650b899fc020b81f63e810d06015b865. > > This introduce bug we already fixed in > commit 53642399aa71 ("usb: gadget: f_fs: Fix wrong check on reserved1 wof > OS_DESC_EXT_COMPAT") > > Next FFS (adb) SS enumerat

Re: [PATCH] usb: dwc3: ep0: Fix the possible missed request for handling delay STATUS phase

2017-02-16 Thread Baolin Wang
On 23 January 2017 at 19:57, Felipe Balbi wrote: > > Hi, > > Alan Stern writes: >> On Mon, 16 Jan 2017, Felipe Balbi wrote: >> >>> > The gadget driver never calls usb_ep_queue in order to receive the next >>> > SETUP packet; the UDC driver takes care of SETUP handling >>> > automatically. >>> >>>