#ifndef MPTBASE_H_INCLUDED
#define MPTBASE_H_INCLUDED
#include <linux/kernel.h>
#include <linux/pci.h>
#include <linux/mutex.h>
#include "lsi/mpi_type.h"
#include "lsi/mpi.h"
#include "lsi/mpi_ioc.h"
#include "lsi/mpi_cnfg.h"
#include "lsi/mpi_init.h"
#include "lsi/mpi_lan.h"
#include "lsi/mpi_raid.h"
#include "lsi/mpi_fc.h"
#include "lsi/mpi_targ.h"
#include "lsi/mpi_tool.h"
#include "lsi/mpi_sas.h"
#ifndef MODULEAUTHOR
#define MODULEAUTHOR …
#endif
#ifndef COPYRIGHT
#define COPYRIGHT …
#endif
#define MPT_LINUX_VERSION_COMMON …
#define MPT_LINUX_PACKAGE_NAME …
#define WHAT_MAGIC_STRING …
#define show_mptmod_ver(s,ver) …
#define MPT_MAX_ADAPTERS …
#define MPT_MAX_PROTOCOL_DRIVERS …
#define MPT_MAX_CALLBACKNAME_LEN …
#define MPT_MAX_BUS …
#define MPT_MAX_FC_DEVICES …
#define MPT_MAX_SCSI_DEVICES …
#define MPT_LAST_LUN …
#define MPT_SENSE_BUFFER_ALLOC …
#if MPT_SENSE_BUFFER_ALLOC >= 256
# undef MPT_SENSE_BUFFER_ALLOC
#define MPT_SENSE_BUFFER_ALLOC …
#define MPT_SENSE_BUFFER_SIZE …
#else
#define MPT_SENSE_BUFFER_SIZE …
#endif
#define MPT_NAME_LENGTH …
#define MPT_KOBJ_NAME_LEN …
#define MPT_PROCFS_MPTBASEDIR …
#define MPT_PROCFS_SUMMARY_ALL_NODE …
#define MPT_PROCFS_SUMMARY_ALL_PATHNAME …
#define MPT_FW_REV_MAGIC_ID_STRING …
#define MPT_MAX_REQ_DEPTH …
#define MPT_DEFAULT_REQ_DEPTH …
#define MPT_MIN_REQ_DEPTH …
#define MPT_MAX_REPLY_DEPTH …
#define MPT_DEFAULT_REPLY_DEPTH …
#define MPT_MIN_REPLY_DEPTH …
#define MPT_MAX_REPLIES_PER_ISR …
#define MPT_MAX_FRAME_SIZE …
#define MPT_DEFAULT_FRAME_SIZE …
#define MPT_REPLY_FRAME_SIZE …
#define MPT_SG_REQ_128_SCALE …
#define MPT_SG_REQ_96_SCALE …
#define MPT_SG_REQ_64_SCALE …
#define CAN_SLEEP …
#define NO_SLEEP …
#define MPT_COALESCING_TIMEOUT …
#define MPT_ULTRA320 …
#define MPT_ULTRA160 …
#define MPT_ULTRA2 …
#define MPT_ULTRA …
#define MPT_FAST …
#define MPT_SCSI …
#define MPT_ASYNC …
#define MPT_NARROW …
#define MPT_WIDE …
#define C0_1030 …
#define XL_929 …
#define MPT_FC_CAN_QUEUE …
#define MPT_SCSI_CAN_QUEUE …
#define MPT_SAS_CAN_QUEUE …
#ifdef CONFIG_FUSION_MAX_SGE
#if CONFIG_FUSION_MAX_SGE < 16
#define MPT_SCSI_SG_DEPTH …
#elif CONFIG_FUSION_MAX_SGE > 128
#define MPT_SCSI_SG_DEPTH …
#else
#define MPT_SCSI_SG_DEPTH …
#endif
#else
#define MPT_SCSI_SG_DEPTH …
#endif
#ifdef CONFIG_FUSION_MAX_FC_SGE
#if CONFIG_FUSION_MAX_FC_SGE < 16
#define MPT_SCSI_FC_SG_DEPTH …
#elif CONFIG_FUSION_MAX_FC_SGE > 256
#define MPT_SCSI_FC_SG_DEPTH …
#else
#define MPT_SCSI_FC_SG_DEPTH …
#endif
#else
#define MPT_SCSI_FC_SG_DEPTH …
#endif
#define EVENT_DESCR_STR_SZ …
#define MPT_POLLING_INTERVAL …
#ifdef __KERNEL__
#include <linux/proc_fs.h>
#define MYIOC_s_FMT …
#define MYIOC_s_DEBUG_FMT …
#define MYIOC_s_INFO_FMT …
#define MYIOC_s_NOTE_FMT …
#define MYIOC_s_WARN_FMT …
#define MYIOC_s_ERR_FMT …
#define ATTOFLAG_DISC …
#define ATTOFLAG_TAGGED …
#define ATTOFLAG_WIDE_ENB …
#define ATTOFLAG_ID_ENB …
#define ATTOFLAG_LUN_ENB …
pATTODeviceInfo_t;
pATTO_SCSIPortPage2_t;
MPT_DRIVER_CLASS;
struct mpt_pci_driver{ … };
MPT_FRAME_TRACKER;
MPT_FRAME_HDR;
#define MPT_REQ_MSGFLAGS_DROPME …
MPT_SGL_HDR;
MPT_SGL64_HDR;
SYSIF_REGS;
#define MPT_TARGET_NO_NEGO_WIDE …
#define MPT_TARGET_NO_NEGO_SYNC …
#define MPT_TARGET_NO_NEGO_QAS …
#define MPT_TAPE_NEGO_IDP …
VirtTarget;
VirtDevice;
#define MPT_TARGET_DEFAULT_DV_STATUS …
#define MPT_TARGET_FLAGS_VALID_NEGO …
#define MPT_TARGET_FLAGS_VALID_INQUIRY …
#define MPT_TARGET_FLAGS_Q_YES …
#define MPT_TARGET_FLAGS_VALID_56 …
#define MPT_TARGET_FLAGS_SAF_TE_ISSUED …
#define MPT_TARGET_FLAGS_RAID_COMPONENT …
#define MPT_TARGET_FLAGS_LED_ON …
#define MPTCTL_RESET_OK …
#define MPT_MGMT_STATUS_RF_VALID …
#define MPT_MGMT_STATUS_COMMAND_GOOD …
#define MPT_MGMT_STATUS_PENDING …
#define MPT_MGMT_STATUS_DID_IOCRESET …
#define MPT_MGMT_STATUS_SENSE_VALID …
#define MPT_MGMT_STATUS_TIMER_ACTIVE …
#define MPT_MGMT_STATUS_FREE_MF …
#define INITIALIZE_MGMT_STATUS(status) …
#define CLEAR_MGMT_STATUS(status) …
#define CLEAR_MGMT_PENDING_STATUS(status) …
#define SET_MGMT_MSG_CONTEXT(msg_context, value) …
MPT_MGMT;
#define MPTCTL_EVENT_LOG_SIZE …
MPT_IOCTL_EVENTS;
#define MPT_CONFIG_GOOD …
#define MPT_CONFIG_ERROR …
#define MPT_SCSICFG_USE_NVRAM …
#define MPT_SCSICFG_ALL_IDS …
SpiCfgData;
SasCfgData;
struct inactive_raid_component_info { … };
RaidCfgData;
FcCfgData;
#define MPT_RPORT_INFO_FLAGS_REGISTERED …
#define MPT_RPORT_INFO_FLAGS_MISSING …
struct mptfc_rport_info
{ … };
#define MPT_HOST_BUS_UNKNOWN …
#define MPT_HOST_TOO_MANY_TM …
#define MPT_HOST_NVRAM_INVALID …
#define MPT_HOST_NO_CHAIN …
#define MPT_NVRAM_MASK_TIMEOUT …
#define MPT_NVRAM_SYNC_MASK …
#define MPT_NVRAM_SYNC_SHIFT …
#define MPT_NVRAM_DISCONNECT_ENABLE …
#define MPT_NVRAM_ID_SCAN_ENABLE …
#define MPT_NVRAM_LUN_SCAN_ENABLE …
#define MPT_NVRAM_TAG_QUEUE_ENABLE …
#define MPT_NVRAM_WIDE_DISABLE …
#define MPT_NVRAM_BOOT_CHOICE …
BUS_TYPE;
MPT_SCSI_HOST;
MPT_ADD_SGE;
MPT_ADD_CHAIN;
MPT_SCHEDULE_TARGET_RESET;
MPT_FLUSH_RUNNING_CMDS;
MPT_ADAPTER;
MPT_CALLBACK;
MPT_EVHANDLER;
MPT_RESETHANDLER;
#define MPT_IOC_PRE_RESET …
#define MPT_IOC_POST_RESET …
#define MPT_IOC_SETUP_RESET …
MPT_HOST_EVENT;
#define MPT_HOSTEVENT_IOC_BRINGUP …
#define MPT_HOSTEVENT_IOC_RECOVER …
MptSge_t;
#define mpt_msg_flags(ioc) …
#define MPT_SGE_FLAGS_64_BIT_ADDRESSING …
#include "mptdebug.h"
#define MPT_INDEX_2_MFPTR(ioc,idx) …
#define MFPTR_2_MPT_INDEX(ioc,mf) …
#define MPT_INDEX_2_RFPTR(ioc,idx) …
#define SCSI_STD_SENSE_BYTES …
#define SCSI_STD_INQUIRY_BYTES …
#define SCSI_MAX_INQUIRY_BYTES …
MPT_LOCAL_REPLY;
#define TM_STATE_NONE …
#define TM_STATE_IN_PROGRESS …
#define TM_STATE_ERROR …
struct scsi_cmnd;
CONFIGPARMS;
extern int mpt_attach(struct pci_dev *pdev, const struct pci_device_id *id);
extern void mpt_detach(struct pci_dev *pdev);
#ifdef CONFIG_PM
extern int mpt_suspend(struct pci_dev *pdev, pm_message_t state);
extern int mpt_resume(struct pci_dev *pdev);
#endif
extern u8 mpt_register(MPT_CALLBACK cbfunc, MPT_DRIVER_CLASS dclass,
char *func_name);
extern void mpt_deregister(u8 cb_idx);
extern int mpt_event_register(u8 cb_idx, MPT_EVHANDLER ev_cbfunc);
extern void mpt_event_deregister(u8 cb_idx);
extern int mpt_reset_register(u8 cb_idx, MPT_RESETHANDLER reset_func);
extern void mpt_reset_deregister(u8 cb_idx);
extern int mpt_device_driver_register(struct mpt_pci_driver * dd_cbfunc, u8 cb_idx);
extern void mpt_device_driver_deregister(u8 cb_idx);
extern MPT_FRAME_HDR *mpt_get_msg_frame(u8 cb_idx, MPT_ADAPTER *ioc);
extern void mpt_free_msg_frame(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf);
extern void mpt_put_msg_frame(u8 cb_idx, MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf);
extern void mpt_put_msg_frame_hi_pri(u8 cb_idx, MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf);
extern int mpt_send_handshake_request(u8 cb_idx, MPT_ADAPTER *ioc, int reqBytes, u32 *req, int sleepFlag);
extern int mpt_verify_adapter(int iocid, MPT_ADAPTER **iocpp);
extern u32 mpt_GetIocState(MPT_ADAPTER *ioc, int cooked);
extern void mpt_print_ioc_summary(MPT_ADAPTER *ioc, char *buf, int *size, int len, int showlan);
extern int mpt_HardResetHandler(MPT_ADAPTER *ioc, int sleepFlag);
extern int mpt_Soft_Hard_ResetHandler(MPT_ADAPTER *ioc, int sleepFlag);
extern int mpt_config(MPT_ADAPTER *ioc, CONFIGPARMS *cfg);
extern int mpt_alloc_fw_memory(MPT_ADAPTER *ioc, int size);
extern void mpt_free_fw_memory(MPT_ADAPTER *ioc);
extern int mpt_findImVolumes(MPT_ADAPTER *ioc);
extern int mptbase_sas_persist_operation(MPT_ADAPTER *ioc, u8 persist_opcode);
extern int mpt_raid_phys_disk_pg0(MPT_ADAPTER *ioc, u8 phys_disk_num, pRaidPhysDiskPage0_t phys_disk);
extern int mpt_raid_phys_disk_pg1(MPT_ADAPTER *ioc, u8 phys_disk_num,
pRaidPhysDiskPage1_t phys_disk);
extern int mpt_raid_phys_disk_get_num_paths(MPT_ADAPTER *ioc,
u8 phys_disk_num);
extern int mpt_set_taskmgmt_in_progress_flag(MPT_ADAPTER *ioc);
extern void mpt_clear_taskmgmt_in_progress_flag(MPT_ADAPTER *ioc);
extern void __noreturn mpt_halt_firmware(MPT_ADAPTER *ioc);
extern struct list_head ioc_list;
extern int mpt_fwfault_debug;
#endif
#ifdef CONFIG_64BIT
#define CAST_U32_TO_PTR(x) …
#define CAST_PTR_TO_U32(x) …
#else
#define CAST_U32_TO_PTR …
#define CAST_PTR_TO_U32 …
#endif
#define MPT_PROTOCOL_FLAGS_c_c_c_c(pflags) …
#define MPT_TRANSFER_IOC_TO_HOST …
#define MPT_TRANSFER_HOST_TO_IOC …
#define MPT_SGE_FLAGS_LAST_ELEMENT …
#define MPT_SGE_FLAGS_END_OF_BUFFER …
#define MPT_SGE_FLAGS_LOCAL_ADDRESS …
#define MPT_SGE_FLAGS_DIRECTION …
#define MPT_SGE_FLAGS_END_OF_LIST …
#define MPT_SGE_FLAGS_TRANSACTION_ELEMENT …
#define MPT_SGE_FLAGS_SIMPLE_ELEMENT …
#define MPT_SGE_FLAGS_CHAIN_ELEMENT …
#define MPT_SGE_FLAGS_ELEMENT_MASK …
#define MPT_SGE_FLAGS_SSIMPLE_READ …
#define MPT_SGE_FLAGS_SSIMPLE_WRITE …
#endif