Re: [PATCH] xhci: Make handover code more robust

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

 



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 | mjg59@xxxxxxxxxxxxx
--
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