]> xenbits.xensource.com Git - seabios.git/commitdiff
xhci: Change xhci_hub_detect() to use connect status instead of link state.
authorKevin O'Connor <kevin@koconnor.net>
Wed, 10 Sep 2014 14:24:04 +0000 (10:24 -0400)
committerKevin O'Connor <kevin@koconnor.net>
Wed, 10 Sep 2014 17:33:52 +0000 (13:33 -0400)
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>
src/hw/usb-xhci.c

index 87e5e645cd7962d32465d783c9ecd3fa23e67527..5f91d89ba56db16cabbaf2d24924cf5c9d8a236d 100644 (file)
@@ -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