From 8757842d722a219cbb097db28f64b7e825a69b45 Mon Sep 17 00:00:00 2001 From: kettenis Date: Thu, 17 Jul 2008 23:08:08 +0000 Subject: [PATCH] Zero mbreg_t structure *before* initializing any members, not when we're halfway through. Makes the ISP12160 correctly load its firmware again on sparc64. ok krw@ --- sys/dev/ic/isp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/ic/isp.c b/sys/dev/ic/isp.c index e54e65fb1a0..74a4e3f69e0 100644 --- a/sys/dev/ic/isp.c +++ b/sys/dev/ic/isp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: isp.c,v 1.43 2008/06/11 22:53:46 krw Exp $ */ +/* $OpenBSD: isp.c,v 1.44 2008/07/17 23:08:08 kettenis Exp $ */ /* * Machine and OS Independent (well, as best as possible) * code for the QLogic ISP SCSI adapters. @@ -4788,6 +4788,7 @@ isp_mbox_continue(struct ispsoftc *isp) /* * Continue with next word. */ + MEMZERO(&mbs, sizeof (mbs)); ptr = isp->isp_mbxworkp; switch (isp->isp_lastmbxcmd) { case MBOX_WRITE_RAM_WORD: @@ -4801,7 +4802,6 @@ isp_mbox_continue(struct ispsoftc *isp) break; } isp->isp_mbxworkp = ptr; - MEMZERO(&mbs, sizeof (mbs)); mbs.param[0] = isp->isp_lastmbxcmd; isp->isp_mbxwrk0 -= 1; isp_mboxcmd_qnw(isp, &mbs, 0); -- 2.20.1