diff options
author | Anton Kochkov <anton.kochkov@gmail.com> | 2012-09-20 10:22:52 +0200 |
---|---|---|
committer | Anton Kochkov <anton.kochkov@gmail.com> | 2012-09-21 23:47:05 +0200 |
commit | 1d668973645895faedff890ab96d1db9a187dcc2 (patch) | |
tree | 80804c29c9782d0b8c98ece0a7b86e515001ac58 /payloads | |
parent | f6c808090af3f4c93b8c0bca61308fd68111b045 (diff) | |
download | coreboot-1d668973645895faedff890ab96d1db9a187dcc2.tar.xz |
Fix disconnect handling on UHCI root ports
Change-Id: I03b72cd1c6ed0df09c08f2a687d4f17fa3cf6afc
Signed-off-by: Patrick Georgi <patrick.georgi@secunet.com>
Reviewed-on: http://review.coreboot.org/1531
Tested-by: build bot (Jenkins)
Reviewed-by: Anton Kochkov <anton.kochkov@gmail.com>
Diffstat (limited to 'payloads')
-rw-r--r-- | payloads/libpayload/drivers/usb/uhci_rh.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/payloads/libpayload/drivers/usb/uhci_rh.c b/payloads/libpayload/drivers/usb/uhci_rh.c index a5661b095f..547f0644b4 100644 --- a/payloads/libpayload/drivers/usb/uhci_rh.c +++ b/payloads/libpayload/drivers/usb/uhci_rh.c @@ -81,9 +81,14 @@ static void uhci_rh_disable_port (usbdev_t *dev, int port) { hci_t *controller = dev->controller; - port = PORTSC2; if (port == 1) port = PORTSC1; + else if (port == 2) + port = PORTSC2; + else { + debug("Invalid port %d\n", port); + return; + } uhci_reg_write16(controller, port, uhci_reg_read16(controller, port) & ~4); u16 value; |