summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjmatthew <jmatthew@openbsd.org>2019-03-05 01:43:07 +0000
committerjmatthew <jmatthew@openbsd.org>2019-03-05 01:43:07 +0000
commit64a7f97f06879dfb1aa6ff5abae255cab6f5c3e1 (patch)
tree020bea65b3118c31a14223e40bd3aa8400345f73
parentapply background init progress fix from r1.59 of mfii.c (diff)
downloadwireguard-openbsd-64a7f97f06879dfb1aa6ff5abae255cab6f5c3e1.tar.xz
wireguard-openbsd-64a7f97f06879dfb1aa6ff5abae255cab6f5c3e1.zip
swap MFI_LD_PROG_BGI and MFI_LD_PROG_CC cases to match value order
ok dlg@
-rw-r--r--sys/dev/pci/mfii.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/sys/dev/pci/mfii.c b/sys/dev/pci/mfii.c
index 31337acd185..8a726f1985f 100644
--- a/sys/dev/pci/mfii.c
+++ b/sys/dev/pci/mfii.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mfii.c,v 1.59 2019/03/01 01:58:17 jmatthew Exp $ */
+/* $OpenBSD: mfii.c,v 1.60 2019/03/05 01:43:07 jmatthew Exp $ */
/*
* Copyright (c) 2012 David Gwynne <dlg@openbsd.org>
@@ -2917,19 +2917,20 @@ 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_BGI:
+ case MFI_LD_PROG_CC:
bv->bv_status = BIOC_SVSCRUB;
- per = (int)sc->sc_ld_details[i].mld_progress.mlp_bgi.mp_progress;
+ per = (int)sc->sc_ld_details[i].mld_progress.mlp_cc.mp_progress;
bv->bv_percent = (per * 100) / 0xffff;
bv->bv_seconds =
- sc->sc_ld_details[i].mld_progress.mlp_bgi.mp_elapsed_seconds;
+ sc->sc_ld_details[i].mld_progress.mlp_cc.mp_elapsed_seconds;
break;
- 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_cc.mp_progress;
+ 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_cc.mp_elapsed_seconds;
+ sc->sc_ld_details[i].mld_progress.mlp_bgi.mp_elapsed_seconds;
break;
case MFI_LD_PROG_FGI: