Patrick Rudolph has uploaded this change for review. ( https://review.coreboot.org/23687
Change subject: libpayload/drivers/usb/uhci: Fix infinite loop ......................................................................
libpayload/drivers/usb/uhci: Fix infinite loop
Libpayload and the libpayload-client might not handle some USB devices at all. The current UHCI implementation does find an unattached device, and tries to load a driver again and again, which will not happen for unsupported devices.
Only handle port change events, and port disconnect events, like it's done on other HCI controllers.
Tested on Lenovo T500 using UHCI controller. Devices are found on startup and hot(un)plugging is still working.
Change-Id: Ic652311e995e7addd807d2dda8e1c8f385a0d45c Signed-off-by: Patrick Rudolph siro@das-labor.org --- M payloads/libpayload/drivers/usb/uhci_rh.c 1 file changed, 2 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/87/23687/1
diff --git a/payloads/libpayload/drivers/usb/uhci_rh.c b/payloads/libpayload/drivers/usb/uhci_rh.c index e08cce1..79ad8fb 100644 --- a/payloads/libpayload/drivers/usb/uhci_rh.c +++ b/payloads/libpayload/drivers/usb/uhci_rh.c @@ -145,14 +145,14 @@ u16 stored, real;
stored = (RH_INST (dev)->port[0] == -1); - real = ((uhci_reg_read16 (dev->controller, PORTSC1) & 1) == 0); + real = ((uhci_reg_read16(dev->controller, PORTSC1) & 8) == 0); if (stored != real) { usb_debug("change on port 1\n"); return 1; }
stored = (RH_INST (dev)->port[1] == -1); - real = ((uhci_reg_read16 (dev->controller, PORTSC2) & 1) == 0); + real = ((uhci_reg_read16(dev->controller, PORTSC2) & 8) == 0); if (stored != real) { usb_debug("change on port 2\n"); return 2;