Re: [PATCH v2] usb: dwc2: call dwc2_is_controller_alive() under spinlock

2015-01-15 Thread Robert Baldyga
Hi, On 01/15/2015 07:24 AM, Felipe Balbi wrote: >>> This is really, really odd. Register accesses are atomic, so the >>> lock >>> isn't really doing anything. Besides, you're calling >>> dwc2_is_controller_alive() from within the IRQ handler, so IRQs are

Re: [PATCH v2] usb: dwc2: call dwc2_is_controller_alive() under spinlock

2015-01-15 Thread Robert Baldyga
Hi, On 01/15/2015 07:24 AM, Felipe Balbi wrote: This is really, really odd. Register accesses are atomic, so the lock isn't really doing anything. Besides, you're calling dwc2_is_controller_alive() from within the IRQ handler, so IRQs are already disabled. Spinlocks sometimes do more than

Re: [PATCH v2] usb: dwc2: call dwc2_is_controller_alive() under spinlock

2015-01-14 Thread Felipe Balbi
Hi, On Wed, Jan 14, 2015 at 11:04:27PM +, Paul Zimmerman wrote: > > > > > > > > > > This is really, really odd. Register accesses are atomic, > > > > > > > > > > so the lock > > > > > > > > > > isn't really doing anything. Besides, you're calling > > > > > > > > > >

RE: [PATCH v2] usb: dwc2: call dwc2_is_controller_alive() under spinlock

2015-01-14 Thread Paul Zimmerman
> From: Felipe Balbi [mailto:ba...@ti.com] > Sent: Wednesday, January 14, 2015 2:50 PM > > On Wed, Jan 14, 2015 at 10:45:26PM +, Paul Zimmerman wrote: > > > From: Felipe Balbi [mailto:ba...@ti.com] > > > Sent: Wednesday, January 14, 2015 2:40 PM > > > > > > On Wed, Jan 14, 2015 at 10:28:54PM

Re: [PATCH v2] usb: dwc2: call dwc2_is_controller_alive() under spinlock

2015-01-14 Thread Felipe Balbi
Hi, On Wed, Jan 14, 2015 at 10:45:26PM +, Paul Zimmerman wrote: > > From: Felipe Balbi [mailto:ba...@ti.com] > > Sent: Wednesday, January 14, 2015 2:40 PM > > > > On Wed, Jan 14, 2015 at 10:28:54PM +, Paul Zimmerman wrote: > > > > From: Felipe Balbi [mailto:ba...@ti.com] > > > > Sent:

RE: [PATCH v2] usb: dwc2: call dwc2_is_controller_alive() under spinlock

2015-01-14 Thread Paul Zimmerman
> From: Felipe Balbi [mailto:ba...@ti.com] > Sent: Wednesday, January 14, 2015 2:40 PM > > On Wed, Jan 14, 2015 at 10:28:54PM +, Paul Zimmerman wrote: > > > From: Felipe Balbi [mailto:ba...@ti.com] > > > Sent: Wednesday, January 14, 2015 1:46 PM > > > > > > On Wed, Jan 14, 2015 at 04:41:23PM

Re: [PATCH v2] usb: dwc2: call dwc2_is_controller_alive() under spinlock

2015-01-14 Thread Felipe Balbi
On Wed, Jan 14, 2015 at 04:39:41PM -0600, Felipe Balbi wrote: > On Wed, Jan 14, 2015 at 10:28:54PM +, Paul Zimmerman wrote: > > > From: Felipe Balbi [mailto:ba...@ti.com] > > > Sent: Wednesday, January 14, 2015 1:46 PM > > > > > > On Wed, Jan 14, 2015 at 04:41:23PM -0500, Alan Stern wrote: >

Re: [PATCH v2] usb: dwc2: call dwc2_is_controller_alive() under spinlock

2015-01-14 Thread Felipe Balbi
On Wed, Jan 14, 2015 at 10:28:54PM +, Paul Zimmerman wrote: > > From: Felipe Balbi [mailto:ba...@ti.com] > > Sent: Wednesday, January 14, 2015 1:46 PM > > > > On Wed, Jan 14, 2015 at 04:41:23PM -0500, Alan Stern wrote: > > > > > > This is really, really odd. Register accesses are atomic, so

RE: [PATCH v2] usb: dwc2: call dwc2_is_controller_alive() under spinlock

2015-01-14 Thread Paul Zimmerman
> From: Felipe Balbi [mailto:ba...@ti.com] > Sent: Wednesday, January 14, 2015 1:46 PM > > On Wed, Jan 14, 2015 at 04:41:23PM -0500, Alan Stern wrote: > > > > > This is really, really odd. Register accesses are atomic, so the lock > > > > > isn't really doing anything. Besides, you're calling > >

Re: [PATCH v2] usb: dwc2: call dwc2_is_controller_alive() under spinlock

2015-01-14 Thread Felipe Balbi
Hi, On Wed, Jan 14, 2015 at 04:41:23PM -0500, Alan Stern wrote: > > > > This is really, really odd. Register accesses are atomic, so the lock > > > > isn't really doing anything. Besides, you're calling > > > > dwc2_is_controller_alive() from within the IRQ handler, so IRQs are > > > > already

Re: [PATCH v2] usb: dwc2: call dwc2_is_controller_alive() under spinlock

2015-01-14 Thread Alan Stern
On Wed, 14 Jan 2015, Felipe Balbi wrote: > > > This is really, really odd. Register accesses are atomic, so the lock > > > isn't really doing anything. Besides, you're calling > > > dwc2_is_controller_alive() from within the IRQ handler, so IRQs are > > > already disabled. > > > > Spinlocks

Re: [PATCH v2] usb: dwc2: call dwc2_is_controller_alive() under spinlock

2015-01-14 Thread Felipe Balbi
Hi, On Wed, Jan 14, 2015 at 03:06:39PM -0500, Alan Stern wrote: > > > This patch fixes bug described here: > > > https://lkml.org/lkml/2014/12/22/185 > > > > > > Signed-off-by: Robert Baldyga > > > --- > > > > > > Changelog: > > > > > > v2: > > > - fixed comment from Paul Zimmerman > > > > >

Re: [PATCH v2] usb: dwc2: call dwc2_is_controller_alive() under spinlock

2015-01-14 Thread Alan Stern
On Wed, 14 Jan 2015, Felipe Balbi wrote: > On Wed, Jan 14, 2015 at 07:45:31AM +0100, Robert Baldyga wrote: > > This patch fixes bug described here: > > https://lkml.org/lkml/2014/12/22/185 > > > > Signed-off-by: Robert Baldyga > > --- > > > > Changelog: > > > > v2: > > - fixed comment from

Re: [PATCH v2] usb: dwc2: call dwc2_is_controller_alive() under spinlock

2015-01-14 Thread Felipe Balbi
On Wed, Jan 14, 2015 at 07:45:31AM +0100, Robert Baldyga wrote: > This patch fixes bug described here: > https://lkml.org/lkml/2014/12/22/185 > > Signed-off-by: Robert Baldyga > --- > > Changelog: > > v2: > - fixed comment from Paul Zimmerman > > v1: https://lkml.org/lkml/2015/1/13/186 > >

RE: [PATCH v2] usb: dwc2: call dwc2_is_controller_alive() under spinlock

2015-01-14 Thread Paul Zimmerman
> From: Robert Baldyga [mailto:r.bald...@samsung.com] > Sent: Tuesday, January 13, 2015 10:46 PM > > This patch fixes bug described here: > https://lkml.org/lkml/2014/12/22/185 > > Signed-off-by: Robert Baldyga Although I don't understand *why* this fixes Robert's issue, it's certainly a

Re: [PATCH v2] usb: dwc2: call dwc2_is_controller_alive() under spinlock

2015-01-14 Thread Alan Stern
On Wed, 14 Jan 2015, Felipe Balbi wrote: On Wed, Jan 14, 2015 at 07:45:31AM +0100, Robert Baldyga wrote: This patch fixes bug described here: https://lkml.org/lkml/2014/12/22/185 Signed-off-by: Robert Baldyga r.bald...@samsung.com --- Changelog: v2: - fixed comment from

Re: [PATCH v2] usb: dwc2: call dwc2_is_controller_alive() under spinlock

2015-01-14 Thread Felipe Balbi
On Wed, Jan 14, 2015 at 07:45:31AM +0100, Robert Baldyga wrote: This patch fixes bug described here: https://lkml.org/lkml/2014/12/22/185 Signed-off-by: Robert Baldyga r.bald...@samsung.com --- Changelog: v2: - fixed comment from Paul Zimmerman v1:

Re: [PATCH v2] usb: dwc2: call dwc2_is_controller_alive() under spinlock

2015-01-14 Thread Felipe Balbi
Hi, On Wed, Jan 14, 2015 at 03:06:39PM -0500, Alan Stern wrote: This patch fixes bug described here: https://lkml.org/lkml/2014/12/22/185 Signed-off-by: Robert Baldyga r.bald...@samsung.com --- Changelog: v2: - fixed comment from Paul Zimmerman v1:

Re: [PATCH v2] usb: dwc2: call dwc2_is_controller_alive() under spinlock

2015-01-14 Thread Alan Stern
On Wed, 14 Jan 2015, Felipe Balbi wrote: This is really, really odd. Register accesses are atomic, so the lock isn't really doing anything. Besides, you're calling dwc2_is_controller_alive() from within the IRQ handler, so IRQs are already disabled. Spinlocks sometimes do more

RE: [PATCH v2] usb: dwc2: call dwc2_is_controller_alive() under spinlock

2015-01-14 Thread Paul Zimmerman
From: Robert Baldyga [mailto:r.bald...@samsung.com] Sent: Tuesday, January 13, 2015 10:46 PM This patch fixes bug described here: https://lkml.org/lkml/2014/12/22/185 Signed-off-by: Robert Baldyga r.bald...@samsung.com Although I don't understand *why* this fixes Robert's issue, it's

RE: [PATCH v2] usb: dwc2: call dwc2_is_controller_alive() under spinlock

2015-01-14 Thread Paul Zimmerman
From: Felipe Balbi [mailto:ba...@ti.com] Sent: Wednesday, January 14, 2015 2:40 PM On Wed, Jan 14, 2015 at 10:28:54PM +, Paul Zimmerman wrote: From: Felipe Balbi [mailto:ba...@ti.com] Sent: Wednesday, January 14, 2015 1:46 PM On Wed, Jan 14, 2015 at 04:41:23PM -0500, Alan

Re: [PATCH v2] usb: dwc2: call dwc2_is_controller_alive() under spinlock

2015-01-14 Thread Felipe Balbi
Hi, On Wed, Jan 14, 2015 at 04:41:23PM -0500, Alan Stern wrote: This is really, really odd. Register accesses are atomic, so the lock isn't really doing anything. Besides, you're calling dwc2_is_controller_alive() from within the IRQ handler, so IRQs are already disabled.

RE: [PATCH v2] usb: dwc2: call dwc2_is_controller_alive() under spinlock

2015-01-14 Thread Paul Zimmerman
From: Felipe Balbi [mailto:ba...@ti.com] Sent: Wednesday, January 14, 2015 1:46 PM On Wed, Jan 14, 2015 at 04:41:23PM -0500, Alan Stern wrote: This is really, really odd. Register accesses are atomic, so the lock isn't really doing anything. Besides, you're calling

Re: [PATCH v2] usb: dwc2: call dwc2_is_controller_alive() under spinlock

2015-01-14 Thread Felipe Balbi
On Wed, Jan 14, 2015 at 10:28:54PM +, Paul Zimmerman wrote: From: Felipe Balbi [mailto:ba...@ti.com] Sent: Wednesday, January 14, 2015 1:46 PM On Wed, Jan 14, 2015 at 04:41:23PM -0500, Alan Stern wrote: This is really, really odd. Register accesses are atomic, so the lock

Re: [PATCH v2] usb: dwc2: call dwc2_is_controller_alive() under spinlock

2015-01-14 Thread Felipe Balbi
Hi, On Wed, Jan 14, 2015 at 10:45:26PM +, Paul Zimmerman wrote: From: Felipe Balbi [mailto:ba...@ti.com] Sent: Wednesday, January 14, 2015 2:40 PM On Wed, Jan 14, 2015 at 10:28:54PM +, Paul Zimmerman wrote: From: Felipe Balbi [mailto:ba...@ti.com] Sent: Wednesday, January

RE: [PATCH v2] usb: dwc2: call dwc2_is_controller_alive() under spinlock

2015-01-14 Thread Paul Zimmerman
From: Felipe Balbi [mailto:ba...@ti.com] Sent: Wednesday, January 14, 2015 2:50 PM On Wed, Jan 14, 2015 at 10:45:26PM +, Paul Zimmerman wrote: From: Felipe Balbi [mailto:ba...@ti.com] Sent: Wednesday, January 14, 2015 2:40 PM On Wed, Jan 14, 2015 at 10:28:54PM +, Paul

Re: [PATCH v2] usb: dwc2: call dwc2_is_controller_alive() under spinlock

2015-01-14 Thread Felipe Balbi
On Wed, Jan 14, 2015 at 04:39:41PM -0600, Felipe Balbi wrote: On Wed, Jan 14, 2015 at 10:28:54PM +, Paul Zimmerman wrote: From: Felipe Balbi [mailto:ba...@ti.com] Sent: Wednesday, January 14, 2015 1:46 PM On Wed, Jan 14, 2015 at 04:41:23PM -0500, Alan Stern wrote: This is

Re: [PATCH v2] usb: dwc2: call dwc2_is_controller_alive() under spinlock

2015-01-14 Thread Felipe Balbi
Hi, On Wed, Jan 14, 2015 at 11:04:27PM +, Paul Zimmerman wrote: This is really, really odd. Register accesses are atomic, so the lock isn't really doing anything. Besides, you're calling dwc2_is_controller_alive() from within the IRQ handler, so

[PATCH v2] usb: dwc2: call dwc2_is_controller_alive() under spinlock

2015-01-13 Thread Robert Baldyga
This patch fixes bug described here: https://lkml.org/lkml/2014/12/22/185 Signed-off-by: Robert Baldyga --- Changelog: v2: - fixed comment from Paul Zimmerman v1: https://lkml.org/lkml/2015/1/13/186 drivers/usb/dwc2/core_intr.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)

[PATCH v2] usb: dwc2: call dwc2_is_controller_alive() under spinlock

2015-01-13 Thread Robert Baldyga
This patch fixes bug described here: https://lkml.org/lkml/2014/12/22/185 Signed-off-by: Robert Baldyga r.bald...@samsung.com --- Changelog: v2: - fixed comment from Paul Zimmerman v1: https://lkml.org/lkml/2015/1/13/186 drivers/usb/dwc2/core_intr.c | 6 +++--- 1 file changed, 3