diff options
author | Marco Peereboom <marco@cvs.openbsd.org> | 2006-05-22 19:50:44 +0000 |
---|---|---|
committer | Marco Peereboom <marco@cvs.openbsd.org> | 2006-05-22 19:50:44 +0000 |
commit | 015937de55f300730d284d2cf72704203aad00eb (patch) | |
tree | 873d30006bf2d6e57a820c3e8163cba937bb60da /sys/dev | |
parent | 68072f65efba1f32026413c8b503f7a685ddab18 (diff) |
Add support for raid 50 and 10 in bio.
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/ic/mfi.c | 18 | ||||
-rw-r--r-- | sys/dev/ic/mfireg.h | 23 |
2 files changed, 33 insertions, 8 deletions
diff --git a/sys/dev/ic/mfi.c b/sys/dev/ic/mfi.c index aa4e0652c85..c2356b16ffc 100644 --- a/sys/dev/ic/mfi.c +++ b/sys/dev/ic/mfi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mfi.c,v 1.49 2006/05/22 02:24:11 marco Exp $ */ +/* $OpenBSD: mfi.c,v 1.50 2006/05/22 19:50:43 marco Exp $ */ /* * Copyright (c) 2006 Marco Peereboom <marco@peereboom.us> * @@ -1309,12 +1309,22 @@ mfi_ioctl_vol(struct mfi_softc *sc, struct bioc_vol *bv) } #if 0 - printf("drv/span %d span depth%d\n", + printf("drv/span %d span depth %d raid qual %#x sec raid %#x\n", sc->sc_ld_details.mld_cfg.mlc_parm.mpa_no_drv_per_span, - sc->sc_ld_details.mld_cfg.mlc_parm.mpa_span_depth); + sc->sc_ld_details.mld_cfg.mlc_parm.mpa_span_depth, + sc->sc_ld_details.mld_cfg.mlc_parm.mpa_raid_qual, + sc->sc_ld_details.mld_cfg.mlc_parm.mpa_sec_raid); #endif + + /* + * The RAID levels are determined per the SNIA DDF spec, this is only + * a subset that is valid for the MFI contrller. + */ bv->bv_level = sc->sc_ld_details.mld_cfg.mlc_parm.mpa_pri_raid; - + if (sc->sc_ld_details.mld_cfg.mlc_parm.mpa_sec_raid == + MFI_DDF_SRL_SPANNED) + bv->bv_level *= 10; + bv->bv_nodisk = sc->sc_ld_details.mld_cfg.mlc_parm.mpa_no_drv_per_span * sc->sc_ld_details.mld_cfg.mlc_parm.mpa_span_depth; diff --git a/sys/dev/ic/mfireg.h b/sys/dev/ic/mfireg.h index 5916602942a..569fe36ea94 100644 --- a/sys/dev/ic/mfireg.h +++ b/sys/dev/ic/mfireg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: mfireg.h,v 1.16 2006/05/22 02:24:11 marco Exp $ */ +/* $OpenBSD: mfireg.h,v 1.17 2006/05/22 19:50:43 marco Exp $ */ /* * Copyright (c) 2006 Marco Peereboom <marco@peereboom.us> * @@ -718,9 +718,24 @@ struct mfi_ld_prop { } __packed; struct mfi_ld_parm { - uint8_t mpa_pri_raid; - uint8_t mpa_raid_qual; - uint8_t mpa_sec_raid; + uint8_t mpa_pri_raid; /* SNIA DDF PRL */ +#define MFI_DDF_PRL_RAID0 0x00 +#define MFI_DDF_PRL_RAID1 0x01 +#define MFI_DDF_PRL_RAID3 0x03 +#define MFI_DDF_PRL_RAID4 0x04 +#define MFI_DDF_PRL_RAID5 0x05 +#define MFI_DDF_PRL_RAID1E 0x11 +#define MFI_DDF_PRL_JBOD 0x0f +#define MFI_DDF_PRL_CONCAT 0x1f +#define MFI_DDF_PRL_RAID5E 0x15 +#define MFI_DDF_PRL_RAID5EE 0x25 +#define MFI_DDF_PRL_RAID6 0x16 + uint8_t mpa_raid_qual; /* SNIA DDF RLQ */ + uint8_t mpa_sec_raid; /* SNIA DDF SRL */ +#define MFI_DDF_SRL_STRIPED 0x00 +#define MFI_DDF_SRL_MIRRORED 0x01 +#define MFI_DDF_SRL_CONCAT 0x02 +#define MFI_DDF_SRL_SPANNED 0x03 uint8_t mpa_stripe_size; uint8_t mpa_no_drv_per_span; uint8_t mpa_span_depth; |