diff options
author | David Gwynne <dlg@cvs.openbsd.org> | 2015-03-08 04:33:45 +0000 |
---|---|---|
committer | David Gwynne <dlg@cvs.openbsd.org> | 2015-03-08 04:33:45 +0000 |
commit | 18e39ecdc8ebe22693156ec42954f4e2dfb2e241 (patch) | |
tree | c3a51f334d065237c0983fc39d6867071a4fbc4e /sys | |
parent | ad688a866ff42d6b5f36dd75f86fc11b80e333e8 (diff) |
properly set sgl related flags on skinny controllers. this fixes
io against physical disks on my dell perc h310s. logical disks still
work fine.
ok deraadt@ yasuoka@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/ic/mfi.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/dev/ic/mfi.c b/sys/dev/ic/mfi.c index ac84ef41ece..b2c93ec526b 100644 --- a/sys/dev/ic/mfi.c +++ b/sys/dev/ic/mfi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mfi.c,v 1.160 2015/02/08 12:17:31 yasuoka Exp $ */ +/* $OpenBSD: mfi.c,v 1.161 2015/03/08 04:33:44 dlg Exp $ */ /* * Copyright (c) 2006 Marco Peereboom <marco@peereboom.us> * @@ -1259,10 +1259,13 @@ complete: u_int mfi_default_sgd_load(struct mfi_softc *sc, struct mfi_ccb *ccb) { + struct mfi_frame_header *hdr = &ccb->ccb_frame->mfr_header; union mfi_sgl *sgl = ccb->ccb_sgl; bus_dma_segment_t *sgd = ccb->ccb_dmamap->dm_segs; int i; + hdr->mfh_flags |= sc->sc_sgl_flags; + for (i = 0; i < ccb->ccb_dmamap->dm_nsegs; i++) { if (sc->sc_64bit_dma) { sgl->sg64[i].addr = htole64(sgd[i].ds_addr); @@ -1318,7 +1321,6 @@ mfi_create_sgl(struct mfi_softc *sc, struct mfi_ccb *ccb, int flags) ccb->ccb_dmamap->dm_mapsize, BUS_DMASYNC_PREWRITE); } - hdr->mfh_flags |= sc->sc_sgl_flags; hdr->mfh_sg_count = ccb->ccb_dmamap->dm_nsegs; ccb->ccb_extra_frames = (ccb->ccb_frame_size - 1) / MFI_FRAME_SIZE; @@ -2563,7 +2565,7 @@ mfi_skinny_sgd_load(struct mfi_softc *sc, struct mfi_ccb *ccb) sgl->sg_skinny[i].len = htole32(sgd[i].ds_len); sgl->sg_skinny[i].flag = 0; } - hdr->mfh_flags |= MFI_FRAME_IEEE; + hdr->mfh_flags |= MFI_FRAME_IEEE | MFI_FRAME_SGL64; return (ccb->ccb_dmamap->dm_nsegs * sizeof(sgl->sg_skinny)); default: |