Print this page
Customize reset for HPE iLO

@@ -985,11 +985,30 @@
         }
 
         return (DDI_SUCCESS);
 }
 
+/*
+ * ehci_wait_reset
+ *
+ * wait specified time for chip to reset
+ * with workaround of 250us for HPE iLO chip
+ */
+static void
+ehci_wait_reset(ehci_state_t *ehcip, clock_t microsecs)
+{
+        /* Wait specified times for reset to complete */
+        drv_usecwait(microsecs);
 
+        if (ehcip->ehci_vendor_id == PCI_VENDOR_HP) {
+                for (int i = 10; i < 250; i += 10) {
+                        /* Wait 10ms for reset to complete */
+                        drv_usecwait(EHCI_RESET_TIMEWAIT);
+                }
+        }
+}
+
 /*
  * ehci_init_hardware
  *
  * take control from BIOS, reset EHCI host controller, and check version, etc.
  */

@@ -1029,11 +1048,11 @@
         /* Reset the EHCI host controller */
         Set_OpReg(ehci_command,
             Get_OpReg(ehci_command) | EHCI_CMD_HOST_CTRL_RESET);
 
         /* Wait 10ms for reset to complete */
-        drv_usecwait(EHCI_RESET_TIMEWAIT);
+        ehci_wait_reset(ehcip, EHCI_RESET_TIMEWAIT);
 
         ASSERT(Get_OpReg(ehci_status) & EHCI_STS_HOST_CTRL_HALTED);
 
         /* Verify the version number */
         revision = Get_16Cap(ehci_version);

@@ -3814,11 +3833,11 @@
         Set_OpReg(ehci_command, ((Get_OpReg(ehci_command) &
             ~EHCI_CMD_INTR_THRESHOLD) |
             (EHCI_CMD_01_INTR | EHCI_CMD_HOST_CTRL_RUN)));
 
         /* Wait 10ms for EHCI to start sending SOF */
-        drv_usecwait(EHCI_RESET_TIMEWAIT);
+        ehci_wait_reset(ehcip, EHCI_RESET_TIMEWAIT);
 
         /*
          * Get the current usb frame number before waiting for
          * few milliseconds.
          */