Commit 9a0a4cb1 authored by Linus Torvalds's avatar Linus Torvalds

Automerge

parents 060c05b9 e69dc6dc
# #
# Makefile for the Linux aic7xxx SCSI driver. # Makefile for the Linux aic7xxx SCSI driver.
# #
# $Id: //depot/linux-aic79xx-2.5.0/drivers/scsi/aic7xxx/Makefile#3 $ # $Id: //depot/linux-aic79xx-2.5.0/drivers/scsi/aic7xxx/Makefile#5 $
# #
# Let kbuild descend into aicasm when cleaning # Let kbuild descend into aicasm when cleaning
...@@ -44,40 +44,39 @@ clean-files += aic79xx_seq.h aic79xx_reg.h aic79xx_reg_print.c ...@@ -44,40 +44,39 @@ clean-files += aic79xx_seq.h aic79xx_reg.h aic79xx_reg_print.c
$(obj)/aic7xxx_core.o: $(obj)/aic7xxx_seq.h $(obj)/aic7xxx_core.o: $(obj)/aic7xxx_seq.h
$(obj)/aic79xx_core.o: $(obj)/aic79xx_seq.h $(obj)/aic79xx_core.o: $(obj)/aic79xx_seq.h
$(obj)/aic79xx_reg_print.c: $(src)/aic79xx_reg_print.c_shipped
$(obj)/aic7xxx_reg_print.c: $(src)/aic7xxx_reg_print.c_shipped
$(addprefix $(obj)/,$(aic7xxx-y)): $(obj)/aic7xxx_reg.h $(addprefix $(obj)/,$(aic7xxx-y)): $(obj)/aic7xxx_reg.h
$(addprefix $(obj)/,$(aic79xx-y)): $(obj)/aic79xx_reg.h $(addprefix $(obj)/,$(aic79xx-y)): $(obj)/aic79xx_reg.h
aic7xxx-gen-$(CONFIG_AIC7XXX_BUILD_FIRMWARE) := $(obj)/aic7xxx_seq.h \
$(obj)/aic7xxx_reg.h
aic7xxx-gen-$(CONFIG_AIC7XXX_REG_PRETTY_PRINT) += $(obj)/aic7xxx_reg_print.c
aicasm-7xxx-opts-$(CONFIG_AIC7XXX_REG_PRETTY_PRINT) := \
-p $(obj)/aic7xxx_reg_print.c -i aic7xxx_osm.h
ifeq ($(CONFIG_AIC7XXX_BUILD_FIRMWARE),y) ifeq ($(CONFIG_AIC7XXX_BUILD_FIRMWARE),y)
aic7xxx_gen = $(obj)/aic7xxx_seq.h $(obj)/aic7xxx_reg.h $(aic7xxx-gen-y): $(src)/aic7xxx.seq $(src)/aic7xxx.reg $(obj)/aicasm/aicasm
ifeq ($(CONFIG_AIC7XXX_REG_PRETTY_PRINT),y) $(obj)/aicasm/aicasm -I$(src) -r $(obj)/aic7xxx_reg.h \
aic7xxx_gen += $(obj)/aic7xxx_reg_print.c $(aicasm-7xxx-opts-y) -o $(obj)/aic7xxx_seq.h \
aic7xxx_asm_cmd = $(obj)/aicasm/aicasm -I$(src) -r $(obj)/aic7xxx_reg.h \ $(src)/aic7xxx.seq
-p $(obj)/aic7xxx_reg_print.c -i aic7xxx_osm.h \
-o $(obj)/aic7xxx_seq.h $(src)/aic7xxx.seq
else
aic7xxx_asm_cmd = $(obj)/aicasm/aicasm -I$(src) -r $(obj)/aic7xxx_reg.h \
-o $(obj)/aic7xxx_seq.h $(src)/aic7xxx.seq
endif endif
$(aic7xxx_gen): $(src)/aic7xxx.seq $(src)/aic7xxx.reg $(obj)/aicasm/aicasm aic79xx-gen-$(CONFIG_AIC79XX_BUILD_FIRMWARE) := $(obj)/aic79xx_seq.h \
$(aic7xxx_asm_cmd) $(obj)/aic79xx_reg.h
endif aic79xx-gen-$(CONFIG_AIC79XX_REG_PRETTY_PRINT) += $(obj)/aic79xx_reg_print.c
aicasm-79xx-opts-$(CONFIG_AIC79XX_REG_PRETTY_PRINT) := \
-p $(obj)/aic79xx_reg_print.c -i aic79xx_osm.h
ifeq ($(CONFIG_AIC79XX_BUILD_FIRMWARE),y) ifeq ($(CONFIG_AIC79XX_BUILD_FIRMWARE),y)
aic79xx_gen = $(obj)/aic79xx_seq.h $(obj)/aic79xx_reg.h $(aic79xx-gen-y): $(src)/aic79xx.seq $(src)/aic79xx.reg $(obj)/aicasm/aicasm
ifeq ($(CONFIG_AIC79XX_REG_PRETTY_PRINT),y) $(obj)/aicasm/aicasm -I$(src) -r $(obj)/aic79xx_reg.h \
aic79xx_gen += $(obj)/aic79xx_reg_print.c $(aicasm-79xx-opts-y) -o $(obj)/aic79xx_seq.h \
aic79xx_asm_cmd = $(obj)/aicasm/aicasm -I$(src) -r $(obj)/aic79xx_reg.h \ $(src)/aic79xx.seq
-p $(obj)/aic79xx_reg_print.c -i aic79xx_osm.h \
-o $(obj)/aic79xx_seq.h $(src)/aic79xx.seq
else
aic79xx_asm_cmd = $(obj)/aicasm/aicasm -I$(src) -r $(obj)/aic79xx_reg.h \
-o $(obj)/aic79xx_seq.h $(src)/aic79xx.seq
endif endif
$(aic79xx_gen): $(src)/aic79xx.seq $(src)/aic79xx.reg $(obj)/aicasm/aicasm
$(aic79xx_asm_cmd)
endif
$(obj)/aicasm/aicasm: $(src)/aicasm/*.[chyl] $(obj)/aicasm/aicasm: $(src)/aicasm/*.[chyl]
$(MAKE) -C $(src)/aicasm $(MAKE) -C $(src)/aicasm
...@@ -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/aic79xx.c#148 $ * $Id: //depot/aic7xxx/aic7xxx/aic79xx.c#150 $
* *
* $FreeBSD$ * $FreeBSD$
*/ */
...@@ -2321,13 +2321,13 @@ ahd_find_syncrate(struct ahd_softc *ahd, u_int *period, ...@@ -2321,13 +2321,13 @@ ahd_find_syncrate(struct ahd_softc *ahd, u_int *period,
/* Skip all PACED only entries if IU is not available */ /* Skip all PACED only entries if IU is not available */
if ((*ppr_options & MSG_EXT_PPR_IU_REQ) == 0 if ((*ppr_options & MSG_EXT_PPR_IU_REQ) == 0
&& maxsync < AHD_SYNCRATE_DT) && *period < AHD_SYNCRATE_DT)
maxsync = AHD_SYNCRATE_DT; *period = AHD_SYNCRATE_DT;
/* Skip all DT only entries if DT is not available */ /* Skip all DT only entries if DT is not available */
if ((*ppr_options & MSG_EXT_PPR_DT_REQ) == 0 if ((*ppr_options & MSG_EXT_PPR_DT_REQ) == 0
&& maxsync < AHD_SYNCRATE_ULTRA2) && *period < AHD_SYNCRATE_ULTRA2)
maxsync = AHD_SYNCRATE_ULTRA2; *period = AHD_SYNCRATE_ULTRA2;
} }
/* /*
...@@ -5680,7 +5680,8 @@ ahd_init(struct ahd_softc *ahd) ...@@ -5680,7 +5680,8 @@ ahd_init(struct ahd_softc *ahd)
/*lowaddr*/BUS_SPACE_MAXADDR, /*lowaddr*/BUS_SPACE_MAXADDR,
/*highaddr*/BUS_SPACE_MAXADDR, /*highaddr*/BUS_SPACE_MAXADDR,
/*filter*/NULL, /*filterarg*/NULL, /*filter*/NULL, /*filterarg*/NULL,
/*maxsize*/MAXBSIZE, /*nsegments*/AHD_NSEG, /*maxsize*/(AHD_NSEG - 1) * PAGE_SIZE,
/*nsegments*/AHD_NSEG,
/*maxsegsz*/AHD_MAXTRANSFER_SIZE, /*maxsegsz*/AHD_MAXTRANSFER_SIZE,
/*flags*/BUS_DMA_ALLOCNOW, /*flags*/BUS_DMA_ALLOCNOW,
&ahd->buffer_dmat) != 0) { &ahd->buffer_dmat) != 0) {
...@@ -7856,7 +7857,8 @@ ahd_calc_residual(struct ahd_softc *ahd, struct scb *scb) ...@@ -7856,7 +7857,8 @@ ahd_calc_residual(struct ahd_softc *ahd, struct scb *scb)
#ifdef AHD_DEBUG #ifdef AHD_DEBUG
if ((ahd_debug & AHD_SHOW_MISC) != 0) { if ((ahd_debug & AHD_SHOW_MISC) != 0) {
ahd_print_path(ahd, scb); ahd_print_path(ahd, scb);
printf("Handled Residual of %d bytes\n", resid); printf("Handled %sResidual of %d bytes\n",
(scb->flags & SCB_SENSE) ? "Sense " : "", resid);
} }
#endif #endif
} }
......
/* /*
* Adaptec AIC79xx device driver for Linux. * Adaptec AIC79xx device driver for Linux.
* *
* $Id: //depot/aic7xxx/linux/drivers/scsi/aic7xxx/aic79xx_osm.c#103 $ * $Id: //depot/aic7xxx/linux/drivers/scsi/aic7xxx/aic79xx_osm.c#104 $
* *
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Copyright (c) 1994-2000 Justin T. Gibbs. * Copyright (c) 1994-2000 Justin T. Gibbs.
...@@ -2058,7 +2058,7 @@ ahd_linux_register_host(struct ahd_softc *ahd, Scsi_Host_Template *template) ...@@ -2058,7 +2058,7 @@ ahd_linux_register_host(struct ahd_softc *ahd, Scsi_Host_Template *template)
* negotiation will occur for the first command, and DV * negotiation will occur for the first command, and DV
* will comence should that first command be successful. * will comence should that first command be successful.
*/ */
for (target = 0; target < AHD_NUM_TARGETS; target++) for (target = 0; target < host->max_id; target++)
ahd_linux_alloc_target(ahd, 0, target); ahd_linux_alloc_target(ahd, 0, target);
ahd_intr_enable(ahd, TRUE); ahd_intr_enable(ahd, TRUE);
ahd_linux_start_dv(ahd); ahd_linux_start_dv(ahd);
...@@ -2883,6 +2883,23 @@ ahd_linux_dv_transition(struct ahd_softc *ahd, struct scsi_cmnd *cmd, ...@@ -2883,6 +2883,23 @@ ahd_linux_dv_transition(struct ahd_softc *ahd, struct scsi_cmnd *cmd,
break; break;
} }
#ifdef AHD_DEBUG
if (ahd_debug & AHD_SHOW_DV) {
int i;
ahd_print_devinfo(ahd, devinfo);
printf("Inquiry buffer mismatch:");
for (i = 0; i < AHD_LINUX_DV_INQ_LEN; i++) {
if ((i & 0xF) == 0)
printf("\n ");
printf("0x%x:0x0%x ",
((uint8_t *)targ->inq_data)[i],
targ->dv_buffer[i]);
}
printf("\n");
}
#endif
if (ahd_linux_dv_fallback(ahd, devinfo) != 0) { if (ahd_linux_dv_fallback(ahd, devinfo) != 0) {
AHD_SET_DV_STATE(ahd, targ, AHD_DV_STATE_EXIT); AHD_SET_DV_STATE(ahd, targ, AHD_DV_STATE_EXIT);
break; break;
...@@ -3525,6 +3542,8 @@ ahd_linux_fallback(struct ahd_softc *ahd, struct ahd_devinfo *devinfo) ...@@ -3525,6 +3542,8 @@ ahd_linux_fallback(struct ahd_softc *ahd, struct ahd_devinfo *devinfo)
targ->dv_next_narrow_period = MAX(period, AHD_SYNCRATE_ULTRA2); targ->dv_next_narrow_period = MAX(period, AHD_SYNCRATE_ULTRA2);
if (targ->dv_next_wide_period == 0) if (targ->dv_next_wide_period == 0)
targ->dv_next_wide_period = period; targ->dv_next_wide_period = period;
if (targ->dv_max_width == 0)
targ->dv_max_width = width;
if (targ->dv_max_ppr_options == 0) if (targ->dv_max_ppr_options == 0)
targ->dv_max_ppr_options = ppr_options; targ->dv_max_ppr_options = ppr_options;
if (targ->dv_last_ppr_options == 0) if (targ->dv_last_ppr_options == 0)
...@@ -3619,7 +3638,7 @@ ahd_linux_fallback(struct ahd_softc *ahd, struct ahd_devinfo *devinfo) ...@@ -3619,7 +3638,7 @@ ahd_linux_fallback(struct ahd_softc *ahd, struct ahd_devinfo *devinfo)
period++; period++;
} }
} else if ((ahd->features & AHD_WIDE) != 0 } else if ((ahd->features & AHD_WIDE) != 0
&& tinfo->user.width != 0 && targ->dv_max_width != 0
&& wide_speed >= fallback_speed && wide_speed >= fallback_speed
&& (targ->dv_next_wide_period <= AHD_ASYNC_XFER_PERIOD && (targ->dv_next_wide_period <= AHD_ASYNC_XFER_PERIOD
|| period >= AHD_ASYNC_XFER_PERIOD)) { || period >= AHD_ASYNC_XFER_PERIOD)) {
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,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/linux/drivers/scsi/aic7xxx/aic79xx_osm.h#99 $ * $Id: //depot/aic7xxx/linux/drivers/scsi/aic7xxx/aic79xx_osm.h#102 $
* *
*/ */
#ifndef _AIC79XX_LINUX_H_ #ifndef _AIC79XX_LINUX_H_
...@@ -288,7 +288,7 @@ ahd_scb_timer_reset(struct scb *scb, u_int usec) ...@@ -288,7 +288,7 @@ ahd_scb_timer_reset(struct scb *scb, u_int usec)
#include <linux/smp.h> #include <linux/smp.h>
#endif #endif
#define AIC79XX_DRIVER_VERSION "1.3.0.ALPHA6" #define AIC79XX_DRIVER_VERSION "1.3.0.BETA2"
/**************************** Front End Queues ********************************/ /**************************** Front End Queues ********************************/
/* /*
...@@ -458,10 +458,11 @@ struct ahd_linux_target { ...@@ -458,10 +458,11 @@ struct ahd_linux_target {
/* /*
* The next "fallback" period to use for narrow/wide transfers. * The next "fallback" period to use for narrow/wide transfers.
*/ */
u_int dv_next_narrow_period; uint8_t dv_next_narrow_period;
u_int dv_next_wide_period; uint8_t dv_next_wide_period;
u_int dv_max_ppr_options; uint8_t dv_max_width;
u_int dv_last_ppr_options; uint8_t dv_max_ppr_options;
uint8_t dv_last_ppr_options;
u_int dv_echo_size; u_int dv_echo_size;
ahd_dv_state dv_state; ahd_dv_state dv_state;
u_int dv_state_retry; u_int dv_state_retry;
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,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/linux/drivers/scsi/aic7xxx/aic79xx_osm_pci.c#19 $ * $Id: //depot/aic7xxx/linux/drivers/scsi/aic7xxx/aic79xx_osm_pci.c#20 $
*/ */
#include "aic79xx_osm.h" #include "aic79xx_osm.h"
...@@ -170,6 +170,9 @@ ahd_linux_pci_dev_probe(struct pci_dev *pdev, const struct pci_device_id *ent) ...@@ -170,6 +170,9 @@ ahd_linux_pci_dev_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
ahd->platform_data->hw_dma_mask = ahd->platform_data->hw_dma_mask =
(bus_addr_t)(0x7FFFFFFFFFULL & (bus_addr_t)~0); (bus_addr_t)(0x7FFFFFFFFFULL & (bus_addr_t)~0);
} }
} else {
ahd_pci_set_dma_mask(pdev, 0xFFFFFFFF);
ahd->platform_data->hw_dma_mask = 0xFFFFFFFF;
} }
#endif #endif
ahd->dev_softc = pci; ahd->dev_softc = pci;
......
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,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/aic79xx_pci.c#60 $ * $Id: //depot/aic7xxx/aic7xxx/aic79xx_pci.c#61 $
* *
* $FreeBSD$ * $FreeBSD$
*/ */
...@@ -379,15 +379,20 @@ int ...@@ -379,15 +379,20 @@ int
ahd_pci_test_register_access(struct ahd_softc *ahd) ahd_pci_test_register_access(struct ahd_softc *ahd)
{ {
ahd_mode_state saved_modes; ahd_mode_state saved_modes;
uint32_t cmd;
int error; int error;
uint8_t seqctl; uint8_t hcntrl;
saved_modes = ahd_save_modes(ahd); saved_modes = ahd_save_modes(ahd);
error = EIO; error = EIO;
/* Enable PCI error interrupt status */ /*
seqctl = ahd_inb(ahd, SEQCTL0); * Enable PCI error interrupt status, but suppress NMIs
ahd_outb(ahd, SEQCTL0, seqctl & ~FAILDIS); * generated by SERR raised due to target aborts.
*/
cmd = ahd_pci_read_config(ahd->dev_softc, PCIR_COMMAND, /*bytes*/2);
ahd_pci_write_config(ahd->dev_softc, PCIR_COMMAND,
cmd & ~PCIM_CMD_SERRESPEN, /*bytes*/2);
/* /*
* First a simple test to see if any * First a simple test to see if any
...@@ -397,7 +402,8 @@ ahd_pci_test_register_access(struct ahd_softc *ahd) ...@@ -397,7 +402,8 @@ ahd_pci_test_register_access(struct ahd_softc *ahd)
* be zero so it is a good register to * be zero so it is a good register to
* use for this test. * use for this test.
*/ */
if (ahd_inb(ahd, HCNTRL) == 0xFF) hcntrl = ahd_inb(ahd, HCNTRL);
if (hcntrl == 0xFF)
goto fail; goto fail;
/* /*
...@@ -407,6 +413,10 @@ ahd_pci_test_register_access(struct ahd_softc *ahd) ...@@ -407,6 +413,10 @@ ahd_pci_test_register_access(struct ahd_softc *ahd)
* either, so look for data corruption and/or flaged * either, so look for data corruption and/or flaged
* PCI errors. * PCI errors.
*/ */
ahd_outb(ahd, HCNTRL, hcntrl|PAUSE);
while (ahd_is_paused(ahd) == 0)
;
ahd_outb(ahd, SEQCTL0, PERRORDIS);
ahd_outl(ahd, SRAM_BASE, 0x5aa555aa); ahd_outl(ahd, SRAM_BASE, 0x5aa555aa);
if (ahd_inl(ahd, SRAM_BASE) != 0x5aa555aa) if (ahd_inl(ahd, SRAM_BASE) != 0x5aa555aa)
goto fail; goto fail;
...@@ -440,7 +450,8 @@ ahd_pci_test_register_access(struct ahd_softc *ahd) ...@@ -440,7 +450,8 @@ ahd_pci_test_register_access(struct ahd_softc *ahd)
} }
ahd_restore_modes(ahd, saved_modes); ahd_restore_modes(ahd, saved_modes);
ahd_outb(ahd, SEQCTL0, seqctl); ahd_outb(ahd, SEQCTL0, PERRORDIS|FAILDIS);
ahd_pci_write_config(ahd->dev_softc, PCIR_COMMAND, cmd, /*bytes*/2);
return (error); return (error);
} }
......
...@@ -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#66 $ * $Id: //depot/aic7xxx/aic7xxx/aic7xxx.h#67 $
* *
* $FreeBSD$ * $FreeBSD$
*/ */
...@@ -1053,7 +1053,6 @@ struct ahc_softc { ...@@ -1053,7 +1053,6 @@ struct ahc_softc {
u_int pci_cachesize; u_int pci_cachesize;
u_int stack_size; u_int stack_size;
uint16_t *saved_stack;
/* Per-Unit descriptive information */ /* Per-Unit descriptive information */
const char *description; const char *description;
......
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
* *
* $FreeBSD$ * $FreeBSD$
*/ */
VERSION = "$Id: //depot/aic7xxx/aic7xxx/aic7xxx.reg#36 $" VERSION = "$Id: //depot/aic7xxx/aic7xxx/aic7xxx.reg#37 $"
/* /*
* This file is processed by the aic7xxx_asm utility for use in assembling * This file is processed by the aic7xxx_asm utility for use in assembling
...@@ -673,6 +673,8 @@ register STACK { ...@@ -673,6 +673,8 @@ register STACK {
access_mode RO access_mode RO
} }
const STACK_SIZE 4
/* /*
* Board Control (p. 3-43) * Board Control (p. 3-43)
*/ */
......
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
* $FreeBSD$ * $FreeBSD$
*/ */
VERSION = "$Id: //depot/aic7xxx/aic7xxx/aic7xxx.seq#52 $" VERSION = "$Id: //depot/aic7xxx/aic7xxx/aic7xxx.seq#53 $"
PATCH_ARG_LIST = "struct ahc_softc *ahc" PATCH_ARG_LIST = "struct ahc_softc *ahc"
PREFIX = "ahc_" PREFIX = "ahc_"
...@@ -70,7 +70,7 @@ bus_free_sel: ...@@ -70,7 +70,7 @@ bus_free_sel:
* Turn off the selection hardware. We need to reset the * Turn off the selection hardware. We need to reset the
* selection request in order to perform a new selection. * selection request in order to perform a new selection.
*/ */
and SCSISEQ, TEMODE|ENSELI|ENRSELI|ENAUTOATNP, SCSISEQ; and SCSISEQ, TEMODE|ENSELI|ENRSELI|ENAUTOATNP;
and SIMODE1, ~ENBUSFREE; and SIMODE1, ~ENBUSFREE;
poll_for_work: poll_for_work:
call clear_target_state; call clear_target_state;
......
...@@ -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#105 $ * $Id: //depot/aic7xxx/aic7xxx/aic7xxx.c#108 $
* *
* $FreeBSD$ * $FreeBSD$
*/ */
...@@ -230,7 +230,6 @@ static int ahc_check_patch(struct ahc_softc *ahc, ...@@ -230,7 +230,6 @@ static int ahc_check_patch(struct ahc_softc *ahc,
u_int start_instr, u_int *skip_addr); u_int start_instr, u_int *skip_addr);
static void ahc_download_instr(struct ahc_softc *ahc, static void ahc_download_instr(struct ahc_softc *ahc,
u_int instrptr, uint8_t *dconsts); u_int instrptr, uint8_t *dconsts);
static int ahc_probe_stack_size(struct ahc_softc *ahc);
#ifdef AHC_TARGET_MODE #ifdef AHC_TARGET_MODE
static void ahc_queue_lstate_event(struct ahc_softc *ahc, static void ahc_queue_lstate_event(struct ahc_softc *ahc,
struct ahc_tmode_lstate *lstate, struct ahc_tmode_lstate *lstate,
...@@ -1166,6 +1165,13 @@ ahc_handle_scsiint(struct ahc_softc *ahc, u_int intstat) ...@@ -1166,6 +1165,13 @@ ahc_handle_scsiint(struct ahc_softc *ahc, u_int intstat)
ahc_name(ahc), scbptr, scb_index); ahc_name(ahc), scbptr, scb_index);
ahc_dump_card_state(ahc); ahc_dump_card_state(ahc);
} else { } else {
#ifdef AHC_DEBUG
if ((ahc_debug & AHC_SHOW_SELTO) != 0) {
ahc_print_path(ahc, scb);
printf("Saw Selection Timeout for SCB 0x%x\n",
scb_index);
}
#endif
/* /*
* Force a renegotiation with this target just in * Force a renegotiation with this target just in
* case the cable was pulled and will later be * case the cable was pulled and will later be
...@@ -1178,13 +1184,6 @@ ahc_handle_scsiint(struct ahc_softc *ahc, u_int intstat) ...@@ -1178,13 +1184,6 @@ ahc_handle_scsiint(struct ahc_softc *ahc, u_int intstat)
ahc_force_renegotiation(ahc); ahc_force_renegotiation(ahc);
ahc_set_transaction_status(scb, CAM_SEL_TIMEOUT); ahc_set_transaction_status(scb, CAM_SEL_TIMEOUT);
ahc_freeze_devq(ahc, scb); ahc_freeze_devq(ahc, scb);
#ifdef AHC_DEBUG
if ((ahc_debug & AHC_SHOW_SELTO) != 0) {
ahc_print_path(ahc, scb);
printf("Saw Selection Timeout for SCB 0x%x\n",
scb_index);
}
#endif
} }
ahc_outb(ahc, CLRINT, CLRSCSIINT); ahc_outb(ahc, CLRINT, CLRSCSIINT);
ahc_restart(ahc); ahc_restart(ahc);
...@@ -4005,8 +4004,6 @@ ahc_free(struct ahc_softc *ahc) ...@@ -4005,8 +4004,6 @@ ahc_free(struct ahc_softc *ahc)
free(ahc->name, M_DEVBUF); free(ahc->name, M_DEVBUF);
if (ahc->seep_config != NULL) if (ahc->seep_config != NULL)
free(ahc->seep_config, M_DEVBUF); free(ahc->seep_config, M_DEVBUF);
if (ahc->saved_stack != NULL)
free(ahc->saved_stack, M_DEVBUF);
#ifndef __FreeBSD__ #ifndef __FreeBSD__
free(ahc, M_DEVBUF); free(ahc, M_DEVBUF);
#endif #endif
...@@ -4542,12 +4539,6 @@ ahc_init(struct ahc_softc *ahc) ...@@ -4542,12 +4539,6 @@ ahc_init(struct ahc_softc *ahc)
size_t driver_data_size; size_t driver_data_size;
uint32_t physaddr; uint32_t physaddr;
ahc->stack_size = ahc_probe_stack_size(ahc);
ahc->saved_stack = malloc(ahc->stack_size * sizeof(uint16_t),
M_DEVBUF, M_NOWAIT);
if (ahc->saved_stack == NULL)
return (ENOMEM);
#ifdef AHC_DEBUG_SEQUENCER #ifdef AHC_DEBUG_SEQUENCER
ahc->flags |= AHC_SEQUENCER_DEBUG; ahc->flags |= AHC_SEQUENCER_DEBUG;
#endif #endif
...@@ -4602,7 +4593,8 @@ ahc_init(struct ahc_softc *ahc) ...@@ -4602,7 +4593,8 @@ ahc_init(struct ahc_softc *ahc)
/*lowaddr*/BUS_SPACE_MAXADDR, /*lowaddr*/BUS_SPACE_MAXADDR,
/*highaddr*/BUS_SPACE_MAXADDR, /*highaddr*/BUS_SPACE_MAXADDR,
/*filter*/NULL, /*filterarg*/NULL, /*filter*/NULL, /*filterarg*/NULL,
/*maxsize*/MAXBSIZE, /*nsegments*/AHC_NSEG, /*maxsize*/(AHC_NSEG - 1) * PAGE_SIZE,
/*nsegments*/AHC_NSEG,
/*maxsegsz*/AHC_MAXTRANSFER_SIZE, /*maxsegsz*/AHC_MAXTRANSFER_SIZE,
/*flags*/BUS_DMA_ALLOCNOW, /*flags*/BUS_DMA_ALLOCNOW,
&ahc->buffer_dmat) != 0) { &ahc->buffer_dmat) != 0) {
...@@ -6275,7 +6267,8 @@ ahc_calc_residual(struct ahc_softc *ahc, struct scb *scb) ...@@ -6275,7 +6267,8 @@ ahc_calc_residual(struct ahc_softc *ahc, struct scb *scb)
#ifdef AHC_DEBUG #ifdef AHC_DEBUG
if ((ahc_debug & AHC_SHOW_MISC) != 0) { if ((ahc_debug & AHC_SHOW_MISC) != 0) {
ahc_print_path(ahc, scb); ahc_print_path(ahc, scb);
printf("Handled Residual of %d bytes\n", resid); printf("Handled %sResidual of %d bytes\n",
(scb->flags & SCB_SENSE) ? "Sense " : "", resid);
} }
#endif #endif
} }
...@@ -6655,41 +6648,6 @@ ahc_download_instr(struct ahc_softc *ahc, u_int instrptr, uint8_t *dconsts) ...@@ -6655,41 +6648,6 @@ ahc_download_instr(struct ahc_softc *ahc, u_int instrptr, uint8_t *dconsts)
} }
} }
static int
ahc_probe_stack_size(struct ahc_softc *ahc)
{
int last_probe;
last_probe = 0;
while (1) {
int i;
/*
* We avoid using 0 as a pattern to avoid
* confusion if the stack implementation
* "back-fills" with zeros when "poping'
* entries.
*/
for (i = 1; i <= last_probe+1; i++) {
ahc_outb(ahc, STACK, i & 0xFF);
ahc_outb(ahc, STACK, (i >> 8) & 0xFF);
}
/* Verify */
for (i = last_probe+1; i > 0; i--) {
u_int stack_entry;
stack_entry = ahc_inb(ahc, STACK)
|(ahc_inb(ahc, STACK) << 8);
if (stack_entry != i)
goto sized;
}
last_probe++;
}
sized:
return (last_probe);
}
int int
ahc_print_register(ahc_reg_parse_entry_t *table, u_int num_entries, ahc_print_register(ahc_reg_parse_entry_t *table, u_int num_entries,
const char *name, u_int address, u_int value, const char *name, u_int address, u_int value,
...@@ -6768,6 +6726,7 @@ ahc_dump_card_state(struct ahc_softc *ahc) ...@@ -6768,6 +6726,7 @@ ahc_dump_card_state(struct ahc_softc *ahc)
cur_col = 0; cur_col = 0;
if ((ahc->features & AHC_DT) != 0) if ((ahc->features & AHC_DT) != 0)
ahc_scsisigi_print(ahc_inb(ahc, SCSISIGI), &cur_col, 50); ahc_scsisigi_print(ahc_inb(ahc, SCSISIGI), &cur_col, 50);
ahc_error_print(ahc_inb(ahc, ERROR), &cur_col, 50);
ahc_scsiphase_print(ahc_inb(ahc, SCSIPHASE), &cur_col, 50); ahc_scsiphase_print(ahc_inb(ahc, SCSIPHASE), &cur_col, 50);
ahc_scsibusl_print(ahc_inb(ahc, SCSIBUSL), &cur_col, 50); ahc_scsibusl_print(ahc_inb(ahc, SCSIBUSL), &cur_col, 50);
ahc_lastphase_print(ahc_inb(ahc, LASTPHASE), &cur_col, 50); ahc_lastphase_print(ahc_inb(ahc, LASTPHASE), &cur_col, 50);
...@@ -6787,11 +6746,8 @@ ahc_dump_card_state(struct ahc_softc *ahc) ...@@ -6787,11 +6746,8 @@ ahc_dump_card_state(struct ahc_softc *ahc)
if (cur_col != 0) if (cur_col != 0)
printf("\n"); printf("\n");
printf("STACK:"); printf("STACK:");
for (i = 0; i < ahc->stack_size; i++) { for (i = 0; i < STACK_SIZE; i++)
ahc->saved_stack[i] = printf(" 0x%x", ahc_inb(ahc, STACK)|(ahc_inb(ahc, STACK) << 8));
ahc_inb(ahc, STACK)|(ahc_inb(ahc, STACK) << 8);
printf(" 0x%x", ahc->saved_stack[i]);
}
printf("\nSCB count = %d\n", ahc->scb_data->numscbs); printf("\nSCB count = %d\n", ahc->scb_data->numscbs);
printf("Kernel NEXTQSCB = %d\n", ahc->next_queued_scb->hscb->tag); printf("Kernel NEXTQSCB = %d\n", ahc->next_queued_scb->hscb->tag);
printf("Card NEXTQSCB = %d\n", ahc_inb(ahc, NEXT_QUEUED_SCB)); printf("Card NEXTQSCB = %d\n", ahc_inb(ahc, NEXT_QUEUED_SCB));
......
/* /*
* Adaptec AIC7xxx device driver for Linux. * Adaptec AIC7xxx device driver for Linux.
* *
* $Id: //depot/aic7xxx/linux/drivers/scsi/aic7xxx/aic7xxx_osm.c#166 $ * $Id: //depot/aic7xxx/linux/drivers/scsi/aic7xxx/aic7xxx_osm.c#169 $
* *
* Copyright (c) 1994 John Aycock * Copyright (c) 1994 John Aycock
* The University of Calgary Department of Computer Science. * The University of Calgary Department of Computer Science.
...@@ -576,6 +576,7 @@ static void ahc_linux_run_device_queue(struct ahc_softc*, ...@@ -576,6 +576,7 @@ static void ahc_linux_run_device_queue(struct ahc_softc*,
static void ahc_linux_setup_tag_info(char *p, char *end, char *s); static void ahc_linux_setup_tag_info(char *p, char *end, char *s);
static void ahc_linux_setup_tag_info_global(char *p); static void ahc_linux_setup_tag_info_global(char *p);
static void ahc_linux_setup_dv(char *p, char *end, char *s); static void ahc_linux_setup_dv(char *p, char *end, char *s);
static int aic7xxx_setup(char *s);
static int ahc_linux_next_unit(void); static int ahc_linux_next_unit(void);
static void ahc_runq_tasklet(unsigned long data); static void ahc_runq_tasklet(unsigned long data);
static int ahc_linux_halt(struct notifier_block *nb, u_long event, void *buf); static int ahc_linux_halt(struct notifier_block *nb, u_long event, void *buf);
...@@ -1297,6 +1298,7 @@ Scsi_Host_Template aic7xxx_driver_template = { ...@@ -1297,6 +1298,7 @@ Scsi_Host_Template aic7xxx_driver_template = {
*/ */
.max_sectors = 8192, .max_sectors = 8192,
#endif #endif
#if defined CONFIG_HIGHIO || LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,18) #if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,18)
/* Assume RedHat Distribution with its different HIGHIO conventions. */ /* Assume RedHat Distribution with its different HIGHIO conventions. */
.can_dma_32 = 1, .can_dma_32 = 1,
...@@ -1304,6 +1306,7 @@ Scsi_Host_Template aic7xxx_driver_template = { ...@@ -1304,6 +1306,7 @@ Scsi_Host_Template aic7xxx_driver_template = {
#else #else
.highmem_io = 1, .highmem_io = 1,
#endif #endif
#endif
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0) #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
.name = "aic7xxx", .name = "aic7xxx",
.slave_alloc = ahc_linux_slave_alloc, .slave_alloc = ahc_linux_slave_alloc,
...@@ -1764,7 +1767,7 @@ ahc_linux_setup_dv(char *p, char *end, char *s) ...@@ -1764,7 +1767,7 @@ ahc_linux_setup_dv(char *p, char *end, char *s)
* to a parameter with a ':' between the parameter and the value. * to a parameter with a ':' between the parameter and the value.
* ie. aic7xxx=stpwlev:1,extended * ie. aic7xxx=stpwlev:1,extended
*/ */
int static int
aic7xxx_setup(char *s) aic7xxx_setup(char *s)
{ {
int i, n; int i, n;
...@@ -1888,7 +1891,7 @@ ahc_linux_register_host(struct ahc_softc *ahc, Scsi_Host_Template *template) ...@@ -1888,7 +1891,7 @@ ahc_linux_register_host(struct ahc_softc *ahc, Scsi_Host_Template *template)
* negotiation will occur for the first command, and DV * negotiation will occur for the first command, and DV
* will comence should that first command be successful. * will comence should that first command be successful.
*/ */
for (target = 0; target < AHC_NUM_TARGETS; target++) { for (target = 0; target < host->max_id*host->max_channel+1; target++) {
u_int channel; u_int channel;
channel = 0; channel = 0;
...@@ -2732,6 +2735,22 @@ ahc_linux_dv_transition(struct ahc_softc *ahc, struct scsi_cmnd *cmd, ...@@ -2732,6 +2735,22 @@ ahc_linux_dv_transition(struct ahc_softc *ahc, struct scsi_cmnd *cmd,
AHC_SET_DV_STATE(ahc, targ, AHC_DV_STATE_EXIT); AHC_SET_DV_STATE(ahc, targ, AHC_DV_STATE_EXIT);
break; break;
} }
#ifdef AHC_DEBUG
if (ahc_debug & AHC_SHOW_DV) {
int i;
ahc_print_devinfo(ahc, devinfo);
printf("Inquiry buffer mismatch:");
for (i = 0; i < AHC_LINUX_DV_INQ_LEN; i++) {
if ((i & 0xF) == 0)
printf("\n ");
printf("0x%x:0x0%x ",
((uint8_t *)targ->inq_data)[i],
targ->dv_buffer[i]);
}
printf("\n");
}
#endif
if (ahc_linux_fallback(ahc, devinfo) != 0) { if (ahc_linux_fallback(ahc, devinfo) != 0) {
AHC_SET_DV_STATE(ahc, targ, AHC_DV_STATE_EXIT); AHC_SET_DV_STATE(ahc, targ, AHC_DV_STATE_EXIT);
...@@ -3365,6 +3384,8 @@ ahc_linux_fallback(struct ahc_softc *ahc, struct ahc_devinfo *devinfo) ...@@ -3365,6 +3384,8 @@ ahc_linux_fallback(struct ahc_softc *ahc, struct ahc_devinfo *devinfo)
targ->dv_next_narrow_period = MAX(period, AHC_SYNCRATE_ULTRA2); targ->dv_next_narrow_period = MAX(period, AHC_SYNCRATE_ULTRA2);
if (targ->dv_next_wide_period == 0) if (targ->dv_next_wide_period == 0)
targ->dv_next_wide_period = period; targ->dv_next_wide_period = period;
if (targ->dv_max_width == 0)
targ->dv_max_width = width;
if (targ->dv_max_ppr_options == 0) if (targ->dv_max_ppr_options == 0)
targ->dv_max_ppr_options = ppr_options; targ->dv_max_ppr_options = ppr_options;
if (targ->dv_last_ppr_options == 0) if (targ->dv_last_ppr_options == 0)
...@@ -3459,7 +3480,7 @@ ahc_linux_fallback(struct ahc_softc *ahc, struct ahc_devinfo *devinfo) ...@@ -3459,7 +3480,7 @@ ahc_linux_fallback(struct ahc_softc *ahc, struct ahc_devinfo *devinfo)
period++; period++;
} }
} else if ((ahc->features & AHC_WIDE) != 0 } else if ((ahc->features & AHC_WIDE) != 0
&& tinfo->user.width != 0 && targ->dv_max_width != 0
&& wide_speed >= fallback_speed && wide_speed >= fallback_speed
&& (targ->dv_next_wide_period <= AHC_ASYNC_XFER_PERIOD && (targ->dv_next_wide_period <= AHC_ASYNC_XFER_PERIOD
|| period >= AHC_ASYNC_XFER_PERIOD)) { || period >= AHC_ASYNC_XFER_PERIOD)) {
......
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,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/linux/drivers/scsi/aic7xxx/aic7xxx_osm.h#114 $ * $Id: //depot/aic7xxx/linux/drivers/scsi/aic7xxx/aic7xxx_osm.h#118 $
* *
*/ */
#ifndef _AIC7XXX_LINUX_H_ #ifndef _AIC7XXX_LINUX_H_
...@@ -72,7 +72,6 @@ ...@@ -72,7 +72,6 @@
#endif #endif
#include <linux/module.h> #include <linux/module.h>
#include <asm/byteorder.h> #include <asm/byteorder.h>
#include <asm/io.h>
#ifndef KERNEL_VERSION #ifndef KERNEL_VERSION
#define KERNEL_VERSION(x,y,z) (((x)<<16)+((y)<<8)+(z)) #define KERNEL_VERSION(x,y,z) (((x)<<16)+((y)<<8)+(z))
...@@ -302,7 +301,7 @@ ahc_scb_timer_reset(struct scb *scb, u_int usec) ...@@ -302,7 +301,7 @@ ahc_scb_timer_reset(struct scb *scb, u_int usec)
#include <linux/smp.h> #include <linux/smp.h>
#endif #endif
#define AIC7XXX_DRIVER_VERSION "6.2.25" #define AIC7XXX_DRIVER_VERSION "6.2.26"
/**************************** Front End Queues ********************************/ /**************************** Front End Queues ********************************/
/* /*
...@@ -472,10 +471,11 @@ struct ahc_linux_target { ...@@ -472,10 +471,11 @@ struct ahc_linux_target {
/* /*
* The next "fallback" period to use for narrow/wide transfers. * The next "fallback" period to use for narrow/wide transfers.
*/ */
u_int dv_next_narrow_period; uint8_t dv_next_narrow_period;
u_int dv_next_wide_period; uint8_t dv_next_wide_period;
u_int dv_max_ppr_options; uint8_t dv_max_width;
u_int dv_last_ppr_options; uint8_t dv_max_ppr_options;
uint8_t dv_last_ppr_options;
u_int dv_echo_size; u_int dv_echo_size;
ahc_dv_state dv_state; ahc_dv_state dv_state;
u_int dv_state_retry; u_int dv_state_retry;
...@@ -864,6 +864,7 @@ ahc_list_unlock(unsigned long *flags) ...@@ -864,6 +864,7 @@ ahc_list_unlock(unsigned long *flags)
#define PCIM_CMD_BUSMASTEREN 0x0004 #define PCIM_CMD_BUSMASTEREN 0x0004
#define PCIM_CMD_MWRICEN 0x0010 #define PCIM_CMD_MWRICEN 0x0010
#define PCIM_CMD_PERRESPEN 0x0040 #define PCIM_CMD_PERRESPEN 0x0040
#define PCIM_CMD_SERRESPEN 0x0100
#define PCIR_STATUS 0x06 #define PCIR_STATUS 0x06
#define PCIR_REVID 0x08 #define PCIR_REVID 0x08
#define PCIR_PROGIF 0x09 #define PCIR_PROGIF 0x09
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,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/linux/drivers/scsi/aic7xxx/aic7xxx_osm_pci.c#42 $ * $Id: //depot/aic7xxx/linux/drivers/scsi/aic7xxx/aic7xxx_osm_pci.c#43 $
*/ */
#include "aic7xxx_osm.h" #include "aic7xxx_osm.h"
...@@ -167,8 +167,8 @@ ahc_linux_pci_dev_probe(struct pci_dev *pdev, const struct pci_device_id *ent) ...@@ -167,8 +167,8 @@ ahc_linux_pci_dev_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
ahc->platform_data->hw_dma_mask = ahc->platform_data->hw_dma_mask =
(bus_addr_t)(0x7FFFFFFFFFULL & (bus_addr_t)~0); (bus_addr_t)(0x7FFFFFFFFFULL & (bus_addr_t)~0);
} else { } else {
ahc_pci_set_dma_mask(pdev, 0xffffffffULL); ahc_pci_set_dma_mask(pdev, 0xFFFFFFFF);
ahc->platform_data->hw_dma_mask = 0xffffffffULL; ahc->platform_data->hw_dma_mask = 0xFFFFFFFF;
} }
#endif #endif
ahc->dev_softc = pci; ahc->dev_softc = pci;
......
...@@ -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#54 $ * $Id: //depot/aic7xxx/aic7xxx/aic7xxx_pci.c#55 $
* *
* $FreeBSD$ * $FreeBSD$
*/ */
...@@ -1202,15 +1202,20 @@ ahc_probe_ext_scbram(struct ahc_softc *ahc) ...@@ -1202,15 +1202,20 @@ ahc_probe_ext_scbram(struct ahc_softc *ahc)
int int
ahc_pci_test_register_access(struct ahc_softc *ahc) ahc_pci_test_register_access(struct ahc_softc *ahc)
{ {
int error; int error;
u_int status1; u_int status1;
uint8_t seqctl; uint32_t cmd;
uint8_t hcntrl;
error = EIO; error = EIO;
/* Enable PCI error interrupt status */ /*
seqctl = ahc_inb(ahc, SEQCTL); * Enable PCI error interrupt status, but suppress NMIs
ahc_outb(ahc, SEQCTL, seqctl & ~FAILDIS); * generated by SERR raised due to target aborts.
*/
cmd = ahc_pci_read_config(ahc->dev_softc, PCIR_COMMAND, /*bytes*/2);
ahc_pci_write_config(ahc->dev_softc, PCIR_COMMAND,
cmd & ~PCIM_CMD_SERRESPEN, /*bytes*/2);
/* /*
* First a simple test to see if any * First a simple test to see if any
...@@ -1220,7 +1225,8 @@ ahc_pci_test_register_access(struct ahc_softc *ahc) ...@@ -1220,7 +1225,8 @@ ahc_pci_test_register_access(struct ahc_softc *ahc)
* be zero so it is a good register to * be zero so it is a good register to
* use for this test. * use for this test.
*/ */
if (ahc_inb(ahc, HCNTRL) == 0xFF) hcntrl = ahc_inb(ahc, HCNTRL);
if (hcntrl == 0xFF)
goto fail; goto fail;
/* /*
...@@ -1230,8 +1236,13 @@ ahc_pci_test_register_access(struct ahc_softc *ahc) ...@@ -1230,8 +1236,13 @@ ahc_pci_test_register_access(struct ahc_softc *ahc)
* either, so look for data corruption and/or flagged * either, so look for data corruption and/or flagged
* PCI errors. * PCI errors.
*/ */
ahc_outl(ahc, SRAM_BASE, 0x5aa555aa); ahc_outb(ahc, HCNTRL, hcntrl|PAUSE);
if (ahc_inl(ahc, SRAM_BASE) != 0x5aa555aa) while (ahc_is_paused(ahc) == 0)
;
ahc_outb(ahc, SEQCTL, PERRORDIS);
ahc_outb(ahc, SCBPTR, 0);
ahc_outl(ahc, SCB_BASE, 0x5aa555aa);
if (ahc_inl(ahc, SCB_BASE) != 0x5aa555aa)
goto fail; goto fail;
status1 = ahc_pci_read_config(ahc->dev_softc, status1 = ahc_pci_read_config(ahc->dev_softc,
...@@ -1248,7 +1259,8 @@ ahc_pci_test_register_access(struct ahc_softc *ahc) ...@@ -1248,7 +1259,8 @@ ahc_pci_test_register_access(struct ahc_softc *ahc)
ahc_pci_write_config(ahc->dev_softc, PCIR_STATUS + 1, ahc_pci_write_config(ahc->dev_softc, PCIR_STATUS + 1,
status1, /*bytes*/1); status1, /*bytes*/1);
ahc_outb(ahc, CLRINT, CLRPARERR); ahc_outb(ahc, CLRINT, CLRPARERR);
ahc_outb(ahc, SEQCTL, seqctl); ahc_outb(ahc, SEQCTL, PERRORDIS|FAILDIS);
ahc_pci_write_config(ahc->dev_softc, PCIR_COMMAND, cmd, /*bytes*/2);
return (error); return (error);
} }
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
* DO NOT EDIT - This file is automatically generated * DO NOT EDIT - This file is automatically generated
* from the following source files: * from the following source files:
* *
* $Id: //depot/aic7xxx/aic7xxx/aic7xxx.seq#52 $ * $Id: //depot/aic7xxx/aic7xxx/aic7xxx.seq#53 $
* $Id: //depot/aic7xxx/aic7xxx/aic7xxx.reg#36 $ * $Id: //depot/aic7xxx/aic7xxx/aic7xxx.reg#37 $
*/ */
typedef int (ahc_reg_print_t)(u_int, u_int *, u_int); typedef int (ahc_reg_print_t)(u_int, u_int *, u_int);
typedef struct ahc_reg_parse_entry { typedef struct ahc_reg_parse_entry {
...@@ -1779,6 +1779,7 @@ ahc_reg_print_t ahc_sg_cache_pre_print; ...@@ -1779,6 +1779,7 @@ ahc_reg_print_t ahc_sg_cache_pre_print;
#define MAX_OFFSET 0xff #define MAX_OFFSET 0xff
#define BUS_16_BIT 0x01 #define BUS_16_BIT 0x01
#define SCB_UPLOAD_SIZE 0x20 #define SCB_UPLOAD_SIZE 0x20
#define STACK_SIZE 0x04
/* Downloaded Constant Definitions */ /* Downloaded Constant Definitions */
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
* DO NOT EDIT - This file is automatically generated * DO NOT EDIT - This file is automatically generated
* from the following source files: * from the following source files:
* *
* $Id: //depot/aic7xxx/aic7xxx/aic7xxx.seq#52 $ * $Id: //depot/aic7xxx/aic7xxx/aic7xxx.seq#53 $
* $Id: //depot/aic7xxx/aic7xxx/aic7xxx.reg#36 $ * $Id: //depot/aic7xxx/aic7xxx/aic7xxx.reg#37 $
*/ */
#include "aic7xxx_osm.h" #include "aic7xxx_osm.h"
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
* DO NOT EDIT - This file is automatically generated * DO NOT EDIT - This file is automatically generated
* from the following source files: * from the following source files:
* *
* $Id: //depot/aic7xxx/aic7xxx/aic7xxx.seq#52 $ * $Id: //depot/aic7xxx/aic7xxx/aic7xxx.seq#53 $
* $Id: //depot/aic7xxx/aic7xxx/aic7xxx.reg#36 $ * $Id: //depot/aic7xxx/aic7xxx/aic7xxx.reg#37 $
*/ */
static uint8_t seqprog[] = { static uint8_t seqprog[] = {
0xb2, 0x00, 0x00, 0x08, 0xb2, 0x00, 0x00, 0x08,
......
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,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/aicasm/aicasm_gram.y#28 $ * $Id: //depot/aic7xxx/aic7xxx/aicasm/aicasm_gram.y#29 $
* *
* $FreeBSD$ * $FreeBSD$
*/ */
...@@ -209,7 +209,7 @@ static int is_download_const(expression_t *immed); ...@@ -209,7 +209,7 @@ static int is_download_const(expression_t *immed);
%type <value> export ret f1_opcode f2_opcode jmp_jc_jnc_call jz_jnz je_jne %type <value> export ret f1_opcode f2_opcode jmp_jc_jnc_call jz_jnz je_jne
%type <value> numerical_value mode_value mode_list macro_arglist %type <value> mode_value mode_list macro_arglist
%left '|' %left '|'
%left '&' %left '&'
...@@ -784,17 +784,6 @@ macro_arglist: ...@@ -784,17 +784,6 @@ macro_arglist:
} }
; ;
numerical_value:
T_NUMBER
{
$$ = $1;
}
| '-' T_NUMBER
{
$$ = -$2;
}
;
scratch_ram: scratch_ram:
T_SRAM '{' T_SRAM '{'
{ {
......
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