From: mglocker Date: Thu, 27 Jun 2024 21:35:34 +0000 (+0000) Subject: Clear interrupt before we process the request as specified in the X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=dfeddfe6e19c25a5ae535ca7c53cf8084f0aef75;p=openbsd Clear interrupt before we process the request as specified in the documentation. --- 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; }