mirror of
https://github.com/opnsense/src.git
synced 2026-06-11 09:41:03 -04:00
get the parameters to pci_write_config the right way round. this may fix
some non-functional cards/machines
This commit is contained in:
parent
9e438eb4f5
commit
15418cf2bb
1 changed files with 2 additions and 2 deletions
|
|
@ -128,10 +128,10 @@ csa_attach(device_t dev)
|
|||
scp->dev = dev;
|
||||
|
||||
/* Wake up the device. */
|
||||
stcmd = pci_read_config(dev, PCIR_COMMAND, 4);
|
||||
stcmd = pci_read_config(dev, PCIR_COMMAND, 2);
|
||||
if ((stcmd & PCIM_CMD_MEMEN) == 0 || (stcmd & PCIM_CMD_BUSMASTEREN) == 0) {
|
||||
stcmd |= (PCIM_CMD_MEMEN | PCIM_CMD_BUSMASTEREN);
|
||||
pci_write_config(dev, PCIR_COMMAND, 4, stcmd);
|
||||
pci_write_config(dev, PCIR_COMMAND, stcmd, 2);
|
||||
}
|
||||
|
||||
/* Allocate the resources. */
|
||||
|
|
|
|||
Loading…
Reference in a new issue