Bug #9806
closed
ehci_take_control() can infinite loop due to PCI invalid reads
Added by Robert Mustacchi almost 4 years ago.
Updated almost 4 years ago.
Category:
driver - device drivers
Description
As part of testing the recent ACPI changes, a user hit an issue where we found an infinite loop in ehci_take_contrl().
The purpose of this function is to try and prod the BIOS to take control of the USB stack and devices. As part of trying to find this it looks through the pci configuration space in the classic PCI extension fashion. Unfortunately, if we hit an invalid read, we end up infinite looping as a result as we'll pretty much always have another capability which is the same invalid read.
The fix is simple, when we read PCI_EINAVL32, we should break out of the loop.
--
I tested this in a few ways: I worked with the user who was seeing this in the context of the new ACPI bits and verified that they no longer saw the hang. I also tested this on some other systems with EHCI and made sure that we still correctly found the capability and worked through it correctly.
Unfortunately, it's unlikely that this is what's causing 9836. The way this manifested was as an infinite loop during boot up that caused a boot hang.
Ah, then my suspicious fall in the microcode update :-/. I might try reverting the microcode after being booted into the problematic BE and see if the issue goes away.
- Status changed from New to Closed
git commit 9a48f6c443e5968307491ba7cc134bbdd0328801
commit 9a48f6c443e5968307491ba7cc134bbdd0328801
Author: Robert Mustacchi <rm@joyent.com>
Date: 2018-09-22T15:05:38.000Z
9806 ehci_take_control() can infinite loop due to PCI invalid reads
Reviewed by: Dan McDonald <danmcd@joyent.com>
Reviewed by: Jason King <jason.king@joyent.com>
Reviewed by: Patrick Mooney <patrick.mooney@joyent.com>
Reviewed by: Toomas Soome <tsoome@me.com>
Reviewed by: Garrett D'Amore <garrett@damore.org>
Approved by: Richard Lowe <richlowe@richlowe.net>
- Related to Bug #4225: ehci can hang interminably trying to read PCI capabilities added
Also available in: Atom
PDF