Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 9 Oct 2016 04:37:22 +0000 (UTC)
From:      Oleksandr Tymoshenko <gonzo@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r306899 - head/sys/arm/arm
Message-ID:  <201610090437.u994bMOP035522@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: gonzo
Date: Sun Oct  9 04:37:21 2016
New Revision: 306899
URL: https://svnweb.freebsd.org/changeset/base/306899

Log:
  Fix release MSI method for ARM GIC

Modified:
  head/sys/arm/arm/gic.c

Modified: head/sys/arm/arm/gic.c
==============================================================================
--- head/sys/arm/arm/gic.c	Sun Oct  9 04:36:40 2016	(r306898)
+++ head/sys/arm/arm/gic.c	Sun Oct  9 04:37:21 2016	(r306899)
@@ -1474,15 +1474,15 @@ arm_gicv2m_release_msi(device_t dev, dev
 
 	mtx_lock(&sc->sc_mutex);
 	for (i = 0; i < count; i++) {
-		gi = (struct gic_irqsrc *)isrc;
+		gi = (struct gic_irqsrc *)isrc[i];
 
 		KASSERT((gi->gi_flags & GI_FLAG_MSI_USED) == GI_FLAG_MSI_USED,
 		    ("%s: Trying to release an unused MSI-X interrupt",
 		    __func__));
 
 		gi->gi_flags &= ~GI_FLAG_MSI_USED;
-		mtx_unlock(&sc->sc_mutex);
 	}
+	mtx_unlock(&sc->sc_mutex);
 
 	return (0);
 }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201610090437.u994bMOP035522>