[PATCH] usb: xhci: tegra: use time64_t for printing timestamp

2017-10-20 Thread Arnd Bergmann
The time_t type and time_to_tm() function are deprecated because of y2038 problems. In this driver, they are used to pretty-print the timestamp of the firmware build. This is fine as long as we don't get a firmware build past 2038. Converting to time64_t and time64_to_tm() avoids the deprecated in

[PATCH 1/3] usb: gadget: udc: remove duplicate & operation

2017-10-20 Thread Jaejoong Kim
usb_endpoint_maxp() has an inline keyword and searches for bits[10:0] by & operation with 0x7ff. So, we can remove the duplicate & operation with 0x7ff. Signed-off-by: Jaejoong Kim --- drivers/usb/gadget/udc/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/g

[PATCH 0/3] usb: remove duplicate & operation

2017-10-20 Thread Jaejoong Kim
usb_endpoint_maxp() has an inline keyword and searches for bits[10:0] by & operation with 0x7ff. So, we can remove the duplicate & operation with 0x7ff. Jaejoong Kim (3): usb: gadget: udc: remove duplicate & operation usb: gadget: udc: gr: remove duplicate & operation usb: misc: usbtest: rem

[PATCH 2/3] usb: gadget: udc: gr: remove duplicate & operation

2017-10-20 Thread Jaejoong Kim
usb_endpoint_maxp() has an inline keyword and searches for bits[10:0] by & operation with 0x7ff. So, we can remove the duplicate & operation with 0x7ff. Signed-off-by: Jaejoong Kim --- drivers/usb/gadget/udc/gr_udc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb

[PATCH 3/3] usb: misc: usbtest: remove duplicate & operation

2017-10-20 Thread Jaejoong Kim
usb_endpoint_maxp() has an inline keyword and searches for bits[10:0] by & operation with 0x7ff. So, we can remove the duplicate & operation with 0x7ff. Signed-off-by: Jaejoong Kim --- drivers/usb/misc/usbtest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/misc

Re: [PATCH v2 02/15] usb: gadget: make config_item_type structures const

2017-10-20 Thread Julia Lawall
On Thu, 19 Oct 2017, Laurent Pinchart wrote: > Hi Christoph, > > On Thursday, 19 October 2017 17:06:57 EEST Christoph Hellwig wrote: > > > Now we have 9 const instances of the config_item_type structure that are > > > identical, with only the .ct_owner field set. Should they be all merged > > >

Re: [PATCH 0/3] usb: remove duplicate & operation

2017-10-20 Thread Lukasz Majewski
Hi Jaejoong, > usb_endpoint_maxp() has an inline keyword and searches for bits[10:0] > by & operation with 0x7ff. So, we can remove the duplicate & operation > with 0x7ff. > > Jaejoong Kim (3): > usb: gadget: udc: remove duplicate & operation > usb: gadget: udc: gr: remove duplicate & operati

Re: [PATCH v2 02/15] usb: gadget: make config_item_type structures const

2017-10-20 Thread Bhumika Goyal
On Thu, Oct 19, 2017 at 5:05 PM, Laurent Pinchart wrote: > Hi Christoph, > > On Thursday, 19 October 2017 17:06:57 EEST Christoph Hellwig wrote: >> > Now we have 9 const instances of the config_item_type structure that are >> > identical, with only the .ct_owner field set. Should they be all merge

Re: [PATCH 0/3] usb: remove duplicate & operation

2017-10-20 Thread Felipe Balbi
Lukasz Majewski writes: > Hi Jaejoong, > >> usb_endpoint_maxp() has an inline keyword and searches for bits[10:0] >> by & operation with 0x7ff. So, we can remove the duplicate & operation >> with 0x7ff. >> >> Jaejoong Kim (3): >> usb: gadget: udc: remove duplicate & operation >> usb: gadget:

[PATCH] USB: EHCI: don't reread PORTSC after disabling port power

2017-10-20 Thread Uwe Kleine-König
ehci_hub_control does the following related to overcurrent handling (simplified): temp = ehci_readl(ehci, status_reg); if (temp & PORT_OCC) { status |= USB_PORT_STAT_C_OVERCURRENT << 16; if (temp & PORT_OC) { ehci_port_power

Re: [PATCH] USB: EHCI: don't reread PORTSC after disabling port power

2017-10-20 Thread Sergei Shtylyov
Hello! On 10/20/2017 12:54 PM, Uwe Kleine-König wrote: ehci_hub_control does the following related to overcurrent handling (simplified): temp = ehci_readl(ehci, status_reg); if (temp & PORT_OCC) { status |= USB_PORT_STAT_C_OVERCURRENT << 16; if

Re: [PATCH] usb: xhci: tegra: use time64_t for printing timestamp

2017-10-20 Thread Mathias Nyman
On 20.10.2017 10:19, Arnd Bergmann wrote: The time_t type and time_to_tm() function are deprecated because of y2038 problems. In this driver, they are used to pretty-print the timestamp of the firmware build. This is fine as long as we don't get a firmware build past 2038. Converting to time64_t

Re: [PATCH] usb: "USB Host halt failed, -110" error when rebooting system

2017-10-20 Thread Mathias Nyman
On 19.10.2017 20:04, Alan Stern wrote: On Thu, 19 Oct 2017, Mathias Nyman wrote: Current shutdown routine just forces the host controller to stop, it clears the run bit and polls the "halted" status for 16ms. Apparently we don't see the halted bit within 16ms. Spec say that the correct way to

Re: dwc2 - ChHltd set, but reason is unknown

2017-10-20 Thread Minas Harutyunyan
On 10/19/2017 2:22 PM, Anders Montonen wrote: > On Thu, 19 Oct 2017, Minas Harutyunyan wrote: > >> Could you please apply this patch. >> If you confirm that this patch fix your issue with "Transaction Error" >> and " ChHltd set, but reason is unknown" I'll submit to LKML as final patch. >> >> diff

Re: [PATCH] USB: EHCI: don't reread PORTSC after disabling port power

2017-10-20 Thread Uwe Kleine-König
Hello Sergei, On Fri, Oct 20, 2017 at 01:15:00PM +0300, Sergei Shtylyov wrote: > > - temp = ehci_readl(ehci, status_reg); > > + temp |= ~PORT_POWER; > >You surely meant '&='? Right. /me has to work on his workflow such that it doesn't inclu

Re: [RESEND x2][PATCH 0/3] dwc2 fixes for edge cases on hikey

2017-10-20 Thread Minas Harutyunyan
Hi John Stultz, On 10/20/2017 12:06 AM, John Stultz wrote: > On Tue, Oct 17, 2017 at 1:41 AM, Minas Harutyunyan > wrote: >> On 10/17/2017 1:34 AM, John Stultz wrote: >>> On Mon, Oct 16, 2017 at 1:36 AM, Minas Harutyunyan >>> wrote: On b-plug disconnect should asserted GOTGINT.SesEndDet int

Re: [PATCH v8] usb: dwc3: of-simple: Add support to get resets for the device

2017-10-20 Thread Manu Gautam
Hi, On 10/19/2017 5:17 PM, Philipp Zabel wrote: > From: Vivek Gautam > > Add support to get a list of resets available for the device. > These resets must be kept de-asserted until the device is > in use. > > Signed-off-by: Vivek Gautam > [p.za...@pengutronix.de: switch to hidden reset control

Re: [RESEND x2][PATCH 0/3] dwc2 fixes for edge cases on hikey

2017-10-20 Thread Minas Harutyunyan
On 10/20/2017 12:20 AM, John Stultz wrote: > On Wed, Oct 18, 2017 at 11:46 PM, Minas Harutyunyan > wrote: >> Could you please apply this patch. Please not apply your patch series >> "[PATCH 0/3] dwc2 fixes for edge cases on hikey" to check only below patch. >> If you confirm that this patch fix yo

Re: [PATCH v8] usb: dwc3: of-simple: Add support to get resets for the device

2017-10-20 Thread Philipp Zabel
On Fri, 2017-10-20 at 17:10 +0530, Manu Gautam wrote: > Hi, > > > On 10/19/2017 5:17 PM, Philipp Zabel wrote: > > From: Vivek Gautam > > > > Add support to get a list of resets available for the device. > > These resets must be kept de-asserted until the device is > > in use. > > > > Signed-of

Re: [PATCH v7 1/4] reset: Add APIs to manage array of resets

2017-10-20 Thread Philipp Zabel
Hi, On Thu, 2017-10-19 at 11:54 -0700, Bjorn Andersson wrote: > On Wed 19 Jul 08:59 PDT 2017, Philipp Zabel wrote: > > > From: Vivek Gautam > > > > Many devices may want to request a bunch of resets and control them. So > > it's better to manage them as an array. Add APIs to _get() an array of

Re: [PATCH] usb: "USB Host halt failed, -110" error when rebooting system

2017-10-20 Thread kbuild test robot
-halt-failed-110-error-when-rebooting-system/20171020-195950 base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing config: i386-randconfig-n0-201742 (attached as .config) compiler: gcc-4.8 (Debian 4.8.4-1) 4.8.4 reproduce: # save the attached .config to linux build

Re: [PATCH] USB: add SPDX identifiers to all files in drivers/usb/

2017-10-20 Thread Rob Herring
On Thu, Oct 19, 2017 at 3:38 AM, Greg Kroah-Hartman wrote: > It's good to have SPDX identifiers in all files to make it easier to > audit the kernel tree for correct licenses. This patch adds these > identifiers to all files in drivers/usb/ based on a script and data from > Thomas Gleixner, Phili

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

2017-10-20 Thread Jon Hunter
Hi Philipp, On 19/10/17 16:17, Philipp Zabel wrote: > Hi Jon, Thierry, > > On Wed, 2017-07-19 at 17:59 +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 Hu

Re: [PATCH] USB: add SPDX identifiers to all files in drivers/usb/

2017-10-20 Thread Alan Cox
> But all that matters is the tag is there for tools to be able to extract > it properly. And if we have that, it doesn't matter what the comment > "style" would be, so might as well make it look "nicer". > > And, to take it to the next conclusion, if we have the SPDX identifier, > we can get rid

Re: [PATCH] USB: EHCI: don't reread PORTSC after disabling port power

2017-10-20 Thread Alan Stern
On Fri, 20 Oct 2017, Uwe Kleine-König wrote: > ehci_hub_control does the following related to overcurrent handling > (simplified): > > temp = ehci_readl(ehci, status_reg); > > if (temp & PORT_OCC) { > status |= USB_PORT_STAT_C_OVERCURRENT << 16; > > if (t

Re: [PATCH] USB: EHCI: don't reread PORTSC after disabling port power

2017-10-20 Thread Uwe Kleine-König
Hello Alan, On Fri, Oct 20, 2017 at 01:58:14PM -0400, Alan Stern wrote: > On Fri, 20 Oct 2017, Uwe Kleine-König wrote: > > diff --git a/drivers/usb/host/ehci-hub.c b/drivers/usb/host/ehci-hub.c > > index df169c8e7225..08f59654654b 100644 > > --- a/drivers/usb/host/ehci-hub.c > > +++ b/drivers/usb/

Re: [PATCH] USB: EHCI: don't reread PORTSC after disabling port power

2017-10-20 Thread Fabio Estevam
Hi Uwe, On Fri, Oct 20, 2017 at 5:20 PM, Uwe Kleine-König wrote: > It also works. However I wonder if it's right that I'm spammed by > over-current messages now (independent of which fix I choose) as long as > there is something connected to the port that draws too much power: > > [ 53

Re: [PATCH] USB: EHCI: don't reread PORTSC after disabling port power

2017-10-20 Thread Uwe Kleine-König
Hey Fabio, On Fri, Oct 20, 2017 at 05:27:09PM -0200, Fabio Estevam wrote: > On Fri, Oct 20, 2017 at 5:20 PM, Uwe Kleine-König > wrote: > > > It also works. However I wonder if it's right that I'm spammed by > > over-current messages now (independent of which fix I choose) as long as > > there is

Re: [PATCH] USB: EHCI: don't reread PORTSC after disabling port power

2017-10-20 Thread Alan Stern
On Fri, 20 Oct 2017, Uwe [iso-8859-1] Kleine-K�nig wrote: > Hey Fabio, > > On Fri, Oct 20, 2017 at 05:27:09PM -0200, Fabio Estevam wrote: > > On Fri, Oct 20, 2017 at 5:20 PM, Uwe Kleine-K�nig > > wrote: > > > > > It also works. However I wonder if it's right that I'm spammed by > > > over-curre

Re: [PATCH] USB: EHCI: don't reread PORTSC after disabling port power

2017-10-20 Thread Marc Kleine-Budde
On 10/20/2017 09:47 PM, Alan Stern wrote: >> On Fri, Oct 20, 2017 at 05:27:09PM -0200, Fabio Estevam wrote: >>> On Fri, Oct 20, 2017 at 5:20 PM, Uwe Kleine-K�nig >>> wrote: >>> It also works. However I wonder if it's right that I'm spammed by over-current messages now (independent of whi

Re: [PATCH] USB: EHCI: don't reread PORTSC after disabling port power

2017-10-20 Thread Uwe Kleine-König
Hello Alan, On Fri, Oct 20, 2017 at 03:47:37PM -0400, Alan Stern wrote: > On Fri, 20 Oct 2017, Uwe [iso-8859-1] Kleine-König wrote: > > On Fri, Oct 20, 2017 at 05:27:09PM -0200, Fabio Estevam wrote: > > > On Fri, Oct 20, 2017 at 5:20 PM, Uwe Kleine-König > > > wrote: > > > > > > > It also works.

Re: [PATCH] usb: "USB Host halt failed, -110" error when rebooting system

2017-10-20 Thread wenxiong
On 2017-10-19 12:04, Alan Stern wrote: On Thu, 19 Oct 2017, Mathias Nyman wrote: Current shutdown routine just forces the host controller to stop, it clears the run bit and polls the "halted" status for 16ms. Apparently we don't see the halted bit within 16ms. Spec say that the correct way t

[PATCH] xhci: Hard reset controller on shutdown.

2017-10-20 Thread Brian King
On 10/19/2017 12:04 PM, Alan Stern wrote: > On Thu, 19 Oct 2017, Mathias Nyman wrote: > >> Current shutdown routine just forces the host controller to stop, it clears >> the >> run bit and polls the "halted" status for 16ms. Apparently we don't see the >> halted >> bit within 16ms. >> >> Spec sa

[PATCH] usb: phy: tahvo: fix error handling in tahvo_usb_probe()

2017-10-20 Thread Alexey Khoroshilov
If devm_extcon_dev_allocate() fails, we should disable clk before return. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov Fixes: 860d2686fda7 ("usb: phy: tahvo: Use devm_extcon_dev_[allocate|register]() and replace deprecated API") --- drivers/u