diff options
author | scottl <scottl@FreeBSD.org> | 2004-03-19 17:36:47 +0000 |
---|---|---|
committer | scottl <scottl@FreeBSD.org> | 2004-03-19 17:36:47 +0000 |
commit | f08849a36be287ee0d3a88cfaf3dd6c0831282dc (patch) | |
tree | ee12015c81bef13e6b84ea68e7e00e0fa46829ac /sys | |
parent | 8f8e02cc5ef4173158a712baba9c00bf6f9d5946 (diff) | |
download | FreeBSD-src-f08849a36be287ee0d3a88cfaf3dd6c0831282dc.zip FreeBSD-src-f08849a36be287ee0d3a88cfaf3dd6c0831282dc.tar.gz |
Add generic support for the recent Adaptec flavors of ServeRAID.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/ips/ips.h | 2 | ||||
-rw-r--r-- | sys/dev/ips/ips_pci.c | 16 |
2 files changed, 14 insertions, 4 deletions
diff --git a/sys/dev/ips/ips.h b/sys/dev/ips/ips.h index cd3b015..39eb9ed 100644 --- a/sys/dev/ips/ips.h +++ b/sys/dev/ips/ips.h @@ -54,8 +54,10 @@ * IPS CONSTANTS */ #define IPS_VENDOR_ID 0x1014 +#define IPS_VENDOR_ID_ADAPTEC 0x9005 #define IPS_MORPHEUS_DEVICE_ID 0x01BD #define IPS_COPPERHEAD_DEVICE_ID 0x002E +#define IPS_MARCO_DEVICE_ID 0x0950 #define IPS_CSL 0xff #define IPS_POCL 0x30 diff --git a/sys/dev/ips/ips_pci.c b/sys/dev/ips/ips_pci.c index 80681c7..5431c96 100644 --- a/sys/dev/ips/ips_pci.c +++ b/sys/dev/ips/ips_pci.c @@ -45,7 +45,11 @@ static int ips_pci_probe(device_t dev) (pci_get_device(dev) == IPS_COPPERHEAD_DEVICE_ID)) { device_set_desc(dev, "IBM ServeRAID Adapter"); return (0); - } + } else if ((pci_get_vendor(dev) == IPS_VENDOR_ID_ADAPTEC) && + (pci_get_device(dev) == IPS_MARCO_DEVICE_ID)) { + device_set_desc(dev, "Adaptec ServeRAID Adapter"); + return (0); + } return(ENXIO); } @@ -77,6 +81,10 @@ static int ips_pci_attach(device_t dev) sc->ips_adapter_reinit = ips_copperhead_reinit; sc->ips_adapter_intr = ips_copperhead_intr; sc->ips_issue_cmd = ips_issue_copperhead_cmd; + } else if (pci_get_device(dev) == IPS_MARCO_DEVICE_ID){ + sc->ips_adapter_reinit = ips_morpheus_reinit; + sc->ips_adapter_intr = ips_morpheus_intr; + sc->ips_issue_cmd = ips_issue_morpheus_cmd; } else goto error; /* make sure busmastering is on */ @@ -87,10 +95,10 @@ static int ips_pci_attach(device_t dev) sc->iores = NULL; if(command & PCIM_CMD_MEMEN){ PRINTF(10, "trying MEMIO\n"); - if(pci_get_device(dev) == IPS_MORPHEUS_DEVICE_ID) - sc->rid = PCIR_BAR(0); + if(pci_get_device(dev) == IPS_COPPERHEAD_DEVICE_ID) + sc->rid = PCIR_BAR(1); else - sc->rid = PCIR_BAR(1); + sc->rid = PCIR_BAR(0); sc->iotype = SYS_RES_MEMORY; sc->iores = bus_alloc_resource_any(dev, sc->iotype, &sc->rid, RF_ACTIVE); |