Module Name:    src
Committed By:   msaitoh
Date:           Sat May  7 14:18:25 UTC 2022

Modified Files:
        src/sys/dev/pci: mfii.c

Log Message:
Use mlp_bgi for MFI_LD_PROG_BGI. Same as OpenBSD.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/dev/pci/mfii.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/pci/mfii.c
diff -u src/sys/dev/pci/mfii.c:1.10 src/sys/dev/pci/mfii.c:1.11
--- src/sys/dev/pci/mfii.c:1.10	Thu May  5 09:14:17 2022
+++ src/sys/dev/pci/mfii.c	Sat May  7 14:18:25 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: mfii.c,v 1.10 2022/05/05 09:14:17 msaitoh Exp $ */
+/* $NetBSD: mfii.c,v 1.11 2022/05/07 14:18:25 msaitoh Exp $ */
 /* $OpenBSD: mfii.c,v 1.58 2018/08/14 05:22:21 jmatthew Exp $ */
 
 /*
@@ -19,7 +19,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mfii.c,v 1.10 2022/05/05 09:14:17 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mfii.c,v 1.11 2022/05/07 14:18:25 msaitoh Exp $");
 
 #include "bio.h"
 
@@ -2934,7 +2934,6 @@ mfii_ioctl_vol(struct mfii_softc *sc, st
 	/* 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_cc.mp_progress;
 		bv->bv_percent = (per * 100) / 0xffff;
@@ -2942,6 +2941,14 @@ mfii_ioctl_vol(struct mfii_softc *sc, st
 		    sc->sc_ld_details[i].mld_progress.mlp_cc.mp_elapsed_seconds;
 		break;
 
+	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_FGI:
 	case MFI_LD_PROG_RECONSTRUCT:
 		/* nothing yet */

Reply via email to