1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-17 10:26:15 +00:00

Try not to engage to ATA channels that are disabled by the BIOS.

This commit is contained in:
Søren Schmidt 2001-03-19 13:31:58 +00:00
parent 8360efbd6c
commit f74abb9b6e
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=74463

View File

@ -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)) {