On Tue, Aug 14, 2012 at 10:57:58PM +0200, Peter Stuge wrote:
> Matthew Garrett wrote:
> > +++ b/drivers/usb/host/pci-quirks.c
> ..
> > @@ -830,9 +830,17 @@ static void __devinit quirk_usb_handoff_xhci(struct 
> > pci_dev *pdev)
> >      */
> >     ext_cap_offset = xhci_find_next_cap_offset(base, 
> > XHCI_HCC_PARAMS_OFFSET);
> >     do {
> > +           if ((ext_cap_offset + sizeof(val)) > len) {
> > +                   /* We're reading garbage from the controller */
> > +                   dev_warn(&pdev->dev,
> > +                            "xHCI controller failing to respond");
> > +                   return;
> > +           }
> 
> Would it be useful to output the have and want values?

The only case where I can imagine this happening is when we're just 
getting 0xff back, and in that scenario it's always going to be the same 
value.

-- 
Matthew Garrett | mj...@srcf.ucam.org
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to