summaryrefslogtreecommitdiffstats
path: root/sys/dev/aac/aac_pci.c
diff options
context:
space:
mode:
authoremaste <emaste@FreeBSD.org>2007-12-07 18:05:41 +0000
committeremaste <emaste@FreeBSD.org>2007-12-07 18:05:41 +0000
commit54fed38dbc7812cca7816359b3fdde5159dd733d (patch)
tree58f3083882d83c01b3a5d186d3b8837e62b45eaa /sys/dev/aac/aac_pci.c
parent2cccff443ff96b4a98fa8d9e0e28049d977a1a78 (diff)
downloadFreeBSD-src-54fed38dbc7812cca7816359b3fdde5159dd733d.zip
FreeBSD-src-54fed38dbc7812cca7816359b3fdde5159dd733d.tar.gz
Add family support to allow the driver to attach to new devices that
share the same interface. Submitted by: Achim Leubner at Adaptec
Diffstat (limited to 'sys/dev/aac/aac_pci.c')
-rw-r--r--sys/dev/aac/aac_pci.c28
1 files changed, 23 insertions, 5 deletions
diff --git a/sys/dev/aac/aac_pci.c b/sys/dev/aac/aac_pci.c
index a16917f..9fdad54 100644
--- a/sys/dev/aac/aac_pci.c
+++ b/sys/dev/aac/aac_pci.c
@@ -272,18 +272,36 @@ struct aac_ident
"AOC-USAS-S8iR-LP"},
{0, 0, 0, 0, 0, 0, 0}
};
+struct aac_ident
+aac_family_identifiers[] = {
+ {0x9005, 0x0285, 0, 0, AAC_HWIF_I960RX, 0,
+ "Adaptec RAID Controller"},
+ {0x9005, 0x0286, 0, 0, AAC_HWIF_RKT, 0,
+ "Adaptec RAID Controller"},
+ {0, 0, 0, 0, 0, 0, 0}
+};
static struct aac_ident *
aac_find_ident(device_t dev)
{
struct aac_ident *m;
+ u_int16_t vendid, devid, sub_vendid, sub_devid;
+
+ vendid = pci_get_vendor(dev);
+ devid = pci_get_device(dev);
+ sub_vendid = pci_get_subvendor(dev);
+ sub_devid = pci_get_subdevice(dev);
for (m = aac_identifiers; m->vendor != 0; m++) {
- if ((m->vendor == pci_get_vendor(dev)) &&
- (m->device == pci_get_device(dev)) &&
- (m->subvendor == pci_get_subvendor(dev)) &&
- (m->subdevice == pci_get_subdevice(dev)))
- return (m);
+ if ((m->vendor == vendid) && (m->device == devid) &&
+ (m->subvendor == sub_vendid) &&
+ (m->subdevice == sub_devid))
+ return (m);
+ }
+
+ for (m = aac_family_identifiers; m->vendor != 0; m++) {
+ if ((m->vendor == vendid) && (m->device == devid))
+ return (m);
}
return (NULL);
OpenPOWER on IntegriCloud