diff options
author | David Gwynne <dlg@cvs.openbsd.org> | 2017-02-08 07:06:44 +0000 |
---|---|---|
committer | David Gwynne <dlg@cvs.openbsd.org> | 2017-02-08 07:06:44 +0000 |
commit | d3ad958da56e345c9284b868f35e912ebfab29f5 (patch) | |
tree | 1b7aa2700857f3ee798c80d144f904f3ca1592c9 /sys | |
parent | 15f503533d2e69feae2ac479e33277951b12840e (diff) |
fix a mixup of lengths of addresses and lengths in the aen_start sgl
basically use htolem64 to set the address and htolem32 for the
length, not the other way round. lucky this is mostly run on x86.
found by Jon Kloske
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/pci/mfii.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/pci/mfii.c b/sys/dev/pci/mfii.c index f7346e82c9d..d17c7d40611 100644 --- a/sys/dev/pci/mfii.c +++ b/sys/dev/pci/mfii.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mfii.c,v 1.40 2017/02/07 05:08:53 dlg Exp $ */ +/* $OpenBSD: mfii.c,v 1.41 2017/02/08 07:06:43 dlg Exp $ */ /* * Copyright (c) 2012 David Gwynne <dlg@openbsd.org> @@ -891,8 +891,8 @@ mfii_aen_start(struct mfii_softc *sc, struct mfii_ccb *ccb, dcmd->mdf_opcode = htole32(MR_DCMD_CTRL_EVENT_WAIT); htolem32(&dcmd->mdf_mbox.w[0], seq); htolem32(&dcmd->mdf_mbox.w[1], mec.mec_word); - htolem32(&sgl->sg64[0].addr, MFII_DMA_DVA(mdm)); - htolem64(&sgl->sg64[0].len, MFII_DMA_LEN(mdm)); + htolem64(&sgl->sg64[0].addr, MFII_DMA_DVA(mdm)); + htolem32(&sgl->sg64[0].len, MFII_DMA_LEN(mdm)); bus_dmamap_sync(sc->sc_dmat, MFII_DMA_MAP(mdm), 0, MFII_DMA_LEN(mdm), BUS_DMASYNC_PREREAD); |