Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/pci mfii(4): Set stripe size correctly for BIOCVOL. ...



details:   https://anonhg.NetBSD.org/src/rev/c5275c52832e
branches:  trunk
changeset: 366042:c5275c52832e
user:      msaitoh <msaitoh%NetBSD.org@localhost>
date:      Wed May 11 15:24:45 2022 +0000

description:
mfii(4): Set stripe size correctly for BIOCVOL. Same as mfi.c rev. 1.75.

diffstat:

 sys/dev/pci/mfii.c |  7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diffs (28 lines):

diff -r df428d82a40f -r c5275c52832e sys/dev/pci/mfii.c
--- a/sys/dev/pci/mfii.c        Wed May 11 15:20:54 2022 +0000
+++ b/sys/dev/pci/mfii.c        Wed May 11 15:24:45 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: mfii.c,v 1.11 2022/05/07 14:18:25 msaitoh Exp $ */
+/* $NetBSD: mfii.c,v 1.12 2022/05/11 15:24:45 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.11 2022/05/07 14:18:25 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mfii.c,v 1.12 2022/05/11 15:24:45 msaitoh Exp $");
 
 #include "bio.h"
 
@@ -2974,6 +2974,9 @@
            sc->sc_ld_details[i].mld_cfg.mlc_parm.mpa_span_depth;
 
        bv->bv_size = sc->sc_ld_details[i].mld_size * 512; /* bytes per block */
+       bv->bv_stripe_size =
+           (512 << sc->sc_ld_details[i].mld_cfg.mlc_parm.mpa_stripe_size)
+           / 1024; /* in KB */
 
        rv = 0;
 done:



Home | Main Index | Thread Index | Old Index