summaryrefslogtreecommitdiff
path: root/sys/dev/raidframe/raidframeio.h
diff options
context:
space:
mode:
authormrg <mrg@NetBSD.org>2018-01-18 00:32:48 +0000
committermrg <mrg@NetBSD.org>2018-01-18 00:32:48 +0000
commit0f609155b5041134ab7ed46dd9429ad04fac7270 (patch)
treec90944b6efd130dd5f8e966eb4f6ac1ea7ea2661 /sys/dev/raidframe/raidframeio.h
parent6c5d1a8bfac893a96bb3a6124a146080fcc3afbf (diff)
implement 32-bit compat support for raidframe.
convert several raidframe ioctls to be bitsize idempotent so that they work the same in 32 and 64 bit worlds, allowing netbsd32 to configure and query raid properly. remove useless 'row' in a few places. add COMPAT_80 and put the old ioctls there. raidframeio.h: RAIDFRAME_TEST_ACC - remove, unused RAIDFRAME_GET_COMPONENT_LABEL - convert to label not pointer to label RAIDFRAME_CHECK_RECON_STATUS_EXT RAIDFRAME_CHECK_PARITYREWRITE_STATUS_EXT RAIDFRAME_CHECK_COPYBACK_STATUS_EXT - convert to progress info not pointer to info RAIDFRAME_GET_INFO - version entirely. raidframevar.h: - rf_recon_req{} has row, flags and raidPtr removed (they're not a useful part of this interface.) - RF_Config_s{} and RF_DeviceConfig_s{} have numRow/rows removed. - RF_RaidDisk_s{} is re-ordered slightly to fix alignment padding - the actual data was already OK. - InstallSpareTable() loses row argument rf_compat32.c has code for RF_Config_s{} in 32 bit mode, used by RAIDFRAME_CONFIGURE and RAIDFRAME_GET_INFO32. rf_compat80.c has code for rf_recon_req{}, RF_RaidDisk_s{} and RF_DeviceConfig_s{} to handle RAIDFRAME_FAIL_DISK, RAIDFRAME_GET_COMPONENT_LABEL, RAIDFRAME_CHECK_RECON_STATUS_EXT, RAIDFRAME_CHECK_PARITYREWRITE_STATUS_EXT, RAIDFRAME_CHECK_COPYBACK_STATUS_EXT, RAIDFRAME_GET_INFO. move several of the per-ioctl code blocks into separate functions. add rf_recon_req_internal{} to replace old usage of global rf_recon_req{} that had unused void * in the structure, ruining it's 32/64 bit ABI. add missing case for RAIDFRAME_GET_INFO50. adjust raid tests to use the new .conf format, and add a case to test the old method as well. raidctl: deal with lack of 'row' members in a couple of places. fail request no longer takes row. handle "START array" sections with just "numCol numSpare", ie no "numRow" specified. for now, generate old-style configuration but update raidctl.8 to specify the new style (keeping reference to the old style.) note that: RF_ComponentLabel_s::{row,num_rows} and RF_SingleComponent_s::row are obsolete but not removed yet.
Diffstat (limited to 'sys/dev/raidframe/raidframeio.h')
-rw-r--r--sys/dev/raidframe/raidframeio.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/sys/dev/raidframe/raidframeio.h b/sys/dev/raidframe/raidframeio.h
index 27049b02be0..908fdff2b7c 100644
--- a/sys/dev/raidframe/raidframeio.h
+++ b/sys/dev/raidframe/raidframeio.h
@@ -1,4 +1,4 @@
-/* $NetBSD: raidframeio.h,v 1.7 2016/01/06 17:40:50 christos Exp $ */
+/* $NetBSD: raidframeio.h,v 1.8 2018/01/18 00:32:49 mrg Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
* All rights reserved.
@@ -73,7 +73,6 @@
#define RAIDFRAME_SHUTDOWN _IO ('r', 2) /* shutdown the driver */
#define RAIDFRAME_TUR _IOW ('r', 3, dev_t) /* debug only: test unit
* ready */
-#define RAIDFRAME_TEST_ACC _IOWR('r', 4, struct rf_test_acc) /* run a test access */
#define RAIDFRAME_FAIL_DISK _IOW ('r', 5, struct rf_recon_req) /* fail a disk &
* optionally start
* recon */
@@ -106,7 +105,7 @@
* for device */
#define RAIDFRAME_KEEP_ACCTOTALS _IOW ('r', 18, int) /* turn AccTotals on or
* off for device */
-#define RAIDFRAME_GET_COMPONENT_LABEL _IOWR ('r', 19, RF_ComponentLabel_t *)
+#define RAIDFRAME_GET_COMPONENT_LABEL _IOWR ('r', 19, RF_ComponentLabel_t)
#define RAIDFRAME_SET_COMPONENT_LABEL _IOW ('r', 20, RF_ComponentLabel_t)
#define RAIDFRAME_INIT_LABELS _IOW ('r', 21, RF_ComponentLabel_t)
@@ -121,16 +120,17 @@
#define RAIDFRAME_DELETE_COMPONENT _IOW ('r', 30, RF_SingleComponent_t)
#define RAIDFRAME_INCORPORATE_HOT_SPARE _IOW ('r', 31, RF_SingleComponent_t)
/* 'Extended' status versions */
-#define RAIDFRAME_CHECK_RECON_STATUS_EXT _IOWR('r', 32, RF_ProgressInfo_t *)
-#define RAIDFRAME_CHECK_PARITYREWRITE_STATUS_EXT _IOWR ('r', 33, RF_ProgressInfo_t *)
-#define RAIDFRAME_CHECK_COPYBACK_STATUS_EXT _IOWR ('r', 34, RF_ProgressInfo_t *)
+#define RAIDFRAME_CHECK_RECON_STATUS_EXT _IOWR('r', 32, RF_ProgressInfo_t)
+#define RAIDFRAME_CHECK_PARITYREWRITE_STATUS_EXT _IOWR ('r', 33, RF_ProgressInfo_t)
+#define RAIDFRAME_CHECK_COPYBACK_STATUS_EXT _IOWR ('r', 34, RF_ProgressInfo_t)
#define RAIDFRAME_CONFIGURE _IOW ('r', 35, void *) /* configure the driver */
-#define RAIDFRAME_GET_INFO _IOWR('r', 36, RF_DeviceConfig_t *) /* get configuration */
+/* 36 was RAIDFRAME_GET_INFO */
#define RAIDFRAME_PARITYMAP_STATUS _IOR('r', 37, struct rf_pmstat)
#define RAIDFRAME_PARITYMAP_GET_DISABLE _IOR('r', 38, int)
#define RAIDFRAME_PARITYMAP_SET_DISABLE _IOW('r', 39, int)
#define RAIDFRAME_PARITYMAP_SET_PARAMS _IOW('r', 40, struct rf_pmparams)
#define RAIDFRAME_SET_LAST_UNIT _IOW('r', 41, int)
+#define RAIDFRAME_GET_INFO _IOWR('r', 42, RF_DeviceConfig_t *) /* get configuration */
#endif /* !_RF_RAIDFRAMEIO_H_ */