summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Peterson <[email protected]>2022-02-25 12:39:09 -0600
committerTom Peterson <[email protected]>2022-02-25 12:39:09 -0600
commit39fdbc8ffca3cb0a610ce4140e1d527beb47ad3d (patch)
tree8ba2ad8345ba3da2978b721b995ceb2e5b3fc2b8 /src
parentb797d1aa50310a46d430ff0efd66d7e88028de3b (diff)
Updated the clearing of the status register bits to use a straight '=', rather than an '|='. Use of the latter caused an extra, unwanted read of the status register before the write-to-clear operation, which, in some cases, allowed new status bits to assert (relative to the initial read of the status register two statements earlier), and then be cleared blindly and unconditionally during the write-back. This had the potential (and, in my case, observed) effect of dropping the handling of an enabled interrupt. Ultimately, the system would lock up in a busy state, with no hope of clearing the condition. See Issue #1339 for more information.
Diffstat (limited to 'src')
-rw-r--r--src/portable/ehci/ehci.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/portable/ehci/ehci.c b/src/portable/ehci/ehci.c
index e92f8a951..9b998cda6 100644
--- a/src/portable/ehci/ehci.c
+++ b/src/portable/ehci/ehci.c
@@ -657,7 +657,7 @@ void hcd_int_handler(uint8_t rhport)
uint32_t int_status = regs->status;
int_status &= regs->inten;
- regs->status |= int_status; // Acknowledge handled interrupt
+ regs->status = int_status; // Acknowledge handled interrupt
if (int_status == 0) return;