summaryrefslogtreecommitdiff
path: root/sys/dev/pci/pci.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/pci/pci.c')
-rw-r--r--sys/dev/pci/pci.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/sys/dev/pci/pci.c b/sys/dev/pci/pci.c
index f7b7450d27c3..f23ab79d44d7 100644
--- a/sys/dev/pci/pci.c
+++ b/sys/dev/pci/pci.c
@@ -824,6 +824,15 @@ pci_add_map(device_t pcib, device_t bus, device_t dev,
*/
if (base == 0)
return 1;
+
+ /* if this is an ATA MASTERDEV on std addresses, resources are bogus */
+ if ((pci_get_class(dev) == PCIC_STORAGE) &&
+ (pci_get_subclass(dev) == PCIS_STORAGE_IDE) &&
+ (pci_get_progif(dev) & PCIP_STORAGE_IDE_MASTERDEV) &&
+ !(pci_get_progif(dev) &
+ (PCIP_STORAGE_IDE_MODEPRIM | PCIP_STORAGE_IDE_MODESEC)))
+ return 1;
+
start = base;
end = base + (1 << ln2size) - 1;
count = 1 << ln2size;