]> git.baikalelectronics.ru Git - kernel.git/commit
xhci: Make handover code more robust
authorMatthew Garrett <mjg@redhat.com>
Tue, 14 Aug 2012 20:44:49 +0000 (16:44 -0400)
committerSarah Sharp <sarah.a.sharp@linux.intel.com>
Wed, 5 Sep 2012 19:07:17 +0000 (12:07 -0700)
commit6e5097b25531e5aee7b800413c51cf458ae96a33
tree849f0cf3879214e10ec4eee0b2ae8c00f23322c3
parent7314f7a791c9ef52d00abb9db922fba02b7071e5
xhci: Make handover code more robust

My test platform (Intel DX79SI) boots reliably under BIOS, but frequently
crashes when booting via UEFI. I finally tracked this down to the xhci
handoff code. It seems that reads from the device occasionally just return
0xff, resulting in xhci_find_next_cap_offset generating a value that's
larger than the resource region. We then oops when attempting to read the
value. Sanity checking that value lets us avoid the crash.

I've no idea what's causing the underlying problem, and xhci still doesn't
actually *work* even with this, but the machine at least boots which will
probably make further debugging easier.

This should be backported to kernels as old as 2.6.31, that contain the
commit 6eb08c0fe39ef62c27a4af3607c31b546ab43125 "USB: xhci: BIOS handoff
and HW initialization."

Signed-off-by: Matthew Garrett <mjg@redhat.com>
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Cc: stable@vger.kernel.org
drivers/usb/host/pci-quirks.c