Re: [PATCH v7 1/5] x86: add simple udelay calibration

2017-02-14 Thread Sergei Shtylyov
Hello! On 2/14/2017 5:27 AM, Lu Baolu wrote: Add a simple udelay calibration in x86 architecture-specific boot-time initializations. This will get a workable estimate for loops_per_jiffy. Hence, udelay() could be used after this initialization. Cc: Ingo Molnar Cc: x...@kernel.org Signed-off-b

Re: [PATCH v13 00/12] power: add power sequence library

2017-02-14 Thread Roger Quadros
Peter, On 11/02/17 03:27, Peter Chen wrote: > 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]. The kinds of > power sequence instances will be added at postcore_initcall, the match > criteria is compatibl

Re: [PATCH v13 06/12] usb: xhci: use bus->sysdev for DMA configuration

2017-02-14 Thread Roger Quadros
Hi, On 11/02/17 03:27, Peter Chen wrote: > From: Arnd Bergmann > > For xhci-hcd platform device, all the DMA parameters are not > configured properly, notably dma ops for dwc3 devices. So, set > the dma for xhci from sysdev. sysdev is pointing to device that > is known to the system firmware or

Re: [PATCH v13 06/12] usb: xhci: use bus->sysdev for DMA configuration

2017-02-14 Thread Arnd Bergmann
On Tue, Feb 14, 2017 at 11:36 AM, Roger Quadros wrote: > On 11/02/17 03:27, Peter Chen wrote: >> From: Arnd Bergmann >> >> For xhci-hcd platform device, all the DMA parameters are not >> configured properly, notably dma ops for dwc3 devices. So, set >> the dma for xhci from sysdev. sysdev is poin

RE: How to resolve "Waited 2000ms for CONNECT" in system resuming?

2017-02-14 Thread Yoshihiro Shimoda
Hi Alan, > From: Alan Stern > Sent: Tuesday, February 14, 2017 1:35 AM > > On Mon, 13 Feb 2017, Yoshihiro Shimoda wrote: > > > > Hmmm. You're using platform drivers for OHCI and EHCI, not PCI, > > > > Yes, I'm using platform drivers for OHCI and EHCI. > > > > > right? The resume_common() routi

Re: [PATCH v13 06/12] usb: xhci: use bus->sysdev for DMA configuration

2017-02-14 Thread Roger Quadros
On 14/02/17 13:44, Arnd Bergmann wrote: > On Tue, Feb 14, 2017 at 11:36 AM, Roger Quadros wrote: >> On 11/02/17 03:27, Peter Chen wrote: >>> From: Arnd Bergmann >>> >>> For xhci-hcd platform device, all the DMA parameters are not >>> configured properly, notably dma ops for dwc3 devices. So, set

[PATCH] usb: add CONFIG_USB_PCI to distinguish PCI/non-PCI based USB

2017-02-14 Thread yuan linyu
From: yuan linyu one usage is in embedded system usb host controller is non-PCI based, chooe N in such system will not compile PCI code/function of USB. Signed-off-by: yuan linyu --- drivers/usb/Kconfig| 9 - drivers/usb/Makefile | 2 +- drivers/usb/chip

Re: [PATCH v13 06/12] usb: xhci: use bus->sysdev for DMA configuration

2017-02-14 Thread Arnd Bergmann
On Tue, Feb 14, 2017 at 1:26 PM, Roger Quadros wrote: > On 14/02/17 13:44, Arnd Bergmann wrote: >> On Tue, Feb 14, 2017 at 11:36 AM, Roger Quadros wrote: >>> Why are we using sysdev to read DT property? We should be using the >>> XHCI device (&pdev->dev) here, no? >> >> If I remember correctly,

Re: [BUG] usb: gadget: Kernel oops with UVC USB gadget and configfs

2017-02-14 Thread Laurent Pinchart
Hi Robert, On Monday 13 Feb 2017 20:29:36 Robert Jarzmik wrote: > Petr Cvek writes: > > Dne 12.2.2017 v 13:02 Robert Jarzmik napsal(a): > > That's weird I even removed pxa_set_udc_info() from magician machine init > > and it still fails. Host cable and/or actual camera is not required. It > > fai

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

2017-02-14 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 call probe function: >> 

Re: [PATCH] usb: add CONFIG_USB_PCI to distinguish PCI/non-PCI based USB

2017-02-14 Thread Greg Kroah-Hartman
On Tue, Feb 14, 2017 at 08:46:16PM +0800, yuan linyu wrote: > From: yuan linyu > > one usage is in embedded system usb host controller is non-PCI based, > chooe N in such system will not compile PCI code/function of USB. I'm really sorry, but I can not parse this very well. What exact problem d

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

2017-02-14 Thread Alan Stern
On Thu, 2 Feb 2017, Ajay Kaher wrote: >  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

Re: [PATCH] usb: add CONFIG_USB_PCI to distinguish PCI/non-PCI based USB

2017-02-14 Thread Alan Stern
On Tue, 14 Feb 2017, Greg Kroah-Hartman wrote: > On Tue, Feb 14, 2017 at 08:46:16PM +0800, yuan linyu wrote: > > From: yuan linyu > > > > one usage is in embedded system usb host controller is non-PCI based, > > chooe N in such system will not compile PCI code/function of USB. > > I'm really so

[PATCH 1/4 linux-next] usb: gadget: udc: atmel: Check fifo configuration values against device tree

2017-02-14 Thread cristian.birsan
From: Cristian Birsan Check fifo configuration values against device tree values for endpoint fifo in auto configuration mode (fifo_mode=0). Signed-off-by: Cristian Birsan --- drivers/usb/gadget/udc/atmel_usba_udc.c | 26 +++--- 1 file changed, 23 insertions(+), 3 deletions

[PATCH 0/4 linux-next] usb: gadget: udc: atmel: Endpoint allocation scheme fixes

2017-02-14 Thread cristian.birsan
From: Cristian Birsan This patch series provides fixes, based on the feedback received on the mailing list, for the following: - fifo table parameters validation against device tree values - coding style - message display for EP configuration error - Kconfig comme

[PATCH 2/4 linux-next] usb: gadget: udc: atmel: Minor code cleanup

2017-02-14 Thread cristian.birsan
From: Cristian Birsan Minor code cleanup based on feedback received on mailinglist. Signed-off-by: Cristian Birsan --- drivers/usb/gadget/udc/atmel_usba_udc.c | 15 ++- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/drivers/usb/gadget/udc/atmel_usba_udc.c b/drivers/

[PATCH 4/4 linux-next] usb: gadget: udc: atmel: Update Kconfig help for fifo_mode = 0

2017-02-14 Thread cristian.birsan
From: Cristian Birsan Update Kconfig help for fifo_mode = 0 to explain the behavior better. Signed-off-by: Cristian Birsan --- drivers/usb/gadget/udc/Kconfig | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/usb/gadget/udc/Kconfig b/drivers/usb/gadget/udc/Kconfig

[PATCH 3/4 linux-next] usb: gadget: udc: atmel: Use dev_warn() to display EP configuration error

2017-02-14 Thread cristian.birsan
From: Cristian Birsan Use dev_warn() to display EP configuration error to avoid silent failure. Signed-off-by: Cristian Birsan --- drivers/usb/gadget/udc/atmel_usba_udc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/usb/gadget/udc/atmel_usba_udc.c b/driver

Re: [PATCH] usb: add CONFIG_USB_PCI to distinguish PCI/non-PCI based USB

2017-02-14 Thread Greg Kroah-Hartman
On Tue, Feb 14, 2017 at 10:41:06AM -0500, Alan Stern wrote: > On Tue, 14 Feb 2017, Greg Kroah-Hartman wrote: > > > On Tue, Feb 14, 2017 at 08:46:16PM +0800, yuan linyu wrote: > > > From: yuan linyu > > > > > > one usage is in embedded system usb host controller is non-PCI based, > > > chooe N in

Re: UAS not working with JMS567 based disk enclosure

2017-02-14 Thread Alan Stern
On Tue, 14 Feb 2017, Jack Coulter wrote: > Hi, > > I'm using an external multiple-disk enclosure (specifically a Hotway > H82-SU3S2), which from lsusb appears to use a JMS567 SATA-USB bridge: > > > Bus 002 Device 002: ID 152d:0567 JMicron Technology Corp. / JMicron > > USA Technology Corp. JMS56

Re: [PATCH] usb: musb: add code comment for clarification

2017-02-14 Thread Greg KH
On Fri, Feb 10, 2017 at 06:57:41PM -0600, Gustavo A. R. Silva wrote: > Add code comment to make it clear that the fall-through is intentional. > Read the link for more details: https://lkml.org/lkml/2017/2/9/292 > > Signed-off-by: Gustavo A. R. Silva > --- > drivers/usb/musb/musb_core.c | 1 + >

RE: How to resolve "Waited 2000ms for CONNECT" in system resuming?

2017-02-14 Thread Alan Stern
On Tue, 14 Feb 2017, Yoshihiro Shimoda wrote: > Hi Alan, > > > From: Alan Stern > > Sent: Tuesday, February 14, 2017 1:35 AM > > > > On Mon, 13 Feb 2017, Yoshihiro Shimoda wrote: > > > > > > Hmmm. You're using platform drivers for OHCI and EHCI, not PCI, > > > > > > Yes, I'm using platform dri

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

2017-02-14 Thread Pavel Machek
Hi! > > > > Hmm. I moved keyboard between USB ports, and now 4.10-rc6 no longer > > > > boots. v4.6 works ok. Let me try with keyboard unplugged... no, I > > > > could not get it to work. I believe v4.9 and some v4.10-rc's worked, > > > > but I'll have to double check. > > > > > > But all the ker

Re: [PATCH] usb: musb: add code comment for clarification

2017-02-14 Thread Gustavo A. R. Silva
Quoting Greg KH : On Fri, Feb 10, 2017 at 06:57:41PM -0600, Gustavo A. R. Silva wrote: Add code comment to make it clear that the fall-through is intentional. Read the link for more details: https://lkml.org/lkml/2017/2/9/292 Signed-off-by: Gustavo A. R. Silva --- drivers/usb/musb/musb_core

Re: [PATCH v2] usb: musb: add code comment for clarification

2017-02-14 Thread Greg KH
On Tue, Feb 14, 2017 at 12:20:39PM -0600, Gustavo A. R. Silva wrote: > Add code comment to make it clear that the fall-through is intentional. > Read the link for more details: https://lkml.org/lkml/2017/2/9/292 > > Addresses-Coverity-ID: 1397608 > Signed-off-by: Gustavo A. R. Silva > --- > Chang

[PATCH v2] usb: musb: add code comment for clarification

2017-02-14 Thread Gustavo A. R. Silva
Add code comment to make it clear that the fall-through is intentional. Read the link for more details: https://lkml.org/lkml/2017/2/9/292 Addresses-Coverity-ID: 1397608 Signed-off-by: Gustavo A. R. Silva --- Changes in v2: Fix tabs and line-wrapping in previous patch. drivers/usb/musb/musb_co

Re: [PATCH v2] usb: musb: add code comment for clarification

2017-02-14 Thread Bin Liu
On Tue, Feb 14, 2017 at 10:25:11AM -0800, Greg KH wrote: > On Tue, Feb 14, 2017 at 12:20:39PM -0600, Gustavo A. R. Silva wrote: > > Add code comment to make it clear that the fall-through is intentional. > > Read the link for more details: https://lkml.org/lkml/2017/2/9/292 > > > > Addresses-Cover

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

2017-02-14 Thread Pavel Machek
On Tue 2017-02-14 18:59:56, Pavel Machek wrote: > Hi! > > > > > > Hmm. I moved keyboard between USB ports, and now 4.10-rc6 no longer > > > > > boots. v4.6 works ok. Let me try with keyboard unplugged... no, I > > > > > could not get it to work. I believe v4.9 and some v4.10-rc's worked, > > > > >

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

2017-02-14 Thread Alan Stern
On Tue, 14 Feb 2017, Pavel Machek wrote: > On Tue 2017-02-14 18:59:56, Pavel Machek wrote: > > Hi! > > > > > > > > Hmm. I moved keyboard between USB ports, and now 4.10-rc6 no longer > > > > > > boots. v4.6 works ok. Let me try with keyboard unplugged... no, I > > > > > > could not get it to work

Re: [PATCH 1/2] usb: gadget: udc: avoid use of freed pointer

2017-02-14 Thread Gustavo A. R. Silva
Hi Michal, Quoting Michal Nazarewicz : On Mon, Feb 13 2017, Gustavo A. R. Silva wrote: Rewrite udc_free_dma_chain() function to avoid use of pointer after free. Addresses-Coverity-ID: 1091172 Reviewed-by: Greg Kroah-Hartman Signed-off-by: Gustavo A. R. Silva Acked-by: Michal Nazarewicz

[PATCH v2 1/2] usb: gadget: udc: avoid use of freed pointer

2017-02-14 Thread Gustavo A. R. Silva
Rewrite udc_free_dma_chain() function to avoid use of pointer after free. Addresses-Coverity-ID: 1091172 Acked-by: Michal Nazarewicz Reviewed-by: Greg Kroah-Hartman Signed-off-by: Gustavo A. R. Silva --- Changes in v2: Remove 'td->next = 0x00' inside for loop. Remove unnecessary pointer nulli

[PATCH v2 2/2] usb: gadget: udc: remove unnecessary variable and update function prototype

2017-02-14 Thread Gustavo A. R. Silva
Remove unnecessary variable and update function prototype. Acked-by: Michal Nazarewicz Reviewed-by: Greg Kroah-Hartman Signed-off-by: Gustavo A. R. Silva --- Changes in v2: None. drivers/usb/gadget/udc/amd5536udc.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drive

Re: [PATCH v13 06/12] usb: xhci: use bus->sysdev for DMA configuration

2017-02-14 Thread Peter Chen
On Tue, Feb 14, 2017 at 01:58:40PM +0100, Arnd Bergmann wrote: > On Tue, Feb 14, 2017 at 1:26 PM, Roger Quadros wrote: > > On 14/02/17 13:44, Arnd Bergmann wrote: > >> On Tue, Feb 14, 2017 at 11:36 AM, Roger Quadros wrote: > > >>> Why are we using sysdev to read DT property? We should be using t

Re: [PATCH v13 00/12] power: add power sequence library

2017-02-14 Thread Peter Chen
On Tue, Feb 14, 2017 at 12:21:48PM +0200, Roger Quadros wrote: > Peter, > > On 11/02/17 03:27, Peter Chen wrote: > > 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]. The kinds of > > power sequence

How to get related device pointer via DT?

2017-02-14 Thread Yoshihiro Shimoda
Hi, I would like to get a related device pointer on usb EHCI drivers (or USB framework) because related device (e.g. OHCI or UHCI, called "companion controllers") has to finish resuming. I discussed this topic with Alan: http://marc.info/?t=14865351421&r=1&w=2 In PCI bus, USB framework alre

RE: How to resolve "Waited 2000ms for CONNECT" in system resuming?

2017-02-14 Thread Yoshihiro Shimoda
Hi Alan, > From: Alan Stern > Sent: Wednesday, February 15, 2017 2:57 AM > > On Tue, 14 Feb 2017, Yoshihiro Shimoda wrote: > > > Hi Alan, > > > > > From: Alan Stern > > > Sent: Tuesday, February 14, 2017 1:35 AM > > > > > > On Mon, 13 Feb 2017, Yoshihiro Shimoda wrote: > > > > > > > > Hmmm. You

Re: [PATCH v7 1/5] x86: add simple udelay calibration

2017-02-14 Thread Lu Baolu
Hi, On 02/14/2017 05:23 PM, Sergei Shtylyov wrote: > Hello! > > On 2/14/2017 5:27 AM, Lu Baolu wrote: > >> Add a simple udelay calibration in x86 architecture-specific >> boot-time initializations. This will get a workable estimate >> for loops_per_jiffy. Hence, udelay() could be used after this >

[PATCH 0/6] usb: xhci: several patches for xhci trace

2017-02-14 Thread Lu Baolu
Hi Mathias, This patch set includes several patches for traces in xhci driver. One trace class is for command. Several trace events are defined to trace the life cycle of any xhci command. The other trace class is for context. Several trace events are defined to trace the change in input/output de

[PATCH 5/6] usb: xhci: fix link trb decoding

2017-02-14 Thread Lu Baolu
xhci_decode_trb() treats a link trb in the same way as that for an event trb. This patch fixes this by decoding the link trb according to the spec. Signed-off-by: Lu Baolu --- drivers/usb/host/xhci.h | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/drivers/usb/hos

[PATCH 2/6] usb: xhci: enhance xhci_log_ctx trace events

2017-02-14 Thread Lu Baolu
XHCI driver has defined xhci_log_ctx trace events to trace the change of an xhci input or output context. This patch extends the trace class of xhci_log_ctx to print out the contents of a context block in a human readable way. This patch also adds some other xhci_log_ctx based events where the xhc

[PATCH 3/6] usb: xhci: remove xhci_debug_trb()

2017-02-14 Thread Lu Baolu
Every XHCI TRB has already been traced by the trb trace events. It is unnecessary to put the same message in kernel log. This patch removes xhci_debug_trb(). Signed-off-by: Lu Baolu --- drivers/usb/host/xhci-dbg.c | 57 drivers/usb/host/xhci-ring.c |

[PATCH 6/6] usb: xhci: cleanup xhci_decode_trb() slightly

2017-02-14 Thread Lu Baolu
Replace 'TRB_FIELD_TO_TYPE(field3)' with 'type' to simplify code. Signed-off-by: Lu Baolu --- drivers/usb/host/xhci.h | 36 ++-- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h index ff12c8a..b97fb7

[PATCH 4/6] usb: xhci: remove xhci_dbg_ctx()

2017-02-14 Thread Lu Baolu
XHCI context changes have already been traced by the trace events. It's unnecessary to put the same message in kernel log. This patch removes the use of xhci_dbg_ctx(). Signed-off-by: Lu Baolu --- drivers/usb/host/xhci-dbg.c | 143 drivers/usb/host/xh

[PATCH 1/6] usb: xhci: add xhci_log_cmd trace events

2017-02-14 Thread Lu Baolu
This patch creates a new event class called xhci_log_cmd, and defines the events used for tracing the life cycle of commands issued for various purposes. This info can be used, later, to print, in a human readable way, the life cycle of an xHCI command using the trace-cmd tool and the appropriate

[PATCH] usb: class: remove logically dead code

2017-02-14 Thread Gustavo A. R. Silva
Remove logically dead code. 'cntr' is always equal to zero when the following line of code is executed: rv = cntr ? cntr : -EAGAIN; Addresses-Coverity-ID: 113227 Signed-off-by: Gustavo A. R. Silva --- drivers/usb/class/cdc-wdm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a

usb: storage: suspicious code

2017-02-14 Thread Gustavo A. R. Silva
Hello, I ran into the following piece of code at drivers/usb/storage/jumpshot.c:305 (linux-next), and it seems a little bit suspicious: // read the result. apparently the bulk write can complete // before the jumpshot drive is finished writing. so we loop // here until we get a good return cod

Re: [usb-storage] usb: storage: suspicious code

2017-02-14 Thread Oliver Neukum
Am Dienstag, den 14.02.2017, 23:06 -0600 schrieb Gustavo A. R. Silva: Hi, > waitcount = 0; > do { > result = jumpshot_get_status(us); > if (result != USB_STOR_TRANSPORT_GOOD) { > // I have not experimented to find the smallest > value. > // >   

Re: [usb-storage] usb: storage: suspicious code

2017-02-14 Thread Gustavo A. R. Silva
Hi Oliver, Quoting Oliver Neukum : Am Dienstag, den 14.02.2017, 23:06 -0600 schrieb Gustavo A. R. Silva: Hi, waitcount = 0; do { result = jumpshot_get_status(us); if (result != USB_STOR_TRANSPORT_GOOD) { // I have not experimented to find the smallest value.  

[PATCH] usb: storage: add missing pre-increment to variable

2017-02-14 Thread Gustavo A. R. Silva
Add missing pre-increment to 'waitcount' variable used in do-while loop. Addresses-Coverity-ID: 1011631 Signed-off-by: Gustavo A. R. Silva --- drivers/usb/storage/jumpshot.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/storage/jumpshot.c b/drivers/usb/storage/j

Re: UAS not working with JMS567 based disk enclosure

2017-02-14 Thread Jack Coulter
On 15/02/17 03:50, Alan Stern wrote: > The problem is caused by the firwmware in the enclosure. The UAS > alternate setting was not included. Perhaps it wasn't working > correctly, or perhaps it was just left out by mistake. Ah, I see. Thank you for the information, I'll try to get in contact wi

Re: [PATCH 1/6] usb: xhci: add xhci_log_cmd trace events

2017-02-14 Thread Felipe Balbi
Hi, Lu Baolu writes: > diff --git a/drivers/usb/host/xhci-trace.h b/drivers/usb/host/xhci-trace.h > index 1ac2cdf..c31eeaf 100644 > --- a/drivers/usb/host/xhci-trace.h > +++ b/drivers/usb/host/xhci-trace.h > @@ -285,6 +285,96 @@ DEFINE_EVENT(xhci_log_urb, xhci_urb_dequeue, > TP_ARGS(urb) >