Re: [PATCH] USB: xhci: Fix finding extended capabilities registers

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

 



Hi Edward,

Can you resend as a clean patch?  The patch itself looks good, just the
formating is a little off.  Comments are inlined.

Git will take this top part as the commit message for your patch:

On Thu, Feb 11, 2010 at 01:42:35AM +0800, Edward Shao wrote:
> Dear Sergei,
> 
> I update my patch.
> Thanks for your review.
> 
> Best Regards,
> Edward
> 
> ---

and ignore this part, which is the important bit:

> According "5.3.6 Capability Parameters (HCCPARAMS)" of xHCI rev0.96 spec,
> value of xECP register indicates a relative offset, in 32-bit words,
> from Base to the beginning of the first extended capability.
> The wrong calculation will cause BIOS handoff fail (not handoff from BIOS)
> in some platform with BIOS USB legacy sup support.
> 
> Signed-off-by: Edward Shao <laface.tw@xxxxxxxxx>
> ---

You can add any extra text that you want git to ignore here, after the
dashed line, before the file diffs.  So your message to Sergei should
have gone here. :)

>  drivers/usb/host/xhci-ext-caps.h |    7 +++++--
>  1 files changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/usb/host/xhci-ext-caps.h b/drivers/usb/host/xhci-ext-caps.h
> index ecc131c..78c4eda 100644
> --- a/drivers/usb/host/xhci-ext-caps.h
> +++ b/drivers/usb/host/xhci-ext-caps.h
> @@ -101,12 +101,15 @@ static inline int xhci_find_next_cap_offset(void
> __iomem *base, int ext_offset)
> 
>  	next = readl(base + ext_offset);
> 
> -	if (ext_offset == XHCI_HCC_PARAMS_OFFSET)
> +	if (ext_offset == XHCI_HCC_PARAMS_OFFSET) {
>  		/* Find the first extended capability */
>  		next = XHCI_HCC_EXT_CAPS(next);
> -	else
> +		ext_offset = 0;
> +	} else {
>  		/* Find the next extended capability */
>  		next = XHCI_EXT_CAPS_NEXT(next);
> +	}
> +
>  	if (!next)
>  		return 0;
>  	/*
> -- 
> 1.6.6

I think git will ignore this extra text after the version number, but
it's best to leave it off.  People can find the old patch in the mailing
list archives.

Sarah Sharp

> On Wed, Feb 10, 2010 at 6:37 PM, Sergei Shtylyov <sshtylyov@xxxxxxxxxx> wrote:
> > Hello.
> >
> > Edward Shao wrote:
> >
> >> According "5.3.6 Capability Parameters (HCCPARAMS)" of xHCI rev0.96 spec,
> >> value of xECP register indicates a relative offset, in 32-bit words,
> >> from Base to the beginning of the first extended capability.
> >> The wrong calculation will cause BIOS handoff fail (not handoff from BIOS)
> >> in some platform with BIOS USB legacy sup support.
> >>
> >> Signed-off-by: Edward Shao <laface.tw@xxxxxxxxx>
> >> ---
> >>  drivers/usb/host/xhci-ext-caps.h |    4 +++-
> >>  1 files changed, 3 insertions(+), 1 deletions(-)
> >>
> >> diff --git a/drivers/usb/host/xhci-ext-caps.h
> >> b/drivers/usb/host/xhci-ext-caps.h
> >> index ecc131c..073583f 100644
> >> --- a/drivers/usb/host/xhci-ext-caps.h
> >> +++ b/drivers/usb/host/xhci-ext-caps.h
> >> @@ -101,9 +101,11 @@ static inline int xhci_find_next_cap_offset(void
> >> __iomem *base, int ext_offset)
> >>
> >>        next = readl(base + ext_offset);
> >>
> >> -       if (ext_offset == XHCI_HCC_PARAMS_OFFSET)
> >> +       if (ext_offset == XHCI_HCC_PARAMS_OFFSET) {
> >>                /* Find the first extended capability */
> >>                next = XHCI_HCC_EXT_CAPS(next);
> >> +               ext_offset = 0;
> >> +       }
> >>        else
> >>
> >
> >  } and *else* should be on the same line. Also, you should add {} to the
> > *else* branch according to Documentation/CodingStyle...
> >
> > WBR, Sergei
> >
> >
--
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