1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-05 09:14:03 +00:00

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>
This commit is contained in:
Mike Smith 2000-12-22 22:23:56 +00:00
parent 4de932048c
commit 29e79e51ee
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=70285
2 changed files with 8 additions and 5 deletions

View File

@ -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 */
}

View File

@ -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