PageRenderTime 31ms CodeModel.GetById 23ms app.highlight 6ms RepoModel.GetById 1ms app.codeStats 0ms

/drivers/scsi/megaraid/megaraid_mm.h

https://bitbucket.org/abioy/linux
C Header | 101 lines | 47 code | 17 blank | 37 comment | 4 complexity | 8aba584c1d3d6ec073b3107fd4fd5180 MD5 | raw file
Possible License(s): CC-BY-SA-3.0, GPL-2.0, LGPL-2.0, AGPL-1.0
  1/*
  2 *
  3 *			Linux MegaRAID device driver
  4 *
  5 * Copyright (c) 2003-2004  LSI Logic Corporation.
  6 *
  7 *	   This program is free software; you can redistribute it and/or
  8 *	   modify it under the terms of the GNU General Public License
  9 *	   as published by the Free Software Foundation; either version
 10 *	   2 of the License, or (at your option) any later version.
 11 *
 12 * FILE		: megaraid_mm.h
 13 */
 14
 15#ifndef MEGARAID_MM_H
 16#define MEGARAID_MM_H
 17
 18#include <linux/spinlock.h>
 19#include <linux/fs.h>
 20#include <asm/uaccess.h>
 21#include <linux/module.h>
 22#include <linux/moduleparam.h>
 23#include <linux/pci.h>
 24#include <linux/list.h>
 25#include <linux/miscdevice.h>
 26
 27#include "mbox_defs.h"
 28#include "megaraid_ioctl.h"
 29
 30
 31#define LSI_COMMON_MOD_VERSION	"2.20.2.7"
 32#define LSI_COMMON_MOD_EXT_VERSION	\
 33		"(Release Date: Sun Jul 16 00:01:03 EST 2006)"
 34
 35
 36#define LSI_DBGLVL			dbglevel
 37
 38// The smallest dma pool
 39#define MRAID_MM_INIT_BUFF_SIZE		4096
 40
 41/**
 42 * mimd_t	: Old style ioctl packet structure (deprecated)
 43 *
 44 * @inlen	:
 45 * @outlen	:
 46 * @fca		:
 47 * @opcode	:
 48 * @subopcode	:
 49 * @adapno	:
 50 * @buffer	:
 51 * @pad		:
 52 * @length	:
 53 * @mbox	:
 54 * @pthru	:
 55 * @data	:
 56 * @pad		:
 57 *
 58 * Note		: This structure is DEPRECATED. New applications must use
 59 *		: uioc_t structure instead. All new hba drivers use the new
 60 *		: format. If we get this mimd packet, we will convert it into
 61 *		: new uioc_t format and send it to the hba drivers.
 62 */
 63
 64typedef struct mimd {
 65
 66	uint32_t inlen;
 67	uint32_t outlen;
 68
 69	union {
 70		uint8_t fca[16];
 71		struct {
 72			uint8_t opcode;
 73			uint8_t subopcode;
 74			uint16_t adapno;
 75#if BITS_PER_LONG == 32
 76			uint8_t __user *buffer;
 77			uint8_t pad[4];
 78#endif
 79#if BITS_PER_LONG == 64
 80			uint8_t __user *buffer;
 81#endif
 82			uint32_t length;
 83		} __attribute__ ((packed)) fcs;
 84	} __attribute__ ((packed)) ui;
 85
 86	uint8_t mbox[18];		/* 16 bytes + 2 status bytes */
 87	mraid_passthru_t pthru;
 88
 89#if BITS_PER_LONG == 32
 90	char __user *data;		/* buffer <= 4096 for 0x80 commands */
 91	char pad[4];
 92#endif
 93#if BITS_PER_LONG == 64
 94	char __user *data;
 95#endif
 96
 97} __attribute__ ((packed))mimd_t;
 98
 99#endif // MEGARAID_MM_H
100
101// vi: set ts=8 sw=8 tw=78: