summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorJonathan Matthew <jmatthew@cvs.openbsd.org>2019-03-01 01:58:18 +0000
committerJonathan Matthew <jmatthew@cvs.openbsd.org>2019-03-01 01:58:18 +0000
commite4a0caf108f2c28165c4009644231181b6bd0a72 (patch)
tree988f7eb48afe9e844d8566463107127db8955fc3 /sys
parent80cad7565b9d3cc50a9b929d69accb0dd87aa21b (diff)
Background init progress and consistency check progress are reported in
different fields. Use the background init progress when that's the active task. lack of progress data noticed by deraadt@ tested on SAS2208 and SAS3508 ok dlg@
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/pci/mfii.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/sys/dev/pci/mfii.c b/sys/dev/pci/mfii.c
index b3bc9c8f056..31337acd185 100644
--- a/sys/dev/pci/mfii.c
+++ b/sys/dev/pci/mfii.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mfii.c,v 1.58 2018/08/14 05:22:21 jmatthew Exp $ */
+/* $OpenBSD: mfii.c,v 1.59 2019/03/01 01:58:17 jmatthew Exp $ */
/*
* Copyright (c) 2012 David Gwynne <dlg@openbsd.org>
@@ -2917,9 +2917,15 @@ mfii_ioctl_vol(struct mfii_softc *sc, struct bioc_vol *bv)
/* additional status can modify MFI status */
switch (sc->sc_ld_details[i].mld_progress.mlp_in_prog) {
- case MFI_LD_PROG_CC:
case MFI_LD_PROG_BGI:
bv->bv_status = BIOC_SVSCRUB;
+ per = (int)sc->sc_ld_details[i].mld_progress.mlp_bgi.mp_progress;
+ bv->bv_percent = (per * 100) / 0xffff;
+ bv->bv_seconds =
+ sc->sc_ld_details[i].mld_progress.mlp_bgi.mp_elapsed_seconds;
+ break;
+ case MFI_LD_PROG_CC:
+ bv->bv_status = BIOC_SVSCRUB;
per = (int)sc->sc_ld_details[i].mld_progress.mlp_cc.mp_progress;
bv->bv_percent = (per * 100) / 0xffff;
bv->bv_seconds =