summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/dev/ata/ata-pci.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/dev/ata/ata-pci.c b/sys/dev/ata/ata-pci.c
index 280c476..4968fd9 100644
--- a/sys/dev/ata/ata-pci.c
+++ b/sys/dev/ata/ata-pci.c
@@ -245,6 +245,11 @@ ata_pci_attach(device_t dev)
subclass = pci_get_subclass(dev);
cmd = pci_read_config(dev, PCIR_COMMAND, 4);
+ if (!(cmd & PCIM_CMD_PORTEN)) {
+ device_printf(dev, "ATA channel disabled by BIOS\n");
+ return 0;
+ }
+
/* is busmastering supported ? */
if ((cmd & (PCIM_CMD_PORTEN | PCIM_CMD_BUSMASTEREN)) ==
(PCIM_CMD_PORTEN | PCIM_CMD_BUSMASTEREN)) {
OpenPOWER on IntegriCloud