diff options
author | msmith <msmith@FreeBSD.org> | 2000-02-16 01:12:09 +0000 |
---|---|---|
committer | msmith <msmith@FreeBSD.org> | 2000-02-16 01:12:09 +0000 |
commit | d3a6179a8a8ee36aa22e58f82a75d141bdc1ef2d (patch) | |
tree | 8cd22445a6305955cec161b59dfadee5ecb1bad2 /sys/dev | |
parent | 0446e158adf541fdd83218941979db2fa8677bbf (diff) | |
download | FreeBSD-src-d3a6179a8a8ee36aa22e58f82a75d141bdc1ef2d.zip FreeBSD-src-d3a6179a8a8ee36aa22e58f82a75d141bdc1ef2d.tar.gz |
Ensure that the busmaster enable bit is set; we can't assume that all
BIOS code will get this right (and some certainly doesn't).
Submitted by: W. Gerald Hicks <jhix@mindspring.com>
Approved by: jkh
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/de/if_de.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/sys/dev/de/if_de.c b/sys/dev/de/if_de.c index 5883f88..dd7786f 100644 --- a/sys/dev/de/if_de.c +++ b/sys/dev/de/if_de.c @@ -5135,7 +5135,7 @@ tulip_pci_attach(pcici_t config_id, int unit) tulip_media_t media = TULIP_MEDIA_UNKNOWN; #endif int retval, idx; - u_int32_t revinfo, cfdainfo, id; + u_int32_t revinfo, cfdainfo, id, cfcsinfo; #if !defined(TULIP_IOMAPPED) vm_offset_t pa_csrs; #endif @@ -5154,6 +5154,13 @@ tulip_pci_attach(pcici_t config_id, int unit) revinfo = pci_conf_read(config_id, PCI_CFRV) & 0xFF; id = pci_conf_read(config_id, PCI_CFID); cfdainfo = pci_conf_read(config_id, PCI_CFDA); + cfcsinfo = pci_conf_read(config_id, PCI_CFCS); + + /* turn busmaster on in case BIOS doesn't set it */ + if(!(cfcsinfo & PCIM_CMD_BUSMASTEREN)) { + cfcsinfo |= PCIM_CMD_BUSMASTEREN; + pci_conf_write(config_id, PCI_CFCS, cfcsinfo); + } if (PCI_VENDORID(id) == DEC_VENDORID) { if (PCI_CHIPID(id) == CHIPID_21040) |