summaryrefslogtreecommitdiff
path: root/usr/src
diff options
context:
space:
mode:
authorToomas Soome <tsoome@me.com>2021-12-04 01:14:31 +0200
committerToomas Soome <tsoome@me.com>2022-01-05 18:57:01 +0200
commita8f22b53d198f9565c2921ca50c571579c4ea52f (patch)
treed13a92b17e202331581ac074a625396fbd17cb68 /usr/src
parent33e89158d2c7ad02650282d7f59da2165063f410 (diff)
downloadillumos-joyent-a8f22b53d198f9565c2921ca50c571579c4ea52f.tar.gz
14287 ehci: No SOF interrupts have been received, this USB EHCI hostcontroller is unusable
Reviewed by: Robert Mustacchi <rm@fingolfin.org> Approved by: Dan McDonald <danmcd@joyent.com>
Diffstat (limited to 'usr/src')
-rw-r--r--usr/src/uts/common/io/usb/hcd/ehci/ehci_util.c21
1 files changed, 14 insertions, 7 deletions
diff --git a/usr/src/uts/common/io/usb/hcd/ehci/ehci_util.c b/usr/src/uts/common/io/usb/hcd/ehci/ehci_util.c
index 727c09ae04..74c76afc8c 100644
--- a/usr/src/uts/common/io/usb/hcd/ehci/ehci_util.c
+++ b/usr/src/uts/common/io/usb/hcd/ehci/ehci_util.c
@@ -1278,7 +1278,7 @@ ehci_init_ctlr(ehci_state_t *ehcip, int init_type)
/*
* Currently EHCI driver doesn't support 64 bit addressing.
*
- * If we are using 64 bit addressing capability, then, program
+ * If the controller is 64-bit address capable, then program
* ehci_ctrl_segment register with 4 Gigabyte segment where all
* of the interface data structures are allocated.
*/
@@ -1287,10 +1287,10 @@ ehci_init_ctlr(ehci_state_t *ehcip, int init_type)
USB_DPRINTF_L3(PRINT_MASK_ATTA, ehcip->ehci_log_hdl,
"ehci_init_ctlr: EHCI driver doesn't support "
"64 bit addressing");
- }
- /* 64 bit addressing is not support */
- Set_OpReg(ehci_ctrl_segment, 0x00000000);
+ /* 64 bit addressing is not supported */
+ Set_OpReg(ehci_ctrl_segment, 0x00000000);
+ }
/* Turn on/off the schedulers */
ehci_toggle_scheduler(ehcip);
@@ -1317,9 +1317,16 @@ ehci_init_ctlr(ehci_state_t *ehcip, int init_type)
/*
* Set the desired interrupt threshold and turn on EHCI host controller.
*/
- Set_OpReg(ehci_command,
- ((Get_OpReg(ehci_command) & ~EHCI_CMD_INTR_THRESHOLD) |
- (EHCI_CMD_01_INTR | EHCI_CMD_HOST_CTRL_RUN)));
+ uint32_t cmd_reg = Get_OpReg(ehci_command);
+
+ USB_DPRINTF_L4(PRINT_MASK_ATTA, ehcip->ehci_log_hdl,
+ "%s: cmd_reg: %x\n", __func__, cmd_reg);
+
+ cmd_reg &= ~EHCI_CMD_INTR_THRESHOLD;
+ cmd_reg |= EHCI_CMD_01_INTR;
+ cmd_reg |= EHCI_CMD_PERIODIC_SCHED_ENABLE;
+
+ Set_OpReg(ehci_command, cmd_reg | EHCI_CMD_HOST_CTRL_RUN);
ASSERT(Get_OpReg(ehci_command) & EHCI_CMD_HOST_CTRL_RUN);