diff options
author | gibbs <gibbs@FreeBSD.org> | 2003-05-26 21:20:47 +0000 |
---|---|---|
committer | gibbs <gibbs@FreeBSD.org> | 2003-05-26 21:20:47 +0000 |
commit | b25cf57baf95e38540324c41d6bc74524c174bf8 (patch) | |
tree | a19f214d84e89b94451e01b9b457a97140228f6b /sys | |
parent | aa79fd0e564f7732bb1c1d396412e6e7d24b72b9 (diff) | |
download | FreeBSD-src-b25cf57baf95e38540324c41d6bc74524c174bf8.zip FreeBSD-src-b25cf57baf95e38540324c41d6bc74524c174bf8.tar.gz |
Fix disabling of PCI parity error interrupts. We need to set
FAILDIS in the SEQCTL register, not the HCNTRL register.
aic7xxx.c:
Remeber SEQCTL settings in the "seqctl" field of our
softc. seqctl defaults to just having FASTMODE set,
but the bus attachments can override this.
aic7xxx.h:
Add the seqctl softc field.
aic7xxx_pci.c:
Update the seqctl softc field and manually update SEQCTL
when to many PCI errors occur
Approved by: RE
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/aic7xxx/aic7xxx.c | 14 | ||||
-rw-r--r-- | sys/dev/aic7xxx/aic7xxx.h | 7 | ||||
-rw-r--r-- | sys/dev/aic7xxx/aic7xxx_pci.c | 12 |
3 files changed, 21 insertions, 12 deletions
diff --git a/sys/dev/aic7xxx/aic7xxx.c b/sys/dev/aic7xxx/aic7xxx.c index 406d597..7c6923b 100644 --- a/sys/dev/aic7xxx/aic7xxx.c +++ b/sys/dev/aic7xxx/aic7xxx.c @@ -37,7 +37,7 @@ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGES. * - * $Id: //depot/aic7xxx/aic7xxx/aic7xxx.c#128 $ + * $Id: //depot/aic7xxx/aic7xxx/aic7xxx.c#129 $ * * $FreeBSD$ */ @@ -291,7 +291,7 @@ ahc_restart(struct ahc_softc *ahc) ahc_inb(ahc, SEQ_FLAGS2) & ~SCB_DMA); } ahc_outb(ahc, MWI_RESIDUAL, 0); - ahc_outb(ahc, SEQCTL, FASTMODE); + ahc_outb(ahc, SEQCTL, ahc->seqctl); ahc_outb(ahc, SEQADDR0, 0); ahc_outb(ahc, SEQADDR1, 0); ahc_unpause(ahc); @@ -1467,7 +1467,7 @@ ahc_clear_critical_section(struct ahc_softc *ahc) else ahc_outb(ahc, SIMODE1, 0); ahc_outb(ahc, CLRINT, CLRSCSIINT); - ahc_outb(ahc, SEQCTL, ahc_inb(ahc, SEQCTL) | STEP); + ahc_outb(ahc, SEQCTL, ahc->seqctl | STEP); stepping = TRUE; } if ((ahc->features & AHC_DT) != 0) { @@ -1481,7 +1481,7 @@ ahc_clear_critical_section(struct ahc_softc *ahc) if (stepping) { ahc_outb(ahc, SIMODE0, simode0); ahc_outb(ahc, SIMODE1, simode1); - ahc_outb(ahc, SEQCTL, ahc_inb(ahc, SEQCTL) & ~STEP); + ahc_outb(ahc, SEQCTL, ahc->seqctl); } } @@ -3826,6 +3826,12 @@ ahc_alloc(void *platform_arg, char *name) ahc->features = AHC_FENONE; ahc->bugs = AHC_BUGNONE; ahc->flags = AHC_FNONE; + /* + * Default to all error reporting enabled with the + * sequencer operating at its fastest speed. + * The bus attach code may modify this. + */ + ahc->seqctl = FASTMODE; for (i = 0; i < AHC_NUM_TARGETS; i++) TAILQ_INIT(&ahc->untagged_queues[i]); diff --git a/sys/dev/aic7xxx/aic7xxx.h b/sys/dev/aic7xxx/aic7xxx.h index de1a221..adabee6 100644 --- a/sys/dev/aic7xxx/aic7xxx.h +++ b/sys/dev/aic7xxx/aic7xxx.h @@ -37,7 +37,7 @@ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGES. * - * $Id: //depot/aic7xxx/aic7xxx/aic7xxx.h#75 $ + * $Id: //depot/aic7xxx/aic7xxx/aic7xxx.h#76 $ * * $FreeBSD$ */ @@ -1047,6 +1047,11 @@ struct ahc_softc { uint8_t tqinfifonext; /* + * Cached copy of the sequencer control register. + */ + uint8_t seqctl; + + /* * Incoming and outgoing message handling. */ uint8_t send_msg_perror; diff --git a/sys/dev/aic7xxx/aic7xxx_pci.c b/sys/dev/aic7xxx/aic7xxx_pci.c index f008dfd..377307d 100644 --- a/sys/dev/aic7xxx/aic7xxx_pci.c +++ b/sys/dev/aic7xxx/aic7xxx_pci.c @@ -39,7 +39,7 @@ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGES. * - * $Id: //depot/aic7xxx/aic7xxx/aic7xxx_pci.c#64 $ + * $Id: //depot/aic7xxx/aic7xxx/aic7xxx_pci.c#66 $ * * $FreeBSD$ */ @@ -854,10 +854,8 @@ ahc_pci_config(struct ahc_softc *ahc, struct ahc_pci_identity *entry) * error reporting when doing this, so CIO bus, scb ram, and * scratch ram parity errors will be ignored too. */ - if ((ahc->flags & AHC_DISABLE_PCI_PERR) != 0) { - ahc->pause |= FAILDIS; - ahc->unpause |= FAILDIS; - } + if ((ahc->flags & AHC_DISABLE_PCI_PERR) != 0) + ahc->seqctl |= FAILDIS; ahc->bus_intr = ahc_pci_intr; ahc->bus_chip_init = ahc_pci_chip_init; @@ -2044,8 +2042,8 @@ ahc_pci_intr(struct ahc_softc *ahc) "%s: WARNING WARNING WARNING WARNING\n", ahc_name(ahc), ahc_name(ahc), ahc_name(ahc), ahc_name(ahc), ahc_name(ahc), ahc_name(ahc)); - ahc->pause |= FAILDIS; - ahc->unpause |= FAILDIS; + ahc->seqctl |= FAILDIS; + ahc_outb(ahc, SEQCTL, ahc->seqctl); } ahc_unpause(ahc); } |