#else
sc->flags &= ~HDAC_F_DMA_NOCACHE;
#endif
+
+#if 0
/*
* Try to enable PCIe snoop to avoid messing around with
* uncacheable DMA attribute. Since PCIe snoop register
}
break;
}
+#endif
+
+ if (pci_is_pcie(dev)) {
+ int pcie_cap = pci_get_pciecap_ptr(dev);
+ uint16_t dev_ctl;
+
+ dev_ctl = pci_read_config(dev,
+ pcie_cap + PCIER_DEVCTRL, 2);
+ if (bootverbose) {
+ device_printf(dev, "device ctrl %#x\n",
+ dev_ctl);
+ }
+
+ if (dev_ctl & PCIEM_DEVCTL_NOSNOOP) {
+ dev_ctl &= ~PCIEM_DEVCTL_NOSNOOP;
+ pci_write_config(dev,
+ pcie_cap + PCIER_DEVCTRL, dev_ctl, 2);
+
+ if (bootverbose)
+ device_printf(dev, "disable nosnoop\n");
+ }
+ sc->flags &= ~HDAC_F_DMA_NOCACHE;
+ }
+
#if 0 /* TODO: No uncacheable DMA support in DragonFly. */
}
#endif