Commit 2f5ac28f authored by Justin T. Gibbs's avatar Justin T. Gibbs

Aic7xxx Driver Update

 o Fix disabling of PCI parity error interrupts.  We need to set
   FAILDIS in the SEQCTL register, not the HCNTRL register.
parent 4548e111
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGES. * POSSIBILITY OF SUCH DAMAGES.
* *
* $Id: //depot/aic7xxx/aic7xxx/aic7xxx.h#75 $ * $Id: //depot/aic7xxx/aic7xxx/aic7xxx.h#76 $
* *
* $FreeBSD$ * $FreeBSD$
*/ */
...@@ -1046,6 +1046,11 @@ struct ahc_softc { ...@@ -1046,6 +1046,11 @@ struct ahc_softc {
struct target_cmd *targetcmds; struct target_cmd *targetcmds;
uint8_t tqinfifonext; uint8_t tqinfifonext;
/*
* Cached copy of the sequencer control register.
*/
uint8_t seqctl;
/* /*
* Incoming and outgoing message handling. * Incoming and outgoing message handling.
*/ */
......
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGES. * POSSIBILITY OF SUCH DAMAGES.
* *
* $Id: //depot/aic7xxx/aic7xxx/aic7xxx.c#128 $ * $Id: //depot/aic7xxx/aic7xxx/aic7xxx.c#129 $
* *
* $FreeBSD$ * $FreeBSD$
*/ */
...@@ -291,7 +291,7 @@ ahc_restart(struct ahc_softc *ahc) ...@@ -291,7 +291,7 @@ ahc_restart(struct ahc_softc *ahc)
ahc_inb(ahc, SEQ_FLAGS2) & ~SCB_DMA); ahc_inb(ahc, SEQ_FLAGS2) & ~SCB_DMA);
} }
ahc_outb(ahc, MWI_RESIDUAL, 0); 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, SEQADDR0, 0);
ahc_outb(ahc, SEQADDR1, 0); ahc_outb(ahc, SEQADDR1, 0);
ahc_unpause(ahc); ahc_unpause(ahc);
...@@ -1467,7 +1467,7 @@ ahc_clear_critical_section(struct ahc_softc *ahc) ...@@ -1467,7 +1467,7 @@ ahc_clear_critical_section(struct ahc_softc *ahc)
else else
ahc_outb(ahc, SIMODE1, 0); ahc_outb(ahc, SIMODE1, 0);
ahc_outb(ahc, CLRINT, CLRSCSIINT); ahc_outb(ahc, CLRINT, CLRSCSIINT);
ahc_outb(ahc, SEQCTL, ahc_inb(ahc, SEQCTL) | STEP); ahc_outb(ahc, SEQCTL, ahc->seqctl | STEP);
stepping = TRUE; stepping = TRUE;
} }
if ((ahc->features & AHC_DT) != 0) { if ((ahc->features & AHC_DT) != 0) {
...@@ -1481,7 +1481,7 @@ ahc_clear_critical_section(struct ahc_softc *ahc) ...@@ -1481,7 +1481,7 @@ ahc_clear_critical_section(struct ahc_softc *ahc)
if (stepping) { if (stepping) {
ahc_outb(ahc, SIMODE0, simode0); ahc_outb(ahc, SIMODE0, simode0);
ahc_outb(ahc, SIMODE1, simode1); 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) ...@@ -3826,6 +3826,12 @@ ahc_alloc(void *platform_arg, char *name)
ahc->features = AHC_FENONE; ahc->features = AHC_FENONE;
ahc->bugs = AHC_BUGNONE; ahc->bugs = AHC_BUGNONE;
ahc->flags = AHC_FNONE; 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++) for (i = 0; i < AHC_NUM_TARGETS; i++)
TAILQ_INIT(&ahc->untagged_queues[i]); TAILQ_INIT(&ahc->untagged_queues[i]);
......
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGES. * POSSIBILITY OF SUCH DAMAGES.
* *
* $Id: //depot/aic7xxx/aic7xxx/aic7xxx_pci.c#65 $ * $Id: //depot/aic7xxx/aic7xxx/aic7xxx_pci.c#66 $
* *
* $FreeBSD$ * $FreeBSD$
*/ */
...@@ -854,10 +854,8 @@ ahc_pci_config(struct ahc_softc *ahc, struct ahc_pci_identity *entry) ...@@ -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 * error reporting when doing this, so CIO bus, scb ram, and
* scratch ram parity errors will be ignored too. * scratch ram parity errors will be ignored too.
*/ */
if ((ahc->flags & AHC_DISABLE_PCI_PERR) != 0) { if ((ahc->flags & AHC_DISABLE_PCI_PERR) != 0)
ahc->pause |= FAILDIS; ahc->seqctl |= FAILDIS;
ahc->unpause |= FAILDIS;
}
ahc->bus_intr = ahc_pci_intr; ahc->bus_intr = ahc_pci_intr;
ahc->bus_chip_init = ahc_pci_chip_init; ahc->bus_chip_init = ahc_pci_chip_init;
...@@ -2044,8 +2042,8 @@ ahc_pci_intr(struct ahc_softc *ahc) ...@@ -2044,8 +2042,8 @@ ahc_pci_intr(struct ahc_softc *ahc)
"%s: WARNING WARNING WARNING WARNING\n", "%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_name(ahc), ahc_name(ahc), ahc_name(ahc)); ahc_name(ahc), ahc_name(ahc), ahc_name(ahc));
ahc->pause |= FAILDIS; ahc->seqctl |= FAILDIS;
ahc->unpause |= FAILDIS; ahc_outb(ahc, SEQCTL, ahc->seqctl);
} }
ahc_unpause(ahc); ahc_unpause(ahc);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment