Changeset View
Changeset View
Standalone View
Standalone View
head/sys/dev/ahci/ahci_generic.c
Show First 20 Lines • Show All 83 Lines • ▼ Show 20 Lines | ahci_fdt_probe(device_t dev) | ||||
return (BUS_PROBE_DEFAULT); | return (BUS_PROBE_DEFAULT); | ||||
} | } | ||||
#endif | #endif | ||||
#ifdef DEV_ACPI | #ifdef DEV_ACPI | ||||
static int | static int | ||||
ahci_acpi_probe(device_t dev) | ahci_acpi_probe(device_t dev) | ||||
{ | { | ||||
struct ahci_controller *ctlr = device_get_softc(dev); | |||||
ACPI_HANDLE h; | ACPI_HANDLE h; | ||||
if ((h = acpi_get_handle(dev)) == NULL) | if ((h = acpi_get_handle(dev)) == NULL) | ||||
return (ENXIO); | return (ENXIO); | ||||
if (pci_get_class(dev) == PCIC_STORAGE && | if (pci_get_class(dev) == PCIC_STORAGE && | ||||
pci_get_subclass(dev) == PCIS_STORAGE_SATA && | pci_get_subclass(dev) == PCIS_STORAGE_SATA && | ||||
pci_get_progif(dev) == PCIP_STORAGE_SATA_AHCI_1_0) { | pci_get_progif(dev) == PCIP_STORAGE_SATA_AHCI_1_0) { | ||||
device_set_desc_copy(dev, "AHCI SATA controller"); | device_set_desc_copy(dev, "AHCI SATA controller"); | ||||
if (ACPI_FAILURE(acpi_GetInteger(h, "_CCA", | |||||
&ctlr->dma_coherent))) | |||||
ctlr->dma_coherent = 0; | |||||
if (bootverbose) | |||||
device_printf(dev, "Bus is%s cache-coherent\n", | |||||
ctlr->dma_coherent ? "" : " not"); | |||||
return (BUS_PROBE_DEFAULT); | return (BUS_PROBE_DEFAULT); | ||||
} | } | ||||
return (ENXIO); | return (ENXIO); | ||||
} | } | ||||
#endif | #endif | ||||
static int | static int | ||||
▲ Show 20 Lines • Show All 88 Lines • Show Last 20 Lines |