Always enable SCSI IRQ interrupt; the SBC_INTR flag now controls only
the SCSI DRQ interrupt, for "blind" transfers.
This commit is contained in:
parent
98f47c009f
commit
f65f7e9b21
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: sbc_obio.c,v 1.2 1997/03/15 18:10:01 is Exp $ */
|
||||
/* $NetBSD: sbc_obio.c,v 1.3 1997/04/07 05:56:28 scottr Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (C) 1996,1997 Scott Reynolds. All rights reserved.
|
||||
@ -210,26 +210,21 @@ sbc_obio_attach(parent, self, args)
|
||||
ncr_sc->sc_dma_eop = sbc_dma_eop;
|
||||
ncr_sc->sc_dma_stop = sbc_dma_stop;
|
||||
via2_register_irq(VIA2_SCSIDRQ, sbc_drq_intr, ncr_sc);
|
||||
via2_register_irq(VIA2_SCSIIRQ, sbc_irq_intr, ncr_sc);
|
||||
} else
|
||||
ncr_sc->sc_flags |= NCR5380_FORCE_POLLING;
|
||||
}
|
||||
|
||||
via2_register_irq(VIA2_SCSIIRQ, sbc_irq_intr, ncr_sc);
|
||||
sc->sc_clrintr = sbc_obio_clrintr;
|
||||
|
||||
if ((sc->sc_options & SBC_RESELECT) == 0)
|
||||
ncr_sc->sc_no_disconnect = 0xff;
|
||||
|
||||
if (sc->sc_options & SBC_INTR)
|
||||
sc->sc_clrintr = sbc_obio_clrintr;
|
||||
else
|
||||
sc->sc_clrintr = NULL;
|
||||
|
||||
if (sc->sc_options)
|
||||
printf(": options=%s", bitmask_snprintf(sc->sc_options,
|
||||
SBC_OPTIONS_BITS, bits, sizeof(bits)));
|
||||
printf("\n");
|
||||
|
||||
/* Now enable SCSI interrupts through VIA2, if appropriate */
|
||||
if (sc->sc_options & SBC_INTR)
|
||||
sbc_intr_enable(ncr_sc);
|
||||
/* Enable SCSI interrupts through VIA2 */
|
||||
sbc_intr_enable(ncr_sc);
|
||||
|
||||
#ifdef SBC_DEBUG
|
||||
if (sbc_debug)
|
||||
@ -253,13 +248,18 @@ void
|
||||
sbc_intr_enable(ncr_sc)
|
||||
struct ncr5380_softc *ncr_sc;
|
||||
{
|
||||
int s;
|
||||
struct sbc_softc *sc = (struct sbc_softc *)ncr_sc;
|
||||
int s, flags;
|
||||
|
||||
flags = V2IF_SCSIIRQ;
|
||||
if (sc->sc_options & SBC_INTR)
|
||||
flags |= V2IF_SCSIDRQ;
|
||||
|
||||
s = splhigh();
|
||||
if (VIA2 == VIA2OFF)
|
||||
via2_reg(vIER) = 0x80 | (V2IF_SCSIIRQ | V2IF_SCSIDRQ);
|
||||
via2_reg(vIER) = 0x80 | flags;
|
||||
else
|
||||
via2_reg(rIER) = 0x80 | (V2IF_SCSIIRQ | V2IF_SCSIDRQ);
|
||||
via2_reg(rIER) = 0x80 | flags;
|
||||
splx(s);
|
||||
}
|
||||
|
||||
@ -267,13 +267,18 @@ void
|
||||
sbc_intr_disable(ncr_sc)
|
||||
struct ncr5380_softc *ncr_sc;
|
||||
{
|
||||
int s;
|
||||
struct sbc_softc *sc = (struct sbc_softc *)ncr_sc;
|
||||
int s, flags;
|
||||
|
||||
flags = V2IF_SCSIIRQ;
|
||||
if (sc->sc_options & SBC_INTR)
|
||||
flags |= V2IF_SCSIDRQ;
|
||||
|
||||
s = splhigh();
|
||||
if (VIA2 == VIA2OFF)
|
||||
via2_reg(vIER) = (V2IF_SCSIIRQ | V2IF_SCSIDRQ);
|
||||
via2_reg(vIER) = flags;
|
||||
else
|
||||
via2_reg(rIER) = (V2IF_SCSIIRQ | V2IF_SCSIDRQ);
|
||||
via2_reg(rIER) = flags;
|
||||
splx(s);
|
||||
}
|
||||
|
||||
@ -281,8 +286,15 @@ void
|
||||
sbc_obio_clrintr(ncr_sc)
|
||||
struct ncr5380_softc *ncr_sc;
|
||||
{
|
||||
struct sbc_softc *sc = (struct sbc_softc *)ncr_sc;
|
||||
int flags;
|
||||
|
||||
flags = V2IF_SCSIIRQ;
|
||||
if (sc->sc_options & SBC_INTR)
|
||||
flags |= V2IF_SCSIDRQ;
|
||||
|
||||
if (VIA2 == VIA2OFF)
|
||||
via2_reg(vIFR) = 0x80 | (V2IF_SCSIIRQ | V2IF_SCSIDRQ);
|
||||
via2_reg(vIFR) = 0x80 | flags;
|
||||
else
|
||||
via2_reg(rIFR) = 0x80 | (V2IF_SCSIIRQ | V2IF_SCSIDRQ);
|
||||
via2_reg(rIFR) = 0x80 | flags;
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: sbc_obio.c,v 1.2 1997/03/15 18:10:01 is Exp $ */
|
||||
/* $NetBSD: sbc_obio.c,v 1.3 1997/04/07 05:56:28 scottr Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (C) 1996,1997 Scott Reynolds. All rights reserved.
|
||||
@ -210,26 +210,21 @@ sbc_obio_attach(parent, self, args)
|
||||
ncr_sc->sc_dma_eop = sbc_dma_eop;
|
||||
ncr_sc->sc_dma_stop = sbc_dma_stop;
|
||||
via2_register_irq(VIA2_SCSIDRQ, sbc_drq_intr, ncr_sc);
|
||||
via2_register_irq(VIA2_SCSIIRQ, sbc_irq_intr, ncr_sc);
|
||||
} else
|
||||
ncr_sc->sc_flags |= NCR5380_FORCE_POLLING;
|
||||
}
|
||||
|
||||
via2_register_irq(VIA2_SCSIIRQ, sbc_irq_intr, ncr_sc);
|
||||
sc->sc_clrintr = sbc_obio_clrintr;
|
||||
|
||||
if ((sc->sc_options & SBC_RESELECT) == 0)
|
||||
ncr_sc->sc_no_disconnect = 0xff;
|
||||
|
||||
if (sc->sc_options & SBC_INTR)
|
||||
sc->sc_clrintr = sbc_obio_clrintr;
|
||||
else
|
||||
sc->sc_clrintr = NULL;
|
||||
|
||||
if (sc->sc_options)
|
||||
printf(": options=%s", bitmask_snprintf(sc->sc_options,
|
||||
SBC_OPTIONS_BITS, bits, sizeof(bits)));
|
||||
printf("\n");
|
||||
|
||||
/* Now enable SCSI interrupts through VIA2, if appropriate */
|
||||
if (sc->sc_options & SBC_INTR)
|
||||
sbc_intr_enable(ncr_sc);
|
||||
/* Enable SCSI interrupts through VIA2 */
|
||||
sbc_intr_enable(ncr_sc);
|
||||
|
||||
#ifdef SBC_DEBUG
|
||||
if (sbc_debug)
|
||||
@ -253,13 +248,18 @@ void
|
||||
sbc_intr_enable(ncr_sc)
|
||||
struct ncr5380_softc *ncr_sc;
|
||||
{
|
||||
int s;
|
||||
struct sbc_softc *sc = (struct sbc_softc *)ncr_sc;
|
||||
int s, flags;
|
||||
|
||||
flags = V2IF_SCSIIRQ;
|
||||
if (sc->sc_options & SBC_INTR)
|
||||
flags |= V2IF_SCSIDRQ;
|
||||
|
||||
s = splhigh();
|
||||
if (VIA2 == VIA2OFF)
|
||||
via2_reg(vIER) = 0x80 | (V2IF_SCSIIRQ | V2IF_SCSIDRQ);
|
||||
via2_reg(vIER) = 0x80 | flags;
|
||||
else
|
||||
via2_reg(rIER) = 0x80 | (V2IF_SCSIIRQ | V2IF_SCSIDRQ);
|
||||
via2_reg(rIER) = 0x80 | flags;
|
||||
splx(s);
|
||||
}
|
||||
|
||||
@ -267,13 +267,18 @@ void
|
||||
sbc_intr_disable(ncr_sc)
|
||||
struct ncr5380_softc *ncr_sc;
|
||||
{
|
||||
int s;
|
||||
struct sbc_softc *sc = (struct sbc_softc *)ncr_sc;
|
||||
int s, flags;
|
||||
|
||||
flags = V2IF_SCSIIRQ;
|
||||
if (sc->sc_options & SBC_INTR)
|
||||
flags |= V2IF_SCSIDRQ;
|
||||
|
||||
s = splhigh();
|
||||
if (VIA2 == VIA2OFF)
|
||||
via2_reg(vIER) = (V2IF_SCSIIRQ | V2IF_SCSIDRQ);
|
||||
via2_reg(vIER) = flags;
|
||||
else
|
||||
via2_reg(rIER) = (V2IF_SCSIIRQ | V2IF_SCSIDRQ);
|
||||
via2_reg(rIER) = flags;
|
||||
splx(s);
|
||||
}
|
||||
|
||||
@ -281,8 +286,15 @@ void
|
||||
sbc_obio_clrintr(ncr_sc)
|
||||
struct ncr5380_softc *ncr_sc;
|
||||
{
|
||||
struct sbc_softc *sc = (struct sbc_softc *)ncr_sc;
|
||||
int flags;
|
||||
|
||||
flags = V2IF_SCSIIRQ;
|
||||
if (sc->sc_options & SBC_INTR)
|
||||
flags |= V2IF_SCSIDRQ;
|
||||
|
||||
if (VIA2 == VIA2OFF)
|
||||
via2_reg(vIFR) = 0x80 | (V2IF_SCSIIRQ | V2IF_SCSIDRQ);
|
||||
via2_reg(vIFR) = 0x80 | flags;
|
||||
else
|
||||
via2_reg(rIFR) = 0x80 | (V2IF_SCSIIRQ | V2IF_SCSIDRQ);
|
||||
via2_reg(rIFR) = 0x80 | flags;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user