Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 28 Mar 2012 18:19:21 +0000 (UTC)
From:      Doug Ambrisko <ambrisko@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-projects@freebsd.org
Subject:   svn commit: r233620 - projects/head_mfi/sys/dev/mfi
Message-ID:  <201203281819.q2SIJLec048589@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ambrisko
Date: Wed Mar 28 18:19:21 2012
New Revision: 233620
URL: http://svn.freebsd.org/changeset/base/233620

Log:
  Update mfi_spare/mfi_array with the actual number of elements for
  array_ref and pd.  Change these max. #define names to avoid name space
  collisions.  This will require an update to mfiutil that will be
  checked in next.  It avoids mfiutil having to do a magic calculation.
  
  Add a note and #define to state that a "SYSTEM" disk is really what
  the firmware calls a "JBOD" drive.
  
  Remove a left over DJA merge marker.
  
  Reviewed by:	jhb

Modified:
  projects/head_mfi/sys/dev/mfi/mfireg.h

Modified: projects/head_mfi/sys/dev/mfi/mfireg.h
==============================================================================
--- projects/head_mfi/sys/dev/mfi/mfireg.h	Wed Mar 28 17:58:37 2012	(r233619)
+++ projects/head_mfi/sys/dev/mfi/mfireg.h	Wed Mar 28 18:19:21 2012	(r233620)
@@ -1158,6 +1158,12 @@ enum mfi_pd_state {
 	MFI_PD_STATE_SYSTEM = 0x40
 };
 
+/*
+ * "SYSTEM" disk appears to be "JBOD" support from the RAID controller.
+ * Adding a #define to denote this.
+ */
+#define MFI_PD_STATE_JBOD MFI_PD_STATE_SYSTEM
+
 union mfi_ld_ref {
 	struct {
 		uint8_t		target_id;
@@ -1259,7 +1265,7 @@ struct mfi_ld_info {
 	uint8_t			reserved2[16];
 } __packed;
 
-#define MAX_ARRAYS 128
+#define MFI_MAX_ARRAYS 16
 struct mfi_spare {
 	union mfi_pd_ref	ref;
 	uint8_t			spare_type;
@@ -1268,9 +1274,10 @@ struct mfi_spare {
 #define	MFI_SPARE_ENCL_AFFINITY	(1 << 2)
 	uint8_t			reserved[2];
 	uint8_t			array_count;
-	uint16_t		array_ref[MAX_ARRAYS];
+	uint16_t		array_ref[MFI_MAX_ARRAYS];
 } __packed;
 
+#define MFI_MAX_ROW_SIZE 32
 struct mfi_array {
 	uint64_t			size;
 	uint8_t				num_drives;
@@ -1284,7 +1291,7 @@ struct mfi_array {
 			uint8_t		pd;
 			uint8_t		slot;
 		} encl;
-	} pd[0];
+	} pd[MFI_MAX_ROW_SIZE];
 } __packed;
 
 struct mfi_config_data {
@@ -1436,8 +1443,6 @@ typedef struct _MPI2_SCSI_IO_VENDOR_UNIQ
 	uint8_t		resvd2[3];	/* 0x1D - 0x1F */
 } MPI2_SCSI_IO_VENDOR_UNIQUE, MPI25_SCSI_IO_VENDOR_UNIQUE;
 
-/*** DJA *****/
-
 /*****************************************************************************
 *
 *        Message Functions



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201203281819.q2SIJLec048589>