From dfeddfe6e19c25a5ae535ca7c53cf8084f0aef75 Mon Sep 17 00:00:00 2001 From: mglocker Date: Thu, 27 Jun 2024 21:35:34 +0000 Subject: [PATCH] Clear interrupt before we process the request as specified in the documentation. --- sys/dev/ic/ufshci.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/dev/ic/ufshci.c b/sys/dev/ic/ufshci.c index 28b9aa17e12..ef30e01fc29 100644 --- a/sys/dev/ic/ufshci.c +++ b/sys/dev/ic/ufshci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ufshci.c,v 1.38 2024/06/15 18:26:25 mglocker Exp $ */ +/* $OpenBSD: ufshci.c,v 1.39 2024/06/27 21:35:34 mglocker Exp $ */ /* * Copyright (c) 2022 Marcus Glocker @@ -133,6 +133,9 @@ ufshci_intr(void *arg) if (status == 0) return handled; + /* ACK interrupt */ + UFSHCI_WRITE_4(sc, UFSHCI_REG_IS, status); + if (status & UFSHCI_REG_IS_UCCS) { DPRINTF(3, "%s: UCCS interrupt\n", __func__); handled = 1; @@ -163,9 +166,6 @@ ufshci_intr(void *arg) sc->sc_dev.dv_xname, status); } - /* ACK interrupt */ - UFSHCI_WRITE_4(sc, UFSHCI_REG_IS, status); - return handled; } -- 2.20.1