[rtems commit] leon, grspw_pkt: ISR activate shutdown work only if errintr enabled

Daniel Hellstrom danielh at rtems.org
Mon Mar 6 06:58:44 UTC 2017


Module:    rtems
Branch:    master
Commit:    090016a4fbfaa8fc7220aa17d7f0e8d9963523d1
Changeset: http://git.rtems.org/rtems/commit/?id=090016a4fbfaa8fc7220aa17d7f0e8d9963523d1

Author:    Daniel Hellstrom <daniel at gaisler.com>
Date:      Sun Jan 22 11:34:25 2017 +0100

leon, grspw_pkt: ISR activate shutdown work only if errintr enabled

In shared interrupt systems it might be a problem to handle the interrupt
regardless of the interrupt is enabled. Now the same approach to the
DMA RX/TX interrupt in the ISR is taken.

---

 c/src/lib/libbsp/sparc/shared/spw/grspw_pkt.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/c/src/lib/libbsp/sparc/shared/spw/grspw_pkt.c b/c/src/lib/libbsp/sparc/shared/spw/grspw_pkt.c
index 498333e..d3eca27 100644
--- a/c/src/lib/libbsp/sparc/shared/spw/grspw_pkt.c
+++ b/c/src/lib/libbsp/sparc/shared/spw/grspw_pkt.c
@@ -2819,7 +2819,8 @@ STATIC void grspw_isr(void *data)
 		if (stat & GRSPW_STS_WE)
 			priv->stats.err_wsync++;
 
-		if ((priv->dis_link_on_err >> 16) & stat) {
+		if (((priv->dis_link_on_err >> 16) & stat) &&
+		    (REG_READ(&priv->regs->ctrl) & GRSPW_CTRL_IE)) {
 			/* Disable the link, no more transfers are expected
 			 * on any DMA channel.
 			 */



More information about the vc mailing list