* 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:
@@ -1387,6 +1387,7 @@ rt2560_intr(void *arg)
|
|||||||
|
|
||||||
RAL_LOCK(sc);
|
RAL_LOCK(sc);
|
||||||
|
|
||||||
|
#if !defined(__HAIKU__)
|
||||||
/* disable interrupts */
|
/* disable interrupts */
|
||||||
RAL_WRITE(sc, RT2560_CSR8, 0xffffffff);
|
RAL_WRITE(sc, RT2560_CSR8, 0xffffffff);
|
||||||
|
|
||||||
@@ -1395,6 +1396,7 @@ rt2560_intr(void *arg)
|
|||||||
RAL_UNLOCK(sc);
|
RAL_UNLOCK(sc);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
r = RAL_READ(sc, RT2560_CSR7);
|
r = RAL_READ(sc, RT2560_CSR7);
|
||||||
RAL_WRITE(sc, RT2560_CSR7, r);
|
RAL_WRITE(sc, RT2560_CSR7, r);
|
||||||
|
|||||||
@@ -1186,6 +1186,7 @@ rt2661_intr(void *arg)
|
|||||||
|
|
||||||
RAL_LOCK(sc);
|
RAL_LOCK(sc);
|
||||||
|
|
||||||
|
#if !defined(__HAIKU__)
|
||||||
/* disable MAC and MCU interrupts */
|
/* disable MAC and MCU interrupts */
|
||||||
RAL_WRITE(sc, RT2661_INT_MASK_CSR, 0xffffff7f);
|
RAL_WRITE(sc, RT2661_INT_MASK_CSR, 0xffffff7f);
|
||||||
RAL_WRITE(sc, RT2661_MCU_INT_MASK_CSR, 0xffffffff);
|
RAL_WRITE(sc, RT2661_MCU_INT_MASK_CSR, 0xffffffff);
|
||||||
@@ -1195,6 +1196,7 @@ rt2661_intr(void *arg)
|
|||||||
RAL_UNLOCK(sc);
|
RAL_UNLOCK(sc);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
r1 = RAL_READ(sc, RT2661_INT_SOURCE_CSR);
|
r1 = RAL_READ(sc, RT2661_INT_SOURCE_CSR);
|
||||||
RAL_WRITE(sc, RT2661_INT_SOURCE_CSR, r1);
|
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);
|
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
|
// don't re-enable interrupts if we're shutting down
|
||||||
return 0;
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user