Before attaching device set PCIM_CMD_PORTEN in addition to

PCIM_CMD_MEMEN and PCIM_CMD_BUSMASTEREN, becaise some braindead
BIOSes (such as one found in my vprmatrix notebook) forget
to initialize it properly resulting in attachment failure.
This commit is contained in:
Maxim Sobolev 2003-04-14 09:45:25 +00:00
parent ddc6ffdccf
commit bb342a3713
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=113467

View File

@ -385,11 +385,11 @@ fxp_attach(device_t dev)
s = splimp();
/*
* Enable bus mastering. Enable memory space too, in case
* Enable bus mastering. Enable memory/port space too, in case
* BIOS/Prom forgot about it.
*/
val = pci_read_config(dev, PCIR_COMMAND, 2);
val |= (PCIM_CMD_MEMEN|PCIM_CMD_BUSMASTEREN);
val |= (PCIM_CMD_PORTEN|PCIM_CMD_MEMEN|PCIM_CMD_BUSMASTEREN);
pci_write_config(dev, PCIR_COMMAND, val, 2);
val = pci_read_config(dev, PCIR_COMMAND, 2);