diff options
author | sos <sos@FreeBSD.org> | 2001-03-19 13:31:58 +0000 |
---|---|---|
committer | sos <sos@FreeBSD.org> | 2001-03-19 13:31:58 +0000 |
commit | d98c5293d7c959bbef954c5c8e9c97d67138634f (patch) | |
tree | ecac49ad1aa70bacc25e53f66fb7ef3ae6853ae3 | |
parent | f67e4a8fc7fc95c74bd6c09d3453200de47faea5 (diff) | |
download | FreeBSD-src-d98c5293d7c959bbef954c5c8e9c97d67138634f.zip FreeBSD-src-d98c5293d7c959bbef954c5c8e9c97d67138634f.tar.gz |
Try not to engage to ATA channels that are disabled by the BIOS.
-rw-r--r-- | sys/dev/ata/ata-pci.c | 5 |
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)) { |