diff options
author | gibbs <gibbs@FreeBSD.org> | 1996-03-31 03:17:50 +0000 |
---|---|---|
committer | gibbs <gibbs@FreeBSD.org> | 1996-03-31 03:17:50 +0000 |
commit | b6df07d91897b08f7fc7eb5788a06e03a3ffd5ee (patch) | |
tree | 55b3332213ab06e2923e5c7bc7f929c7975bdb4f /sys | |
parent | 8097526e6f6c202e86756689baf8011b710b2486 (diff) | |
download | FreeBSD-src-b6df07d91897b08f7fc7eb5788a06e03a3ffd5ee.zip FreeBSD-src-b6df07d91897b08f7fc7eb5788a06e03a3ffd5ee.tar.gz |
ncr.c:
Use new XS_SELTIMEOUT error code for selection timeouts.
aic7870.c:
Move SCB walking code to aic7xxx.c and make it work for all card types.
The flag AHC_EXTSCB is no longer needed since the SCBs are walked in
all cases now.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/pci/aic7870.c | 31 | ||||
-rw-r--r-- | sys/pci/ncr.c | 13 |
2 files changed, 11 insertions, 33 deletions
diff --git a/sys/pci/aic7870.c b/sys/pci/aic7870.c index 0025158..c907d19 100644 --- a/sys/pci/aic7870.c +++ b/sys/pci/aic7870.c @@ -19,7 +19,7 @@ * 4. Modifications may be freely made to this file if the above conditions * are met. * - * $Id: aic7870.c,v 1.26 1996/03/10 07:12:48 gibbs Exp $ + * $Id: aic7870.c,v 1.27 1996/03/11 02:49:48 gibbs Exp $ */ #include <pci.h> @@ -28,6 +28,7 @@ #include <sys/systm.h> #include <sys/malloc.h> #include <sys/kernel.h> +#include <sys/queue.h> #include <scsi/scsi_all.h> #include <scsi/scsiconf.h> @@ -228,8 +229,6 @@ aic7870_attach(config_id, unit) if(!(aic3940_count & 0x01)) /* Even count implies second channel */ ahc_f |= AHC_CHNLB; - /* Even though it doesn't turn on RAMPS, it has them */ - ahc_f |= AHC_EXTSCB; break; case PCI_DEVICE_ID_ADAPTEC_2944U: case PCI_DEVICE_ID_ADAPTEC_2940U: @@ -278,8 +277,6 @@ aic7870_attach(config_id, unit) */ devconfig &= ~(RAMPSM|SCBRAMSEL); pci_conf_write(config_id, DEVCONFIG, devconfig); - - ahc_f |= AHC_EXTSCB; } } @@ -336,7 +333,6 @@ aic7870_attach(config_id, unit) { id_string = "aic7880 "; load_seeprom(ahc); - ahc->maxscbs = 16; break; } case AHC_394: @@ -345,13 +341,11 @@ aic7870_attach(config_id, unit) { id_string = "aic7870 "; load_seeprom(ahc); - ahc->maxscbs = 16; break; } case AHC_AIC7850: { id_string = "aic7850 "; - ahc->maxscbs = 3; /* Assume there is no BIOS for these cards? */ ahc->flags |= AHC_USEDEFAULTS; break; @@ -389,27 +383,6 @@ aic7870_attach(config_id, unit) /* In case we are a wide card */ outb(SCSICONF + 1 + iobase, 7); } - - if(ahc->flags & AHC_EXTSCB) { - /* - * This adapter has external SCB memory. - * Walk the SCBs to determine how many there are. - */ - int i; - - for(i = 0; i < AHC_SCB_MAX; i++) { - outb(SCBPTR + iobase, i); - outb(SCBARRAY + iobase, 0xaa); - if(inb(SCBARRAY + iobase) == 0xaa){ - outb(SCBARRAY + iobase, 0x55); - if(inb(SCBARRAY + iobase) == 0x55) { - continue; - } - } - break; - } - ahc->maxscbs = i; - } } if(ahc_init(ahc)){ diff --git a/sys/pci/ncr.c b/sys/pci/ncr.c index 9147bd4..70d9a26 100644 --- a/sys/pci/ncr.c +++ b/sys/pci/ncr.c @@ -1,6 +1,6 @@ /************************************************************************** ** -** $Id: ncr.c,v 1.67 1996/03/11 19:36:07 se Exp $ +** $Id: ncr.c,v 1.68 1996/03/19 15:03:00 bde Exp $ ** ** Device driver for the NCR 53C810 PCI-SCSI-Controller. ** @@ -1254,7 +1254,7 @@ static void ncr_attach (pcici_t tag, int unit); static char ident[] = - "\n$Id: ncr.c,v 1.67 1996/03/11 19:36:07 se Exp $\n"; + "\n$Id: ncr.c,v 1.68 1996/03/19 15:03:00 bde Exp $\n"; static u_long ncr_version = NCR_VERSION * 11 + (u_long) sizeof (struct ncb) * 7 @@ -4229,8 +4229,13 @@ void ncr_complete (ncb_p np, ccb_p cp) */ xp->error = XS_BUSY; - } else if ((cp->host_status == HS_SEL_TIMEOUT) - || (cp->host_status == HS_TIMEOUT)) { + } else if (cp->host_status == HS_SEL_TIMEOUT) { + + /* + ** Device failed selection + */ + xp->error = XS_SELTIMEOUT; + } else if(cp->host_status == HS_TIMEOUT) { /* ** No response |