diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2019-05-30 22:03:15 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2019-05-30 22:03:15 +0000 |
commit | d7ad30fd7a10f3793b43a4306451996a3dcf775a (patch) | |
tree | 3c64bea8ece0e621de33956e0499cca8821b234d /sys/arch/amd64/pci | |
parent | 93e9d044c89fb7f071eb5ddfb0fee702f8f945fb (diff) |
Use two 32-bit writes instead of a single 64-bit write to write the
message address into an MSI-X table entry. The RTL8168/RTL8111 hardware
does not respond to 64-bit access (reads return all-ones, writes are
ignored) and the PCI specification documents separate 32-bit "DWORD"
fields for message address and message upper address.
ok mlarkin@, jmatthew@
Diffstat (limited to 'sys/arch/amd64/pci')
-rw-r--r-- | sys/arch/amd64/pci/pci_machdep.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/arch/amd64/pci/pci_machdep.c b/sys/arch/amd64/pci/pci_machdep.c index 4e58376aff5..976ef2d3b6b 100644 --- a/sys/arch/amd64/pci/pci_machdep.c +++ b/sys/arch/amd64/pci/pci_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pci_machdep.c,v 1.69 2018/08/19 08:23:47 kettenis Exp $ */ +/* $OpenBSD: pci_machdep.c,v 1.70 2019/05/30 22:03:14 kettenis Exp $ */ /* $NetBSD: pci_machdep.c,v 1.3 2003/05/07 21:33:58 fvdl Exp $ */ /*- @@ -475,7 +475,8 @@ msix_addroute(struct pic *pic, struct cpu_info *ci, int pin, int vec, int type) _bus_space_map(memt, base + offset, tblsz * 16, 0, &memh)) panic("%s: cannot map registers", __func__); - bus_space_write_8(memt, memh, PCI_MSIX_MA(entry), addr); + bus_space_write_4(memt, memh, PCI_MSIX_MA(entry), addr); + bus_space_write_4(memt, memh, PCI_MSIX_MAU32(entry), 0); bus_space_write_4(memt, memh, PCI_MSIX_MD(entry), vec); bus_space_barrier(memt, memh, PCI_MSIX_MA(entry), 16, BUS_SPACE_BARRIER_WRITE); |