Module Name: src Committed By: christos Date: Fri Jun 28 14:46:45 UTC 2013
Modified Files: src/sys/dev/ic: mfi.c Log Message: Fix the non-thunderbolt case. XXX: Is that right even? http://m00nbsd.net/ae123a9bae03f7dde5c6d654412daf5a.html To generate a diff of this commit: cvs rdiff -u -r1.48 -r1.49 src/sys/dev/ic/mfi.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/dev/ic/mfi.c diff -u src/sys/dev/ic/mfi.c:1.48 src/sys/dev/ic/mfi.c:1.49 --- src/sys/dev/ic/mfi.c:1.48 Fri Nov 9 13:46:54 2012 +++ src/sys/dev/ic/mfi.c Fri Jun 28 10:46:44 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: mfi.c,v 1.48 2012/11/09 18:46:54 bouyer Exp $ */ +/* $NetBSD: mfi.c,v 1.49 2013/06/28 14:46:44 christos Exp $ */ /* $OpenBSD: mfi.c,v 1.66 2006/11/28 23:59:45 dlg Exp $ */ /* @@ -73,7 +73,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: mfi.c,v 1.48 2012/11/09 18:46:54 bouyer Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mfi.c,v 1.49 2013/06/28 14:46:44 christos Exp $"); #include "bio.h" @@ -370,15 +370,15 @@ mfi_init_ccb(struct mfi_softc *sc) sc->sc_ccb = malloc(sizeof(struct mfi_ccb) * sc->sc_max_cmds, M_DEVBUF, M_WAITOK|M_ZERO); + io_req_base = (uint8_t *)MFIMEM_KVA(sc->sc_tbolt_reqmsgpool); + io_req_base_phys = MFIMEM_DVA(sc->sc_tbolt_reqmsgpool); if (sc->sc_ioptype == MFI_IOP_TBOLT) { /* * The first 256 bytes (SMID 0) is not used. * Don't add to the cmd list. */ - io_req_base = (uint8_t *)MFIMEM_KVA(sc->sc_tbolt_reqmsgpool) + - MEGASAS_THUNDERBOLT_NEW_MSG_SIZE; - io_req_base_phys = MFIMEM_DVA(sc->sc_tbolt_reqmsgpool) + - MEGASAS_THUNDERBOLT_NEW_MSG_SIZE; + io_req_base += MEGASAS_THUNDERBOLT_NEW_MSG_SIZE; + io_req_base_phys += MEGASAS_THUNDERBOLT_NEW_MSG_SIZE; } for (i = 0; i < sc->sc_max_cmds; i++) {