summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authormsmith <msmith@FreeBSD.org>2000-12-22 22:23:56 +0000
committermsmith <msmith@FreeBSD.org>2000-12-22 22:23:56 +0000
commitf17265b664621b18b1c0c082e86f3e95ddfa49eb (patch)
tree1e65ff2209a275484dfb91bd707fa8106d2c260e /sys
parentcd6399ca0f4a2f014f42eaed72fb574f75b9c040 (diff)
downloadFreeBSD-src-f17265b664621b18b1c0c082e86f3e95ddfa49eb.zip
FreeBSD-src-f17265b664621b18b1c0c082e86f3e95ddfa49eb.tar.gz
Probe generic i960 devices for the old AMI signature as well as the current
one, in order to support adapters with older firmware. Submitted by: "Prasanth S." <prasanths@ami.co.in>
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/amr/amr_pci.c10
-rw-r--r--sys/dev/amr/amrreg.h3
2 files changed, 8 insertions, 5 deletions
diff --git a/sys/dev/amr/amr_pci.c b/sys/dev/amr/amr_pci.c
index 783d430..26b9ff8 100644
--- a/sys/dev/amr/amr_pci.c
+++ b/sys/dev/amr/amr_pci.c
@@ -103,7 +103,7 @@ static struct
static int
amr_pci_probe(device_t dev)
{
- int i;
+ int i, sig;
debug_called(1);
@@ -112,9 +112,11 @@ amr_pci_probe(device_t dev)
(pci_get_device(dev) == amr_device_ids[i].device)) {
/* do we need to test for a signature? */
- if ((amr_device_ids[i].flag & PROBE_SIGNATURE) &&
- (pci_read_config(dev, AMR_CFG_SIG, 2) != AMR_SIGNATURE))
- continue;
+ if (amr_device_ids[i].flag & PROBE_SIGNATURE) {
+ sig = pci_read_config(dev, AMR_CFG_SIG, 2);
+ if ((sig != AMR_SIGNATURE_1) && (sig != AMR_SIGNATURE_2))
+ continue;
+ }
device_set_desc(dev, "AMI MegaRAID");
return(-10); /* allow room to be overridden */
}
diff --git a/sys/dev/amr/amrreg.h b/sys/dev/amr/amrreg.h
index b2cf645..4835bb1 100644
--- a/sys/dev/amr/amrreg.h
+++ b/sys/dev/amr/amrreg.h
@@ -436,7 +436,8 @@ struct amr_passthrough
********************************************************************************/
#define AMR_CFG_SIG 0xa0 /* PCI config register for signature */
-#define AMR_SIGNATURE 0x3344 /* signature for Quartz adapters */
+#define AMR_SIGNATURE_1 0xCCCC /* i960 signature (older adapters) */
+#define AMR_SIGNATURE_2 0x3344 /* i960 signature (newer adapters) */
/*
* Doorbell registers
OpenPOWER on IntegriCloud