diff options
author | mjacob <mjacob@FreeBSD.org> | 2005-05-11 03:00:50 +0000 |
---|---|---|
committer | mjacob <mjacob@FreeBSD.org> | 2005-05-11 03:00:50 +0000 |
commit | 3f1dd047fb33cff02eb05f7dd92b73a4b805a5ea (patch) | |
tree | b4dbb64331f0b7952b94c36d313d9a04907c86a1 /sys/dev/isp/isp_pci.c | |
parent | a30e94db0393ceac1305c36805495bba346fdf60 (diff) | |
download | FreeBSD-src-3f1dd047fb33cff02eb05f7dd92b73a4b805a5ea.zip FreeBSD-src-3f1dd047fb33cff02eb05f7dd92b73a4b805a5ea.tar.gz |
Fix some incorrectly swapped fields in an ICB.
Access a PCI register with correct width.
Obtained from: Dmitry Valeryevich Trikoz
Diffstat (limited to 'sys/dev/isp/isp_pci.c')
-rw-r--r-- | sys/dev/isp/isp_pci.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/isp/isp_pci.c b/sys/dev/isp/isp_pci.c index 1e7213c..3a9c041 100644 --- a/sys/dev/isp/isp_pci.c +++ b/sys/dev/isp/isp_pci.c @@ -426,7 +426,7 @@ isp_pci_attach(device_t dev) irq = regs = NULL; rgd = rtp = iqd = 0; - cmd = pci_read_config(dev, PCIR_COMMAND, 1); + cmd = pci_read_config(dev, PCIR_COMMAND, 2); if (cmd & m1) { rtp = (m1 == PCIM_CMD_MEMEN)? SYS_RES_MEMORY : SYS_RES_IOPORT; rgd = (m1 == PCIM_CMD_MEMEN)? MEM_MAP_REG : IO_MAP_REG; @@ -576,7 +576,7 @@ isp_pci_attach(device_t dev) isp->isp_touched = 1; } - pci_write_config(dev, PCIR_COMMAND, cmd, 1); + pci_write_config(dev, PCIR_COMMAND, cmd, 2); /* * Make sure the Cache Line Size register is set sensibly. |