Module Name: src Committed By: martin Date: Fri Aug 22 10:41:18 UTC 2014
Modified Files: src/sys/dev/ic [netbsd-7]: mfi.c Log Message: Pull up following revision(s) (requested by msaitoh in ticket #48): sys/dev/ic/mfi.c: revision 1.54-1.55 Fix mfi(4) panic on boot on some mfi(4) chips. To generate a diff of this commit: cvs rdiff -u -r1.53 -r1.53.2.1 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.53 src/sys/dev/ic/mfi.c:1.53.2.1 --- src/sys/dev/ic/mfi.c:1.53 Fri Jul 25 08:10:37 2014 +++ src/sys/dev/ic/mfi.c Fri Aug 22 10:41:18 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: mfi.c,v 1.53 2014/07/25 08:10:37 dholland Exp $ */ +/* $NetBSD: mfi.c,v 1.53.2.1 2014/08/22 10:41:18 martin 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.53 2014/07/25 08:10:37 dholland Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mfi.c,v 1.53.2.1 2014/08/22 10:41:18 martin Exp $"); #include "bio.h" @@ -380,15 +380,18 @@ 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 += MEGASAS_THUNDERBOLT_NEW_MSG_SIZE; - io_req_base_phys += MEGASAS_THUNDERBOLT_NEW_MSG_SIZE; + 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; + } else { + io_req_base = NULL; /* XXX: gcc */ + io_req_base_phys = 0; /* XXX: gcc */ } for (i = 0; i < sc->sc_max_cmds; i++) {