[PATCH v2] usb: load usb phy earlier

2015-02-12 Thread Zhangfei Gao
USB PHY works proper is the base for the coming USB controller operation. With this patch, it can avoid the controller drivers which are linked earlier than USB PHY always being probed deferral. Look at drivers/Makefile, it links phy first with the similar method. Signed-off-by: Zhangfei Gao Acke

[PATCH net] r8152: restore hw settings

2015-02-12 Thread Hayes Wang
There is a capability which let the hw could change the settings automatically when the power change to ON. However, the USB reset would reset the settings to the hw default, so the driver has to restore the relative settings. Otherwise, it would influence the functions of the hw, and the compatibi

RE: [PATCH 2/2] usb: dwc2: gadget reuse ahbcfg assigned from platform

2015-02-12 Thread Kaukab, Yousaf
> -Original Message- > From: John Youn [mailto:john.y...@synopsys.com] > Sent: Wednesday, February 11, 2015 11:00 PM > To: Zhangfei Gao; Kaukab, Yousaf > Cc: ba...@ti.com; john.y...@synopsys.com; linux-usb@vger.kernel.org > Subject: Re: [PATCH 2/2] usb: dwc2: gadget reuse ahbcfg assigned fr

RE: [PATCH] Added Pids for Actisense Usb Devices

2015-02-12 Thread Mark Glover
Sorry, no difference just ignorance on my part. I had the impression having just missed one release I needed to resubmit the patch. Best regards Mark Glover Software Engineer Actisense®/Active Research Ltd Tel:+44 (0)1202 746682 http://www.actisense.com Active Research Limited is registered in En

Re: [PATCH] Added Pids for Actisense Usb Devices

2015-02-12 Thread Johan Hovold
On Thu, Feb 12, 2015 at 08:46:51AM -, Mark Glover wrote: > Sorry, no difference just ignorance on my part. > I had the impression having just missed one release I needed to resubmit the > patch. No, I'm still waiting for you to answer my comments on your patch. Mostly some clarifications neede

RE: Unable to reap urb after receiving signal using usbfs.

2015-02-12 Thread David Laight
From: Dave Mielke > Okay. Found it. Yes, I was indeed making an assumption. When a signalfd file > descriptor is closed, it doesn't remove any of the signals that were in its > queue. The next time a signalfd file descriptor is opened for the same signal, > therefore, the signal from the closing of

Re: unable to execute hotplug script

2015-02-12 Thread Greg KH
On Wed, Feb 11, 2015 at 09:37:18PM +0530, temp sha wrote: > Hi All, > > I am trying to enable hotplugging for usb on my h/w based on 2.6.16 kernel. You are on your own with such an obsolete and out-of-date kernel version, sorry. Please work with whatever vendor is forcing you to use that release

Re: [PATCH net-next 1/3] r8152: separate USB_RX_EARLY_AGG

2015-02-12 Thread Sergei Shtylyov
Hello. On 2/12/2015 5:36 AM, Hayes Wang wrote: [...] + ocp_data = tp->coalesce / 8; Why not do it in the initializer? This is for patch #3. The patch #3 would use this function. The new function is already called in this patch. The unit of the relative setting from the

Re: [PATCH 6/8] usb: dwc3: add ULPI interface support

2015-02-12 Thread Heikki Krogerus
> > diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c > > index a8c9062..66cbf38 100644 > > --- a/drivers/usb/dwc3/core.c > > +++ b/drivers/usb/dwc3/core.c > > @@ -879,6 +879,10 @@ static int dwc3_probe(struct platform_device *pdev) > > platform_set_drvdata(pdev, dwc); > > dwc3

Re: [PATCH v2] usb: dwc2: Register interrupt handler only once gadget is correctly initialized

2015-02-12 Thread Romain Perier
ping 2015-02-06 17:50 GMT+01:00 Romain Perier : > Don't register interrupt handler before usb gadget is correctly initialized. > For some embedded platforms which don't have a usb-phy, it crashes the driver > because an interrupt is emitted with non-initialized hardware. > According to devm_reques

RE: [RFC PATCH v1] usb: dwc2: reduce dwc2 driver probe time

2015-02-12 Thread Kaukab, Yousaf
> -Original Message- > From: John Youn [mailto:john.y...@synopsys.com] > Sent: Thursday, February 12, 2015 4:33 AM > To: Roy; john.y...@synopsys.com; Felipe Balbi > Cc: Yunzhi Li; jwer...@chromium.org; Herrero, Gregory; Kaukab, Yousaf; > r.bald...@samsung.com; Dinh Nguyen; Eddie Cai; Lin

Re: [PATCH v3 1/5] xhci: add a quirk for device disconnection errata for Synopsis Designware USB3 core

2015-02-12 Thread Mathias Nyman
On 25.01.2015 10:13, Sneeker Yeh wrote: > This issue is defined by a three-way race at disconnect, between > 1) Class driver interrupt endpoint resheduling attempts if the ISR gave an ep >error event due to device detach (it would try 3 times) > 2) Disconnect interrupt on PORTSC_CSC, which is c

ci_hdrc ci_hdrc.1: fatal error

2015-02-12 Thread Michael Grzeschik
Hi Peter, we currently see rare ocasions with the chipidea core code on an mx53 where the controller dies after a long period of usage. ci_hdrc ci_hdrc.1: fatal error ci_hdrc ci_hdrc.1: HC died; cleaning up This is the result of the 'SEI' (System Error) bit in register 'USBSTS' changing to '1' i

RE: Unable to reap urb after receiving signal using usbfs.

2015-02-12 Thread Alan Stern
On Thu, 12 Feb 2015, David Laight wrote: > From: Dave Mielke > > Okay. Found it. Yes, I was indeed making an assumption. When a signalfd file > > descriptor is closed, it doesn't remove any of the signals that were in its > > queue. The next time a signalfd file descriptor is opened for the same

Re: [PATCH v3 1/5] xhci: add a quirk for device disconnection errata for Synopsis Designware USB3 core

2015-02-12 Thread Alan Stern
On Thu, 12 Feb 2015, Mathias Nyman wrote: > On 25.01.2015 10:13, Sneeker Yeh wrote: > > This issue is defined by a three-way race at disconnect, between > > 1) Class driver interrupt endpoint resheduling attempts if the ISR gave an > > ep > >error event due to device detach (it would try 3 ti

Re: Unable to reap urb after receiving signal using usbfs.

2015-02-12 Thread Dave Mielke
[quoted lines by Alan Stern on 2015/02/12 at 10:10 -0500] >Not to me. The purpose of signalfd is to report pending signals. >Closing or opening a file descriptor shouldn't change the set of >pending signals. Once the last signalfd file descriptor for a given signal is closed - in our case, t

Re: Unable to reap urb after receiving signal using usbfs.

2015-02-12 Thread Alan Stern
On Thu, 12 Feb 2015, Dave Mielke wrote: > [quoted lines by Alan Stern on 2015/02/12 at 10:10 -0500] > > >Not to me. The purpose of signalfd is to report pending signals. > >Closing or opening a file descriptor shouldn't change the set of > >pending signals. > > Once the last signalfd file de

Re: Unable to reap urb after receiving signal using usbfs.

2015-02-12 Thread Dave Mielke
[quoted lines by Alan Stern on 2015/02/12 at 10:44 -0500] >Doesn't your program mask those signals before submitting URBs? It >must; otherwise the completion signals would be delivered to the >program in the normal way via a signal handler instead of being >reported via signalfd. Once the last m

[PATCHv7 2/4] USB: gadget: atmel_usba_udc: Request an auto disabled Vbus signal IRQ instead of an auto enabled IRQ request followed by IRQ disable

2015-02-12 Thread Sylvain Rochet
Vbus IRQ handler needs a started UDC driver to work because it uses udc->driver, which is set by the UDC start handler. The previous way chosen was to return from interrupt if udc->driver is NULL using a spinlock around the check. We now request an auto disabled (IRQ_NOAUTOEN) Vbus signal IRQ inst

[PATCHv7 4/4] USB: gadget: atmel_usba_udc: Add suspend/resume with wakeup support

2015-02-12 Thread Sylvain Rochet
This patch add suspend/resume with wakeup support for Atmel USBA. On suspend: We stay continuously clocked if Vbus signal is not available. If Vbus signal is available we set the Vbus signal as a wake up source then we stop the USBA itself and all clocks used by USBA. On resume: We recover clocks

[PATCHv7 3/4] USB: gadget: atmel_usba_udc: Start clocks on rising edge of the Vbus signal, stop clocks on falling edge of the Vbus signal

2015-02-12 Thread Sylvain Rochet
If USB PLL is not necessary for other USB drivers (e.g. OHCI and EHCI) we will reduce power consumption by switching off the USB PLL if no USB Host is currently connected to this USB Device. We are using Vbus GPIO signal to detect Host presence. If Vbus signal is not available then the device stay

[PATCHv7 1/4] USB: gadget: atmel_usba_udc: Fixed vbus_prev initial state

2015-02-12 Thread Sylvain Rochet
If vbus gpio is high at init, we should set vbus_prev to true accordingly to the current vbus state. Without that, we skip the first vbus interrupt because the saved vbus state is not consistent. Signed-off-by: Sylvain Rochet Acked-by: Nicolas Ferre Acked-by: Boris Brezillon --- drivers/usb/ga

[PATCHv7 0/4] USB: gadget: atmel_usba_udc: PM driver improvements

2015-02-12 Thread Sylvain Rochet
Start clocks on rising edge of the Vbus signal, stop clocks on falling edge of the Vbus signal. Add suspend/resume with wakeup support. Changes since v6: * Removed single IRQ edge support, which was used to wake up only on device connection. We don't have yet a clean solution to handle IRQ

Re: [PATCHv6 4/5] USB: gadget: atmel_usba_udc: Prepare for IRQ single edge support

2015-02-12 Thread Sylvain Rochet
Hello Boris, On Sun, Feb 08, 2015 at 10:24:39AM +0100, Boris Brezillon wrote: > On Sat, 7 Feb 2015 20:37:23 +0100 > Sylvain Rochet wrote: > > > If not, is udc->caps->irq_single_edge_support boolean acceptable ? > > Do you mean keeping the current approach ? Yes! > If you do, then maybe you c

Re: [PATCH] usb: dwc3: dwc3-omap: Fix disable IRQ

2015-02-12 Thread Felipe Balbi
On Thu, Feb 12, 2015 at 11:13:16AM +0530, George Cherian wrote: > In the wrapper the IRQ disable should be done by writing 1's to the > IRQ*_CLR register. Existing code is broken because it instead writes > zeros to IRQ*_SET register. > > Fix this by adding functions dwc3_omap_write_irqmisc_clr()

[RFC] USB phy type C

2015-02-12 Thread David Cohen
Hi Felipe, et al, Is there any on going discussion regarding to USB phy for type C connectors? We'd like to know the community's preferable direction for handling (still unsupported) cases like USB3.1 PD, Accessories and Alternate modes as a new layer or an extension of current USB phy layer. Co

Re: [RFC] USB phy type C

2015-02-12 Thread Felipe Balbi
Hi, On Thu, Feb 12, 2015 at 10:41:37AM -0800, David Cohen wrote: > Hi Felipe, et al, > > Is there any on going discussion regarding to USB phy for type C connectors? > > We'd like to know the community's preferable direction for handling > (still unsupported) cases like USB3.1 PD, Accessories an

Re: [RFC] USB phy type C

2015-02-12 Thread David Cohen
On Thu, Feb 12, 2015 at 12:45:53PM -0600, Felipe Balbi wrote: > Hi, > > On Thu, Feb 12, 2015 at 10:41:37AM -0800, David Cohen wrote: > > Hi Felipe, et al, > > > > Is there any on going discussion regarding to USB phy for type C connectors? > > > > We'd like to know the community's preferable dir

Re: [RFC] USB phy type C

2015-02-12 Thread Felipe Balbi
On Thu, Feb 12, 2015 at 11:27:28AM -0800, David Cohen wrote: > On Thu, Feb 12, 2015 at 12:45:53PM -0600, Felipe Balbi wrote: > > Hi, > > > > On Thu, Feb 12, 2015 at 10:41:37AM -0800, David Cohen wrote: > > > Hi Felipe, et al, > > > > > > Is there any on going discussion regarding to USB phy for t

Re: [PATCH 6/8] usb: dwc3: add ULPI interface support

2015-02-12 Thread David Cohen
On Thu, Feb 12, 2015 at 02:12:14PM +0200, Heikki Krogerus wrote: > > > diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c > > > index a8c9062..66cbf38 100644 > > > --- a/drivers/usb/dwc3/core.c > > > +++ b/drivers/usb/dwc3/core.c > > > @@ -879,6 +879,10 @@ static int dwc3_probe(struct p

Re: [PATCH 1/8] usb: add bus type for USB ULPI

2015-02-12 Thread Stephen Boyd
On 01/23/15 07:12, Heikki Krogerus wrote: > diff --git a/scripts/mod/file2alias.c b/scripts/mod/file2alias.c > index e614ef6..753cb08 100644 > --- a/scripts/mod/file2alias.c > +++ b/scripts/mod/file2alias.c > @@ -1176,6 +1176,19 @@ static int do_rio_entry(const char *filename, > } > ADD_TO_DEVTAB

Re: [PATCH 8/8] phy: add driver for TI TUSB1210 ULPI PHY

2015-02-12 Thread David Cohen
Hi Heikki, Sorry I am starting a new branch on this thread. I need to go back to another topic on this same patch. On Fri, Jan 23, 2015 at 05:12:58PM +0200, Heikki Krogerus wrote: > TUSB1210 ULPI PHY has vendor specific register for eye > diagram tuning. On some platforms the system firmware has

Re: [PATCH 6/8] usb: dwc3: add ULPI interface support

2015-02-12 Thread David Cohen
On Thu, Feb 12, 2015 at 05:41:30PM -0800, David Cohen wrote: > On Thu, Feb 12, 2015 at 02:12:14PM +0200, Heikki Krogerus wrote: > > > > diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c > > > > index a8c9062..66cbf38 100644 > > > > --- a/drivers/usb/dwc3/core.c > > > > +++ b/drivers/us

Re: [PATCH 2/2] usb: dwc2: gadget reuse ahbcfg assigned from platform

2015-02-12 Thread John Youn
On 2/12/2015 1:04 AM, Kaukab, Yousaf wrote: >> -Original Message- >> From: John Youn [mailto:john.y...@synopsys.com] >> Sent: Wednesday, February 11, 2015 11:00 PM >> To: Zhangfei Gao; Kaukab, Yousaf >> Cc: ba...@ti.com; john.y...@synopsys.com; linux-usb@vger.kernel.org >> Subject: Re: [PAT

Re: [PATCH v2] usb: dwc2: Register interrupt handler only once gadget is correctly initialized

2015-02-12 Thread John Youn
On 2/12/2015 4:42 AM, Romain Perier wrote: > ping > > 2015-02-06 17:50 GMT+01:00 Romain Perier : >> Don't register interrupt handler before usb gadget is correctly initialized. >> For some embedded platforms which don't have a usb-phy, it crashes the driver >> because an interrupt is emitted with

RE: ci_hdrc ci_hdrc.1: fatal error

2015-02-12 Thread Peter Chen
> Hi Peter, > > we currently see rare ocasions with the chipidea core code on an mx53 > where the controller dies after a long period of usage. > > ci_hdrc ci_hdrc.1: fatal error > ci_hdrc ci_hdrc.1: HC died; cleaning up > > This is the result of the 'SEI' (System Error) bit in register 'USBSTS

[PATCH v2] usb: dwc3: dwc3-omap: Fix disable IRQ

2015-02-12 Thread George Cherian
In the wrapper the IRQ disable should be done by writing 1's to the IRQ*_CLR register. Existing code is broken because it instead writes zeros to IRQ*_SET register. Fix this by adding functions dwc3_omap_write_irqmisc_clr() and dwc3_omap_write_irq0_clr() which do the right thing. Fixes: 72246da40

Re: [PATCH] usb: dwc3: dwc3-omap: Fix disable IRQ

2015-02-12 Thread George Cherian
On 02/12/2015 11:52 PM, Felipe Balbi wrote: On Thu, Feb 12, 2015 at 11:13:16AM +0530, George Cherian wrote: >In the wrapper the IRQ disable should be done by writing 1's to the >IRQ*_CLR register. Existing code is broken because it instead writes >zeros to IRQ*_SET register. > >Fix this by addi

Re: [PATCH v2] usb: dwc2: Register interrupt handler only once gadget is correctly initialized

2015-02-12 Thread Romain Perier
No problem Regards, Romain 2015-02-13 3:47 GMT+01:00 John Youn : > On 2/12/2015 4:42 AM, Romain Perier wrote: >> ping >> >> 2015-02-06 17:50 GMT+01:00 Romain Perier : >>> Don't register interrupt handler before usb gadget is correctly initialized. >>> For some embedded platforms which don't have