summaryrefslogtreecommitdiffstats
path: root/sys/dev
diff options
context:
space:
mode:
authorsos <sos@FreeBSD.org>2003-03-12 15:45:52 +0000
committersos <sos@FreeBSD.org>2003-03-12 15:45:52 +0000
commit00b21712dfd88a8b0f5bb317c0ed75a6f7199ede (patch)
tree431e749c94be04f0bf0f6a9f9694c7a1b802f116 /sys/dev
parent66ac83046c4eb2ed26dadd1f4ef011921ad65ddc (diff)
downloadFreeBSD-src-00b21712dfd88a8b0f5bb317c0ed75a6f7199ede.zip
FreeBSD-src-00b21712dfd88a8b0f5bb317c0ed75a6f7199ede.tar.gz
Correct the last commit, only look for subfunctions on the same PCI slot.
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/ata/ata-chipset.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/ata/ata-chipset.c b/sys/dev/ata/ata-chipset.c
index ba28d54..271149e 100644
--- a/sys/dev/ata/ata-chipset.c
+++ b/sys/dev/ata/ata-chipset.c
@@ -1811,13 +1811,14 @@ static int
ata_find_dev(device_t dev, u_int32_t devid, u_int32_t revid)
{
device_t *children;
- int nchildren, i;
+ int nchildren, i, slot = pci_get_slot(dev);
if (device_get_children(device_get_parent(dev), &children, &nchildren))
return 0;
for (i = 0; i < nchildren; i++) {
- if (pci_get_devid(children[i]) == devid &&
+ if (pci_get_slot(children[i]) == slot &&
+ pci_get_devid(children[i]) == devid &&
pci_get_revid(children[i]) >= revid) {
free(children, M_TEMP);
return 1;
@@ -1831,8 +1832,7 @@ static struct ata_chip_id *
ata_match_chip(device_t dev, struct ata_chip_id *index)
{
while (index->chiptype != 0) {
- if (pci_get_devid(dev) == index->chiptype &&
- pci_get_revid(dev) >= index->chiprev)
+ if (ata_find_dev(dev, index->chiptype, index->chiprev))
return index;
index++;
}
OpenPOWER on IntegriCloud