Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-or-later */
0002 /*
0003  *
0004  *          Linux MegaRAID device driver
0005  *
0006  * Copyright (c) 2003-2004  LSI Logic Corporation.
0007  *
0008  * FILE     : megaraid_mm.h
0009  */
0010 
0011 #ifndef MEGARAID_MM_H
0012 #define MEGARAID_MM_H
0013 
0014 #include <linux/spinlock.h>
0015 #include <linux/fs.h>
0016 #include <linux/uaccess.h>
0017 #include <linux/module.h>
0018 #include <linux/moduleparam.h>
0019 #include <linux/pci.h>
0020 #include <linux/list.h>
0021 #include <linux/miscdevice.h>
0022 
0023 #include "mbox_defs.h"
0024 #include "megaraid_ioctl.h"
0025 
0026 
0027 #define LSI_COMMON_MOD_VERSION  "2.20.2.7"
0028 #define LSI_COMMON_MOD_EXT_VERSION  \
0029         "(Release Date: Sun Jul 16 00:01:03 EST 2006)"
0030 
0031 
0032 #define LSI_DBGLVL          dbglevel
0033 
0034 // The smallest dma pool
0035 #define MRAID_MM_INIT_BUFF_SIZE     4096
0036 
0037 /**
0038  * mimd_t   : Old style ioctl packet structure (deprecated)
0039  *
0040  * @inlen   :
0041  * @outlen  :
0042  * @fca     :
0043  * @opcode  :
0044  * @subopcode   :
0045  * @adapno  :
0046  * @buffer  :
0047  * @pad     :
0048  * @length  :
0049  * @mbox    :
0050  * @pthru   :
0051  * @data    :
0052  * @pad     :
0053  *
0054  * Note     : This structure is DEPRECATED. New applications must use
0055  *      : uioc_t structure instead. All new hba drivers use the new
0056  *      : format. If we get this mimd packet, we will convert it into
0057  *      : new uioc_t format and send it to the hba drivers.
0058  */
0059 
0060 typedef struct mimd {
0061 
0062     uint32_t inlen;
0063     uint32_t outlen;
0064 
0065     union {
0066         uint8_t fca[16];
0067         struct {
0068             uint8_t opcode;
0069             uint8_t subopcode;
0070             uint16_t adapno;
0071 #if BITS_PER_LONG == 32
0072             uint8_t __user *buffer;
0073             uint8_t pad[4];
0074 #endif
0075 #if BITS_PER_LONG == 64
0076             uint8_t __user *buffer;
0077 #endif
0078             uint32_t length;
0079         } __attribute__ ((packed)) fcs;
0080     } __attribute__ ((packed)) ui;
0081 
0082     uint8_t mbox[18];       /* 16 bytes + 2 status bytes */
0083     mraid_passthru_t pthru;
0084 
0085 #if BITS_PER_LONG == 32
0086     char __user *data;      /* buffer <= 4096 for 0x80 commands */
0087     char pad[4];
0088 #endif
0089 #if BITS_PER_LONG == 64
0090     char __user *data;
0091 #endif
0092 
0093 } __attribute__ ((packed))mimd_t;
0094 
0095 #endif // MEGARAID_MM_H
0096 
0097 // vi: set ts=8 sw=8 tw=78: