125184Sjkh/* SPDX-License-Identifier: GPL-2.0-or-later */ 225184Sjkh/* 345096Simp * 425184Sjkh * Linux MegaRAID device driver 525184Sjkh * 625184Sjkh * Copyright (c) 2003-2004 LSI Logic Corporation. 725184Sjkh * 825184Sjkh * FILE : megaraid_mm.h 925184Sjkh */ 1025184Sjkh 1125184Sjkh#ifndef MEGARAID_MM_H 1225184Sjkh#define MEGARAID_MM_H 1325184Sjkh 1425184Sjkh#include <linux/spinlock.h> 1525184Sjkh#include <linux/fs.h> 1625184Sjkh#include <linux/uaccess.h> 1725184Sjkh#include <linux/module.h> 1825184Sjkh#include <linux/moduleparam.h> 1925184Sjkh#include <linux/pci.h> 2025184Sjkh#include <linux/list.h> 2125184Sjkh#include <linux/miscdevice.h> 2225184Sjkh 2325184Sjkh#include "mbox_defs.h" 2425184Sjkh#include "megaraid_ioctl.h" 2525184Sjkh 2625184Sjkh 2725184Sjkh#define LSI_COMMON_MOD_VERSION "2.20.2.7" 2840006Sphk#define LSI_COMMON_MOD_EXT_VERSION \ 2940006Sphk "(Release Date: Sun Jul 16 00:01:03 EST 2006)" 3040006Sphk 3140006Sphk 3240006Sphk#define LSI_DBGLVL dbglevel 3340006Sphk 3442621Shm// The smallest dma pool 3542621Shm#define MRAID_MM_INIT_BUFF_SIZE 4096 3642621Shm 3742621Shm/** 3842621Shm * mimd_t : Old style ioctl packet structure (deprecated) 3942627Sjoerg * 4042627Sjoerg * @inlen : 4142627Sjoerg * @outlen : 4242627Sjoerg * @fca : 4342627Sjoerg * @opcode : 4442627Sjoerg * @subopcode : 4542627Sjoerg * @adapno : 4642627Sjoerg * @buffer : 4742627Sjoerg * @pad : 4842627Sjoerg * @length : 4942627Sjoerg * @mbox : 5042627Sjoerg * @pthru : 5142627Sjoerg * @data : 5242627Sjoerg * @pad : 5325184Sjkh * 5425184Sjkh * Note : This structure is DEPRECATED. New applications must use 5525184Sjkh * : uioc_t structure instead. All new hba drivers use the new 5633682Sbrian * : format. If we get this mimd packet, we will convert it into 5725184Sjkh * : new uioc_t format and send it to the hba drivers. 5825184Sjkh */ 5925184Sjkh 6025184Sjkhtypedef struct mimd { 6125184Sjkh 6225184Sjkh uint32_t inlen; 6325184Sjkh uint32_t outlen; 6425184Sjkh 6525184Sjkh union { 6625184Sjkh uint8_t fca[16]; 6725184Sjkh struct { 6825184Sjkh uint8_t opcode; 6925184Sjkh uint8_t subopcode; 7025184Sjkh uint16_t adapno; 7125184Sjkh#if BITS_PER_LONG == 32 7225184Sjkh uint8_t __user *buffer; 7325184Sjkh uint8_t pad[4]; 7425184Sjkh#endif 7525184Sjkh#if BITS_PER_LONG == 64 7625184Sjkh uint8_t __user *buffer; 7725184Sjkh#endif 7825184Sjkh uint32_t length; 7925184Sjkh } __attribute__ ((packed)) fcs; 8025184Sjkh } __attribute__ ((packed)) ui; 8125184Sjkh 8229300Sdanny uint8_t mbox[18]; /* 16 bytes + 2 status bytes */ 8329300Sdanny mraid_passthru_t pthru; 8429300Sdanny 8529300Sdanny#if BITS_PER_LONG == 32 8632382Salex char __user *data; /* buffer <= 4096 for 0x80 commands */ 8732382Salex char pad[4]; 8832382Salex#endif 8929300Sdanny#if BITS_PER_LONG == 64 9029300Sdanny char __user *data; 9129300Sdanny#endif 9229300Sdanny 9341077Speter} __attribute__ ((packed))mimd_t; 9429300Sdanny 9529300Sdanny#endif // MEGARAID_MM_H 9629300Sdanny 9729300Sdanny// vi: set ts=8 sw=8 tw=78: 9829300Sdanny