summaryrefslogtreecommitdiffstats
path: root/sys/dev/mrsas/mrsas_ioctl.h
diff options
context:
space:
mode:
authorkadesai <kadesai@FreeBSD.org>2014-10-08 10:14:37 +0000
committerkadesai <kadesai@FreeBSD.org>2014-10-08 10:14:37 +0000
commitf5996ba41605d0e9cd59bb9482ab3e2e037d8d32 (patch)
tree8cff8beee7e7a6c56b8ad42eee8582894581d8cc /sys/dev/mrsas/mrsas_ioctl.h
parentce66e045bfaec0e6e368d0219a03387d1539d931 (diff)
downloadFreeBSD-src-f5996ba41605d0e9cd59bb9482ab3e2e037d8d32.zip
FreeBSD-src-f5996ba41605d0e9cd59bb9482ab3e2e037d8d32.tar.gz
No logical code change in this pathc.
Only Style 9 changes for mrsas driver. Reviewed by: ambrisko MFC after: 2 weeks Sponsored by: AVAGO Technologies
Diffstat (limited to 'sys/dev/mrsas/mrsas_ioctl.h')
-rw-r--r--sys/dev/mrsas/mrsas_ioctl.h149
1 files changed, 73 insertions, 76 deletions
diff --git a/sys/dev/mrsas/mrsas_ioctl.h b/sys/dev/mrsas/mrsas_ioctl.h
index ae0e2e1..bf05a7d 100644
--- a/sys/dev/mrsas/mrsas_ioctl.h
+++ b/sys/dev/mrsas/mrsas_ioctl.h
@@ -1,43 +1,38 @@
/*
- * Copyright (c) 2014, LSI Corp.
- * All rights reserved.
- * Author: Marian Choy
+ * Copyright (c) 2014, LSI Corp. All rights reserved. Author: Marian Choy
* Support: freebsdraid@lsi.com
*
* Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ * modification, are permitted provided that the following conditions are
+ * met:
*
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- * 3. Neither the name of the <ORGANIZATION> nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer. 2. Redistributions
+ * in binary form must reproduce the above copyright notice, this list of
+ * conditions and the following disclaimer in the documentation and/or other
+ * materials provided with the distribution. 3. Neither the name of the
+ * <ORGANIZATION> nor the names of its contributors may be used to endorse or
+ * promote products derived from this software without specific prior written
+ * permission.
*
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
- * The views and conclusions contained in the software and documentation
- * are those of the authors and should not be interpreted as representing
+ * The views and conclusions contained in the software and documentation are
+ * those of the authors and should not be interpreted as representing
* official policies,either expressed or implied, of the FreeBSD Project.
*
- * Send feedback to: <megaraidfbsd@lsi.com>
- * Mail to: LSI Corporation, 1621 Barber Lane, Milpitas, CA 95035
- * ATTN: MegaRaid FreeBSD
+ * Send feedback to: <megaraidfbsd@lsi.com> Mail to: LSI Corporation, 1621
+ * Barber Lane, Milpitas, CA 95035 ATTN: MegaRaid FreeBSD
*
*/
@@ -45,11 +40,11 @@
__FBSDID("$FreeBSD$");
#ifndef MRSAS_IOCTL_H
-#define MRSAS_IOCTL_H
+#define MRSAS_IOCTL_H
#ifndef _IOWR
#include <sys/ioccom.h>
-#endif /* !_IOWR */
+#endif /* !_IOWR */
#ifdef COMPAT_FREEBSD32
/* Compilation error FIX */
@@ -61,69 +56,71 @@ __FBSDID("$FreeBSD$");
#endif
/*
- * We need to use the same values as the mfi driver until MegaCli adds
- * support for this (mrsas) driver:
- * M is for MegaRAID. (This is typically the vendor or product initial)
- * 1 arbitrary. (This may be used to segment kinds of commands.
- * (1-9 status, 10-20 policy, etc.)
- * struct mrsas_iocpacket (sizeof() this parameter will be used.)
- * These three values are encoded into a somewhat unique, 32-bit value.
+ * We need to use the same values as the mfi driver until MegaCli adds
+ * support for this (mrsas) driver: M is for MegaRAID. (This is typically the
+ * vendor or product initial) 1 arbitrary. (This may be used to segment kinds
+ * of commands. (1-9 status, 10-20 policy, etc.) struct mrsas_iocpacket
+ * (sizeof() this parameter will be used.) These three values are encoded
+ * into a somewhat unique, 32-bit value.
*/
-#define MRSAS_IOC_FIRMWARE_PASS_THROUGH64 _IOWR('M', 1, struct mrsas_iocpacket)
+#define MRSAS_IOC_FIRMWARE_PASS_THROUGH64 _IOWR('M', 1, struct mrsas_iocpacket)
#ifdef COMPAT_FREEBSD32
-#define MRSAS_IOC_FIRMWARE_PASS_THROUGH32 _IOWR('M', 1, struct mrsas_iocpacket32)
+#define MRSAS_IOC_FIRMWARE_PASS_THROUGH32 _IOWR('M', 1, struct mrsas_iocpacket32)
#endif
-#define MRSAS_IOC_SCAN_BUS _IO('M', 10)
+#define MRSAS_IOC_SCAN_BUS _IO('M', 10)
-#define MRSAS_LINUX_CMD32 0xc1144d01
+#define MRSAS_LINUX_CMD32 0xc1144d01
-#define MAX_IOCTL_SGE 16
-#define MFI_FRAME_DIR_READ 0x0010
-#define MFI_CMD_LD_SCSI_IO 0x03
+#define MAX_IOCTL_SGE 16
+#define MFI_FRAME_DIR_READ 0x0010
+#define MFI_CMD_LD_SCSI_IO 0x03
-#define INQUIRY_CMD 0x12
-#define INQUIRY_CMDLEN 6
-#define INQUIRY_REPLY_LEN 96
-#define INQUIRY_VENDOR 8 /* Offset in reply data to vendor name */
-#define SCSI_SENSE_BUFFERSIZE 96
+#define INQUIRY_CMD 0x12
+#define INQUIRY_CMDLEN 6
+#define INQUIRY_REPLY_LEN 96
+#define INQUIRY_VENDOR 8 /* Offset in reply data to
+ * vendor name */
+#define SCSI_SENSE_BUFFERSIZE 96
-#define MEGAMFI_RAW_FRAME_SIZE 128
+#define MEGAMFI_RAW_FRAME_SIZE 128
#pragma pack(1)
struct mrsas_iocpacket {
- u_int16_t host_no;
- u_int16_t __pad1;
- u_int32_t sgl_off;
- u_int32_t sge_count;
- u_int32_t sense_off;
- u_int32_t sense_len;
- union {
- u_int8_t raw[MEGAMFI_RAW_FRAME_SIZE];
- struct mrsas_header hdr;
- } frame;
- struct iovec sgl[MAX_IOCTL_SGE];
+ u_int16_t host_no;
+ u_int16_t __pad1;
+ u_int32_t sgl_off;
+ u_int32_t sge_count;
+ u_int32_t sense_off;
+ u_int32_t sense_len;
+ union {
+ u_int8_t raw[MEGAMFI_RAW_FRAME_SIZE];
+ struct mrsas_header hdr;
+ } frame;
+ struct iovec sgl[MAX_IOCTL_SGE];
};
+
#pragma pack()
#ifdef COMPAT_FREEBSD32
#pragma pack(1)
struct mrsas_iocpacket32 {
- u_int16_t host_no;
- u_int16_t __pad1;
- u_int32_t sgl_off;
- u_int32_t sge_count;
- u_int32_t sense_off;
- u_int32_t sense_len;
- union {
- u_int8_t raw[MEGAMFI_RAW_FRAME_SIZE];
- struct mrsas_header hdr;
- } frame;
- struct iovec32 sgl[MAX_IOCTL_SGE];
+ u_int16_t host_no;
+ u_int16_t __pad1;
+ u_int32_t sgl_off;
+ u_int32_t sge_count;
+ u_int32_t sense_off;
+ u_int32_t sense_len;
+ union {
+ u_int8_t raw[MEGAMFI_RAW_FRAME_SIZE];
+ struct mrsas_header hdr;
+ } frame;
+ struct iovec32 sgl[MAX_IOCTL_SGE];
};
+
#pragma pack()
-#endif /* COMPAT_FREEBSD32 */
+#endif /* COMPAT_FREEBSD32 */
-#endif /* MRSAS_IOCTL_H */
+#endif /* MRSAS_IOCTL_H */
OpenPOWER on IntegriCloud