Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/ic Fix the non-thunderbolt case. XXX: Is that right ...



details:   https://anonhg.NetBSD.org/src/rev/6841d1f997f2
branches:  trunk
changeset: 787687:6841d1f997f2
user:      christos <christos%NetBSD.org@localhost>
date:      Fri Jun 28 14:46:44 2013 +0000

description:
Fix the non-thunderbolt case. XXX: Is that right even?
http://m00nbsd.net/ae123a9bae03f7dde5c6d654412daf5a.html

diffstat:

 sys/dev/ic/mfi.c |  12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diffs (38 lines):

diff -r 5b92b6febfcf -r 6841d1f997f2 sys/dev/ic/mfi.c
--- a/sys/dev/ic/mfi.c  Fri Jun 28 14:44:15 2013 +0000
+++ b/sys/dev/ic/mfi.c  Fri Jun 28 14:46:44 2013 +0000
@@ -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 @@
 
        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++) {



Home | Main Index | Thread Index | Old Index