Re: [PATCH v2 5/5] xhci: Remove recursive call to xhci_handle_event

2011-03-30 Thread Matt Evans
On 30/03/11 07:00, Dmitry Torokhov wrote: > On Sunday, March 27, 2011 09:53:00 pm Matt Evans wrote: >> @@ -2282,7 +2284,7 @@ hw_died: >> /* FIXME this should be a delayed service routine >> * that clears the EHB. >> */ >> -xhci_handle_event(xhci); >> +while (xhci_handle_eve

RE: [PATCH v2 5/5] xhci: Remove recursive call to xhci_handle_event

2011-03-30 Thread David Laight
> > - xhci_handle_event(xhci); > > + while (xhci_handle_event(xhci)) {} > > > > I must admit I dislike the style with empty loop bodies... I would use an explicit 'continue;' for the body of an otherwise empty loop. David ___ Linuxppc-

Re: [PATCH v2 5/5] xhci: Remove recursive call to xhci_handle_event

2011-03-29 Thread Dmitry Torokhov
On Sunday, March 27, 2011 09:53:00 pm Matt Evans wrote: > @@ -2282,7 +2284,7 @@ hw_died: > /* FIXME this should be a delayed service routine >* that clears the EHB. >*/ > - xhci_handle_event(xhci); > + while (xhci_handle_event(xhci)) {} > I must admit I dislike the s

Re: [PATCH v2 5/5] xhci: Remove recursive call to xhci_handle_event

2011-03-29 Thread Sarah Sharp
On Tue, Mar 29, 2011 at 10:58:54AM +1100, Benjamin Herrenschmidt wrote: > On Mon, 2011-03-28 at 15:34 -0700, Sarah Sharp wrote: > > > > What I'd like to do is take out the read of the status register out of > > the interrupt handler (which is killing performance), and make it only > > check the st

Re: [PATCH v2 5/5] xhci: Remove recursive call to xhci_handle_event

2011-03-28 Thread Benjamin Herrenschmidt
On Mon, 2011-03-28 at 15:34 -0700, Sarah Sharp wrote: > > What I'd like to do is take out the read of the status register out of > the interrupt handler (which is killing performance), and make it only > check the status register when xhci_handle_event() returns a negative > error status. If the

Re: [PATCH v2 5/5] xhci: Remove recursive call to xhci_handle_event

2011-03-28 Thread Sarah Sharp
On Mon, Mar 28, 2011 at 03:53:00PM +1100, Matt Evans wrote: > Make the caller loop while there are events to handle, instead. > > Signed-off-by: Matt Evans > --- > 1 byte smaller after Sergei's suggestion. > > drivers/usb/host/xhci-ring.c | 16 +--- > 1 files changed, 9 insertions

[PATCH v2 5/5] xhci: Remove recursive call to xhci_handle_event

2011-03-27 Thread Matt Evans
Make the caller loop while there are events to handle, instead. Signed-off-by: Matt Evans --- 1 byte smaller after Sergei's suggestion. drivers/usb/host/xhci-ring.c | 16 +--- 1 files changed, 9 insertions(+), 7 deletions(-) diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb