From f08849a36be287ee0d3a88cfaf3dd6c0831282dc Mon Sep 17 00:00:00 2001 From: scottl Date: Fri, 19 Mar 2004 17:36:47 +0000 Subject: Add generic support for the recent Adaptec flavors of ServeRAID. --- sys/dev/ips/ips.h | 2 ++ sys/dev/ips/ips_pci.c | 16 ++++++++++++---- 2 files changed, 14 insertions(+), 4 deletions(-) (limited to 'sys/dev/ips') 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); -- cgit v1.1