* Ensuring that interrupts are disabled only once per interrupt.
* Coding style cleanup. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34818 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
f8762ee71c
commit
75b892d51f
@ -1387,6 +1387,7 @@ rt2560_intr(void *arg)
|
||||
|
||||
RAL_LOCK(sc);
|
||||
|
||||
#if !defined(__HAIKU__)
|
||||
/* disable interrupts */
|
||||
RAL_WRITE(sc, RT2560_CSR8, 0xffffffff);
|
||||
|
||||
@ -1395,6 +1396,7 @@ rt2560_intr(void *arg)
|
||||
RAL_UNLOCK(sc);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
r = RAL_READ(sc, RT2560_CSR7);
|
||||
RAL_WRITE(sc, RT2560_CSR7, r);
|
||||
|
@ -1186,6 +1186,7 @@ rt2661_intr(void *arg)
|
||||
|
||||
RAL_LOCK(sc);
|
||||
|
||||
#if !defined(__HAIKU__)
|
||||
/* disable MAC and MCU interrupts */
|
||||
RAL_WRITE(sc, RT2661_INT_MASK_CSR, 0xffffff7f);
|
||||
RAL_WRITE(sc, RT2661_MCU_INT_MASK_CSR, 0xffffffff);
|
||||
@ -1195,6 +1196,7 @@ rt2661_intr(void *arg)
|
||||
RAL_UNLOCK(sc);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
r1 = RAL_READ(sc, RT2661_INT_SOURCE_CSR);
|
||||
RAL_WRITE(sc, RT2661_INT_SOURCE_CSR, r1);
|
||||
|
@ -48,9 +48,10 @@ HAIKU_CHECK_DISABLE_INTERRUPTS(device_t dev)
|
||||
RAL_WRITE(sc, RT2661_MCU_INT_MASK_CSR, 0xffffffff);
|
||||
}
|
||||
|
||||
if (!(ifp->if_drv_flags & IFF_DRV_RUNNING))
|
||||
if (!(ifp->if_drv_flags & IFF_DRV_RUNNING)) {
|
||||
// don't re-enable interrupts if we're shutting down
|
||||
return 0;
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user