Re: [PATCH 2/3] xhci: Wait for host to start running.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, May 25, 2010 at 01:48:07PM +0400, Sergei Shtylyov wrote:
> Hello.
> 
> Sarah Sharp wrote:
> 
> >When the run bit is set in the xHCI command register, it may take a few
> >microseconds for the host to start running.  We cannot ring any doorbells
> >until the host is actually running, so wait until the status register says
> >the host is running.
> 
> >Signed-off-by: Sarah Sharp <sarah.a.sharp@xxxxxxxxxxxxxxx>
> >Reported-by: Shinya Saito <shinya.saito.sx@xxxxxxxxxxx>
> >---
> > drivers/usb/host/xhci.c |   39 ++++++++++++++++++++++++++++++++-------
> > 1 files changed, 32 insertions(+), 7 deletions(-)
> 
> >diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
> >index 79ccfe5..8a49c67 100644
> >--- a/drivers/usb/host/xhci.c
> >+++ b/drivers/usb/host/xhci.c
> >@@ -106,6 +106,33 @@ int xhci_halt(struct xhci_hcd *xhci)
> > }
> > /*
> >+ * Set the run bit and wait for the host to be running.
> >+ */
> >+int xhci_start(struct xhci_hcd *xhci)
> >+{
> >+	u32 temp;
> >+	int ret;
> >+
> >+	temp = xhci_readl(xhci, &xhci->op_regs->command);
> >+	temp |= (CMD_RUN);
> 
>    Useless parens.

Yes, they aren't useful.  Do they inhibit readability?  I don't think
so.

I don't feel that I should change this line, because it's a move of code
from another function into this function.  It's best to leave that code
exactly the same so the reviewer can visual compare the two chunks.  If
you care about this coding style issue, go ahead and submit a separate
cleanup patch.

BTW, checkpatch didn't catch this, because my git hooks won't let me
commit without checkpatch passing.  Perhaps you'd also like to submit a
patch for that?

Sarah Sharp
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux