summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorad <ad@NetBSD.org>2003-12-09 20:12:14 +0000
committerad <ad@NetBSD.org>2003-12-09 20:12:14 +0000
commitae788c30d0c68a65d88aab41f804d563fe892e75 (patch)
tree7232978d475f5978c877fff084450d6bbefafb5a /sys/dev
parentd45d00fdb9fdedc6bb72d23ac8d69e7ced4d6ba3 (diff)
Mirror change made in FreeBSD, rev 1.39 of aac.c. May address PR 23574.
bzero out the sync command buffer when sending commands. This was causing problems when enumerating multiple arrays.
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/ic/aac.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/sys/dev/ic/aac.c b/sys/dev/ic/aac.c
index f8235f9ec1d..91f5223b68b 100644
--- a/sys/dev/ic/aac.c
+++ b/sys/dev/ic/aac.c
@@ -1,4 +1,4 @@
-/* $NetBSD: aac.c,v 1.9 2003/05/03 18:11:11 wiz Exp $ */
+/* $NetBSD: aac.c,v 1.10 2003/12/09 20:12:14 ad Exp $ */
/*-
* Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -77,7 +77,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: aac.c,v 1.9 2003/05/03 18:11:11 wiz Exp $");
+__KERNEL_RCSID(0, "$NetBSD: aac.c,v 1.10 2003/12/09 20:12:14 ad Exp $");
#include "locators.h"
@@ -631,14 +631,15 @@ aac_startup(struct aac_softc *sc)
/*
* Loop over possible containers.
*/
- mi.Command = htole32(VM_NameServe);
- mi.MntType = htole32(FT_FILESYS);
hd = sc->sc_hdr;
for (i = 0; i < AAC_MAX_CONTAINERS; i++, hd++) {
/*
* Request information on this container.
*/
+ memset(&mi, 0, sizeof(mi));
+ mi.Command = htole32(VM_NameServe);
+ mi.MntType = htole32(FT_FILESYS);
mi.MntCount = htole32(i);
if (aac_sync_fib(sc, ContainerCommand, 0, &mi, sizeof(mi), &mir,
&rsize)) {
@@ -690,6 +691,7 @@ aac_shutdown(void *cookie)
* talk to it anymore. We've been closed and all I/O
* completed already
*/
+ memset(&cc, 0, sizeof(cc));
cc.Command = htole32(VM_CloseAll);
cc.ContainerId = 0xffffffff;
if (aac_sync_fib(sc, ContainerCommand, 0, &cc, sizeof(cc),