-/* $OpenBSD: softraid_riscv64.c,v 1.2 2021/06/02 22:44:27 krw Exp $ */
+/* $OpenBSD: softraid_riscv64.c,v 1.3 2023/01/16 21:30:46 kn Exp $ */
/*
* Copyright (c) 2012 Joel Sing <jsing@openbsd.org>
break;
case 1:
+ case 0x1C:
if (bv->sbv_chunk_no == bv->sbv_chunks_found)
bv->sbv_state = BIOC_SVONLINE;
else if (bv->sbv_chunks_found > 0)
/* XXX - If I/O failed we should try another chunk... */
return dip->strategy(dip, rw, blk, size, buf, rsize);
- } else if (bv->sbv_level == 'C') {
+ } else if (bv->sbv_level == 'C' || bv->sbv_level == 0x1C) {
/* Select first online chunk. */
SLIST_FOREACH(bc, &bv->sbv_chunks, sbc_link)
return EADAPT;
}
- if (bv->sbv_level == 'C' && bv->sbv_keys == NULL)
+ if ((bv->sbv_level == 'C' || bv->sbv_level == 0x1C)
+ && bv->sbv_keys == NULL)
if (sr_crypto_unlock_volume(bv) != 0)
return EPERM;
-/* $OpenBSD: softraid_riscv64.h,v 1.1 2021/04/28 19:01:00 drahn Exp $ */
+/* $OpenBSD: softraid_riscv64.h,v 1.2 2023/01/16 21:30:46 kn Exp $ */
/*
* Copyright (c) 2012 Joel Sing <jsing@openbsd.org>
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#ifndef _SOFTRAID_ARM64_H_
-#define _SOFTRAID_ARM64_H_
+#ifndef _SOFTRAID_RISCV64_H_
+#define _SOFTRAID_RISCV64_H_
void srprobe(void);
int srclose(struct open_file *);
int srioctl(struct open_file *, u_long, void *);
-#endif /* _SOFTRAID_ARM64_H */
+#endif /* _SOFTRAID_RISCV64_H */