summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormarco <marco@openbsd.org>2008-10-23 00:30:04 +0000
committermarco <marco@openbsd.org>2008-10-23 00:30:04 +0000
commit01ff95cd79ada2cbf731d5d958dd2525fd898901 (patch)
treef46d7240accbfd08f42ecb564a62aee7a42bb57f
parent#if INET => #ifdef INET (diff)
downloadwireguard-openbsd-01ff95cd79ada2cbf731d5d958dd2525fd898901.tar.xz
wireguard-openbsd-01ff95cd79ada2cbf731d5d958dd2525fd898901.zip
Fix PR5645
ok dlg tested beck and others
-rw-r--r--sys/dev/ic/mfi.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/sys/dev/ic/mfi.c b/sys/dev/ic/mfi.c
index 9e527dba904..ab13d9c9b53 100644
--- a/sys/dev/ic/mfi.c
+++ b/sys/dev/ic/mfi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mfi.c,v 1.81 2008/09/25 11:23:54 krw Exp $ */
+/* $OpenBSD: mfi.c,v 1.82 2008/10/23 00:30:04 marco Exp $ */
/*
* Copyright (c) 2006 Marco Peereboom <marco@peereboom.us>
*
@@ -1475,7 +1475,8 @@ mfi_ioctl_disk(struct mfi_softc *sc, struct bioc_disk *bd)
bd->bd_target = ar[arr].pd[disk].mar_enc_slot;
switch (ar[arr].pd[disk].mar_pd_state){
case MFI_PD_UNCONFIG_GOOD:
- bd->bd_status = BIOC_SDUNUSED;
+ case MFI_PD_FAILED:
+ bd->bd_status = BIOC_SDFAILED;
break;
case MFI_PD_HOTSPARE: /* XXX dedicated hotspare part of array? */
@@ -1486,10 +1487,6 @@ mfi_ioctl_disk(struct mfi_softc *sc, struct bioc_disk *bd)
bd->bd_status = BIOC_SDOFFLINE;
break;
- case MFI_PD_FAILED:
- bd->bd_status = BIOC_SDFAILED;
- break;
-
case MFI_PD_REBUILD:
bd->bd_status = BIOC_SDREBUILD;
break;
@@ -1508,8 +1505,11 @@ mfi_ioctl_disk(struct mfi_softc *sc, struct bioc_disk *bd)
/* get the remaining fields */
*((uint16_t *)&mbox) = ar[arr].pd[disk].mar_pd.mfp_id;
if (mfi_mgmt(sc, MR_DCMD_PD_GET_INFO, MFI_DATA_IN,
- sizeof *pd, pd, mbox))
+ sizeof *pd, pd, mbox)) {
+ /* disk is missing but succeed command */
+ rv = 0;
goto freeme;
+ }
bd->bd_size = pd->mpd_size * 512; /* bytes per block */