Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev Use mlp_bgi for MFI_LD_PROG_BGI. Same as OpenBSD.



details:   https://anonhg.NetBSD.org/src/rev/2317537d98e6
branches:  trunk
changeset: 365987:2317537d98e6
user:      msaitoh <msaitoh%NetBSD.org@localhost>
date:      Sat May 07 14:14:34 2022 +0000

description:
Use mlp_bgi for MFI_LD_PROG_BGI. Same as OpenBSD.

diffstat:

 sys/dev/ic/mfi.c   |  13 ++++++++++---
 sys/dev/pci/mfii.c |  13 ++++++++++---
 2 files changed, 20 insertions(+), 6 deletions(-)

diffs (82 lines):

diff -r 3a26512c5221 -r 2317537d98e6 sys/dev/ic/mfi.c
--- a/sys/dev/ic/mfi.c  Sat May 07 13:14:16 2022 +0000
+++ b/sys/dev/ic/mfi.c  Sat May 07 14:14:34 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: mfi.c,v 1.70 2022/05/07 04:40:02 msaitoh Exp $ */
+/* $NetBSD: mfi.c,v 1.71 2022/05/07 14:14:34 msaitoh Exp $ */
 /* $OpenBSD: mfi.c,v 1.66 2006/11/28 23:59:45 dlg Exp $ */
 
 /*
@@ -73,7 +73,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mfi.c,v 1.70 2022/05/07 04:40:02 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mfi.c,v 1.71 2022/05/07 14:14:34 msaitoh Exp $");
 
 #include "bio.h"
 
@@ -2085,7 +2085,6 @@
        /* additional status can modify MFI status */
        switch (sc->sc_ld_details.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.mld_progress.mlp_cc.mp_progress;
                bv->bv_percent = (per * 100) / 0xffff;
@@ -2093,6 +2092,14 @@
                    sc->sc_ld_details.mld_progress.mlp_cc.mp_elapsed_seconds;
                break;
 
+       case MFI_LD_PROG_BGI:
+               bv->bv_status = BIOC_SVSCRUB;
+               per = (int)sc->sc_ld_details.mld_progress.mlp_bgi.mp_progress;
+               bv->bv_percent = (per * 100) / 0xffff;
+               bv->bv_seconds =
+                   sc->sc_ld_details.mld_progress.mlp_bgi.mp_elapsed_seconds;
+               break;
+
        case MFI_LD_PROG_FGI:
        case MFI_LD_PROG_RECONSTRUCT:
                /* nothing yet */
diff -r 3a26512c5221 -r 2317537d98e6 sys/dev/pci/mfii.c
--- a/sys/dev/pci/mfii.c        Sat May 07 13:14:16 2022 +0000
+++ b/sys/dev/pci/mfii.c        Sat May 07 14:14:34 2022 +0000
@@ -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 @@
        /* 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 @@
                    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 */



Home | Main Index | Thread Index | Old Index