From c3a128d5c3b074b7384694c59ef9ad8fdb43d04a Mon Sep 17 00:00:00 2001 From: jmatthew Date: Tue, 20 Feb 2018 05:40:52 +0000 Subject: [PATCH] Set the chain_offset field (same as sgl_offset0, only in 16 byte units) in passthrough IO requests, which makes AEN processing work on SAS2208 controllers, and since AEN processing works now, enable it again. tested on SAS2208 (PERC H710P) and SAS3108 (PERC H730), SAS3.5 parts should work too. ok dlg@ --- sys/dev/pci/mfii.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/sys/dev/pci/mfii.c b/sys/dev/pci/mfii.c index c9ccd6a9bd3..5c40fe8c13d 100644 --- a/sys/dev/pci/mfii.c +++ b/sys/dev/pci/mfii.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mfii.c,v 1.46 2018/02/02 11:24:37 jsg Exp $ */ +/* $OpenBSD: mfii.c,v 1.47 2018/02/20 05:40:52 jmatthew Exp $ */ /* * Copyright (c) 2012 David Gwynne @@ -630,22 +630,18 @@ mfii_attach(struct device *parent, struct device *self, void *aux) mfii_syspd(sc); -#ifdef notyet if (mfii_aen_register(sc) != 0) { /* error printed by mfii_aen_register */ goto intr_disestablish; } -#endif /* enable interrupts */ mfii_write(sc, MFI_OSTS, 0xffffffff); mfii_write(sc, MFI_OMSK, ~MFII_OSTS_INTR_VALID); return; -#ifdef notyet intr_disestablish: pci_intr_disestablish(sc->sc_pc, sc->sc_ih); -#endif free_sgl: mfii_dmamem_free(sc, sc->sc_sgl); free_requests: @@ -851,6 +847,7 @@ mfii_dcmd_start(struct mfii_softc *sc, struct mfii_ccb *ccb) io->function = MFII_FUNCTION_PASSTHRU_IO; io->sgl_offset0 = (uint32_t *)sge - (uint32_t *)io; + io->chain_offset = io->sgl_offset0 / 4; htolem64(&sge->sg_addr, ccb->ccb_sense_dva); htolem32(&sge->sg_len, sizeof(*ccb->ccb_sense)); -- 2.20.1