Fix interrupt handling with DMA. Bit nFault was tested in the control reg.

instead of the status reg. and check ECP mode before considering nFault.
This commit is contained in:
nsouch 1999-02-14 12:03:35 +00:00
parent 13c212a118
commit ad25a63490
3 changed files with 30 additions and 15 deletions

View File

@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: ppc.c,v 1.16 1999/01/30 15:35:38 nsouch Exp $
* $Id: ppc.c,v 1.17 1999/01/31 11:52:04 nsouch Exp $
*
*/
#include "ppc.h"
@ -1328,13 +1328,14 @@ static void
ppcintr(int unit)
{
struct ppc_data *ppc = ppcdata[unit];
char ctr, ecr;
u_char ctr, ecr, str;
str = r_str(ppc);
ctr = r_ctr(ppc);
ecr = r_ecr(ppc);
#ifdef PPC_DEBUG
printf("!");
#if PPC_DEBUG > 1
printf("![%x/%x/%x]", ctr, ecr, str);
#endif
/* don't use ecp mode with IRQENABLE set */
@ -1344,7 +1345,11 @@ ppcintr(int unit)
return;
}
if (ctr & nFAULT) {
/* interrupts are generated by nFault signal
* only in ECP mode */
if ((str & nFAULT) && (ppc->ppc_mode & PPB_ECP)) {
/* check if ppc driver has programmed the
* nFault interrupt */
if (ppc->ppc_irqstat & PPC_IRQ_nFAULT) {
w_ecr(ppc, ecr | PPC_nFAULT_INTR);

View File

@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: ppc.c,v 1.16 1999/01/30 15:35:38 nsouch Exp $
* $Id: ppc.c,v 1.17 1999/01/31 11:52:04 nsouch Exp $
*
*/
#include "ppc.h"
@ -1328,13 +1328,14 @@ static void
ppcintr(int unit)
{
struct ppc_data *ppc = ppcdata[unit];
char ctr, ecr;
u_char ctr, ecr, str;
str = r_str(ppc);
ctr = r_ctr(ppc);
ecr = r_ecr(ppc);
#ifdef PPC_DEBUG
printf("!");
#if PPC_DEBUG > 1
printf("![%x/%x/%x]", ctr, ecr, str);
#endif
/* don't use ecp mode with IRQENABLE set */
@ -1344,7 +1345,11 @@ ppcintr(int unit)
return;
}
if (ctr & nFAULT) {
/* interrupts are generated by nFault signal
* only in ECP mode */
if ((str & nFAULT) && (ppc->ppc_mode & PPB_ECP)) {
/* check if ppc driver has programmed the
* nFault interrupt */
if (ppc->ppc_irqstat & PPC_IRQ_nFAULT) {
w_ecr(ppc, ecr | PPC_nFAULT_INTR);

View File

@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: ppc.c,v 1.16 1999/01/30 15:35:38 nsouch Exp $
* $Id: ppc.c,v 1.17 1999/01/31 11:52:04 nsouch Exp $
*
*/
#include "ppc.h"
@ -1328,13 +1328,14 @@ static void
ppcintr(int unit)
{
struct ppc_data *ppc = ppcdata[unit];
char ctr, ecr;
u_char ctr, ecr, str;
str = r_str(ppc);
ctr = r_ctr(ppc);
ecr = r_ecr(ppc);
#ifdef PPC_DEBUG
printf("!");
#if PPC_DEBUG > 1
printf("![%x/%x/%x]", ctr, ecr, str);
#endif
/* don't use ecp mode with IRQENABLE set */
@ -1344,7 +1345,11 @@ ppcintr(int unit)
return;
}
if (ctr & nFAULT) {
/* interrupts are generated by nFault signal
* only in ECP mode */
if ((str & nFAULT) && (ppc->ppc_mode & PPB_ECP)) {
/* check if ppc driver has programmed the
* nFault interrupt */
if (ppc->ppc_irqstat & PPC_IRQ_nFAULT) {
w_ecr(ppc, ecr | PPC_nFAULT_INTR);