aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2014-09-10 10:24:04 -0400
committerKevin O'Connor <kevin@koconnor.net>2014-09-10 13:33:52 -0400
commitdc6552c133ba6099eda754b7a037a71b63d65fea (patch)
tree4b37c36f35c8f8975457e908a1b819efed984c48
parentc001ed8fd7db4be3df9e811e80854bdb93465828 (diff)
downloadseabios-dc6552c133ba6099eda754b7a037a71b63d65fea.zip
seabios-dc6552c133ba6099eda754b7a037a71b63d65fea.tar.gz
seabios-dc6552c133ba6099eda754b7a037a71b63d65fea.tar.bz2
xhci: Change xhci_hub_detect() to use connect status instead of link state.
Use the connect status bit to determine if a device is connected instead of the port link state state machine status. This makes the driver more similar to the other drivers and may help diagnose devices that take longer to boot up. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
-rw-r--r--src/hw/usb-xhci.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/src/hw/usb-xhci.c b/src/hw/usb-xhci.c
index 87e5e64..5f91d89 100644
--- a/src/hw/usb-xhci.c
+++ b/src/hw/usb-xhci.c
@@ -339,15 +339,7 @@ xhci_hub_detect(struct usbhub_s *hub, u32 port)
{
struct usb_xhci_s *xhci = container_of(hub->cntl, struct usb_xhci_s, usb);
u32 portsc = readl(&xhci->pr[port].portsc);
-
- xhci_print_port_state(3, __func__, port, portsc);
- switch (xhci_get_field(portsc, XHCI_PORTSC_PLS)) {
- case PLS_U0:
- case PLS_POLLING:
- return 0;
- default:
- return -1;
- }
+ return (portsc & XHCI_PORTSC_CCS) ? 0 : -1;
}
// Reset device on port