summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgibbs <gibbs@FreeBSD.org>1995-10-26 23:58:59 +0000
committergibbs <gibbs@FreeBSD.org>1995-10-26 23:58:59 +0000
commit959cd912ba5c9f81e83f4a35be23fa1a707a482e (patch)
tree7f0a8e9e63f3841940f5edfd878e356f7ea77966
parentd765a11e8116129e9894feca8248f51fc2ec88c0 (diff)
downloadFreeBSD-src-959cd912ba5c9f81e83f4a35be23fa1a707a482e.zip
FreeBSD-src-959cd912ba5c9f81e83f4a35be23fa1a707a482e.tar.gz
Recognize the aic7880 and 3940 Ultra.
If RAMENB is set in devconfig, walk the external SCBs. Some Intel Xpress motherboards set this bit. For external SCBs for the 3940. It doesn't set RAMPS or RAMENB, but does have the ram.
-rw-r--r--sys/pci/aic7870.c30
1 files changed, 25 insertions, 5 deletions
diff --git a/sys/pci/aic7870.c b/sys/pci/aic7870.c
index 92ae08b..4ad2d2e 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.14 1995/09/05 23:53:48 gibbs Exp $
+ * $Id: aic7870.c,v 1.15 1995/10/08 17:46:11 gibbs Exp $
*/
#include <pci.h>
@@ -35,9 +35,11 @@
#include <i386/scsi/aic7xxx.h>
#define PCI_BASEADR0 PCI_MAP_REG_START
+#define PCI_DEVICE_ID_ADAPTEC_3940U 0x82789004ul
#define PCI_DEVICE_ID_ADAPTEC_2940U 0x81789004ul
#define PCI_DEVICE_ID_ADAPTEC_3940 0x72789004ul
#define PCI_DEVICE_ID_ADAPTEC_2940 0x71789004ul
+#define PCI_DEVICE_ID_ADAPTEC_AIC7880 0x80789004ul
#define PCI_DEVICE_ID_ADAPTEC_AIC7870 0x70789004ul
#define PCI_DEVICE_ID_ADAPTEC_AIC7850 0x50789004ul
@@ -45,7 +47,7 @@
#define MPORTMODE 0x00000400ul /* aic7870 only */
#define RAMPSM 0x00000200ul /* aic7870 only */
#define VOLSENSE 0x00000100ul
-#define DEVCONFIG7 0x00000080ul
+#define RAMENB 0x00000080ul
#define MRDCEN 0x00000040ul
#define EXTSCBTIME 0x00000020ul /* aic7870 only */
#define EXTSCBPEN 0x00000010ul /* aic7870 only */
@@ -74,6 +76,9 @@ static char*
aic7870_probe (pcici_t tag, pcidi_t type)
{
switch(type) {
+ case PCI_DEVICE_ID_ADAPTEC_3940U:
+ return ("Adaptec 3940 Ultra SCSI host adapter");
+ break;
case PCI_DEVICE_ID_ADAPTEC_3940:
return ("Adaptec 3940 SCSI host adapter");
break;
@@ -83,6 +88,9 @@ aic7870_probe (pcici_t tag, pcidi_t type)
case PCI_DEVICE_ID_ADAPTEC_2940:
return ("Adaptec 2940 SCSI host adapter");
break;
+ case PCI_DEVICE_ID_ADAPTEC_AIC7880:
+ return ("Adaptec aic7880 Ultra SCSI host adapter");
+ break;
case PCI_DEVICE_ID_ADAPTEC_AIC7870:
return ("Adaptec aic7870 SCSI host adapter");
break;
@@ -102,6 +110,7 @@ aic7870_attach(config_id, unit)
int unit;
{
u_long io_port;
+ u_long id;
unsigned opri = 0;
ahc_type ahc_t = AHC_NONE;
ahc_flag ahc_f = AHC_FNONE;
@@ -115,18 +124,29 @@ aic7870_attach(config_id, unit)
*/
io_port -= 0xc01ul;
- switch (pci_conf_read(config_id, PCI_ID_REG)) {
+ switch ((id = pci_conf_read(config_id, PCI_ID_REG))) {
+ case PCI_DEVICE_ID_ADAPTEC_3940U:
case PCI_DEVICE_ID_ADAPTEC_3940:
- ahc_t = AHC_394;
+ if (id == PCI_DEVICE_ID_ADAPTEC_3940U)
+ ahc_t = AHC_394U;
+ else
+ ahc_t = AHC_394;
aic3940_count++;
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_2940U:
+ ahc_t = AHC_294U;
+ break;
case PCI_DEVICE_ID_ADAPTEC_2940:
ahc_t = AHC_294;
break;
+ case PCI_DEVICE_ID_ADAPTEC_AIC7880:
+ ahc_t = AHC_AIC7880;
+ break;
case PCI_DEVICE_ID_ADAPTEC_AIC7870:
ahc_t = AHC_AIC7870;
break;
@@ -139,7 +159,7 @@ aic7870_attach(config_id, unit)
if(ahc_t & AHC_AIC7870){
u_long devconfig = pci_conf_read(config_id, DEVCONFIG);
- if(devconfig & RAMPSM) {
+ if(devconfig & (RAMPSM|RAMENB)) {
/*
* External SRAM present. Have the probe walk
* the SCBs to see how much SRAM we have and set
OpenPOWER on IntegriCloud