Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
mptbase.c File Reference
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/errno.h>
#include <linux/init.h>
#include <linux/seq_file.h>
#include <linux/slab.h>
#include <linux/types.h>
#include <linux/pci.h>
#include <linux/kdev_t.h>
#include <linux/blkdev.h>
#include <linux/delay.h>
#include <linux/interrupt.h>
#include <linux/dma-mapping.h>
#include <asm/io.h>
#include <linux/kthread.h>
#include <scsi/scsi_host.h>
#include "mptbase.h"
#include "lsi/mpi_log_fc.h"

Go to the source code of this file.

Macros

#define my_NAME   "Fusion MPT base driver"
 
#define my_VERSION   MPT_LINUX_VERSION_COMMON
 
#define MYNAM   "mptbase"
 
#define WHOINIT_UNKNOWN   0xAA
 
#define CHIPREG_READ32(addr)   readl_relaxed(addr)
 
#define CHIPREG_READ32_dmasync(addr)   readl(addr)
 
#define CHIPREG_WRITE32(addr, val)   writel(val, addr)
 
#define CHIPREG_PIO_WRITE32(addr, val)   outl(val, (unsigned long)addr)
 
#define CHIPREG_PIO_READ32(addr)   inl((unsigned long)addr)
 

Functions

 MODULE_AUTHOR (MODULEAUTHOR)
 
 MODULE_DESCRIPTION (my_NAME)
 
 MODULE_LICENSE ("GPL")
 
 MODULE_VERSION (my_VERSION)
 
 module_param (mpt_msi_enable_spi, int, 0)
 
 MODULE_PARM_DESC (mpt_msi_enable_spi," Enable MSI Support for SPI controllers (default=0)")
 
 module_param (mpt_msi_enable_fc, int, 0)
 
 MODULE_PARM_DESC (mpt_msi_enable_fc," Enable MSI Support for FC controllers (default=0)")
 
 module_param (mpt_msi_enable_sas, int, 0)
 
 MODULE_PARM_DESC (mpt_msi_enable_sas," Enable MSI Support for SAS controllers (default=0)")
 
 module_param (mpt_channel_mapping, int, 0)
 
 MODULE_PARM_DESC (mpt_channel_mapping," Mapping id's to channels (default=0)")
 
 module_param_call (mpt_debug_level, mpt_set_debug_level, param_get_int,&mpt_debug_level, 0600)
 
 MODULE_PARM_DESC (mpt_debug_level," debug level - refer to mptdebug.h - (default=0)")
 
 EXPORT_SYMBOL (mpt_fwfault_debug)
 
 module_param (mpt_fwfault_debug, int, 0600)
 
 MODULE_PARM_DESC (mpt_fwfault_debug,"Enable detection of Firmware fault and halt Firmware on fault - (default=0)")
 
 LIST_HEAD (ioc_list)
 
int mptbase_sas_persist_operation (MPT_ADAPTER *ioc, u8 persist_opcode)
 
u8 mpt_register (MPT_CALLBACK cbfunc, MPT_DRIVER_CLASS dclass, char *func_name)
 
void mpt_deregister (u8 cb_idx)
 
int mpt_event_register (u8 cb_idx, MPT_EVHANDLER ev_cbfunc)
 
void mpt_event_deregister (u8 cb_idx)
 
int mpt_reset_register (u8 cb_idx, MPT_RESETHANDLER reset_func)
 
void mpt_reset_deregister (u8 cb_idx)
 
int mpt_device_driver_register (struct mpt_pci_driver *dd_cbfunc, u8 cb_idx)
 
void mpt_device_driver_deregister (u8 cb_idx)
 
MPT_FRAME_HDR * mpt_get_msg_frame (u8 cb_idx, MPT_ADAPTER *ioc)
 
void mpt_put_msg_frame (u8 cb_idx, MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf)
 
void mpt_put_msg_frame_hi_pri (u8 cb_idx, MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf)
 
void mpt_free_msg_frame (MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf)
 
int mpt_send_handshake_request (u8 cb_idx, MPT_ADAPTER *ioc, int reqBytes, u32 *req, int sleepFlag)
 
int mpt_verify_adapter (int iocid, MPT_ADAPTER **iocpp)
 
int mpt_attach (struct pci_dev *pdev, const struct pci_device_id *id)
 
void mpt_detach (struct pci_dev *pdev)
 
u32 mpt_GetIocState (MPT_ADAPTER *ioc, int cooked)
 
int mpt_alloc_fw_memory (MPT_ADAPTER *ioc, int size)
 
void mpt_free_fw_memory (MPT_ADAPTER *ioc)
 
int mpt_raid_phys_disk_pg0 (MPT_ADAPTER *ioc, u8 phys_disk_num, RaidPhysDiskPage0_t *phys_disk)
 
int mpt_raid_phys_disk_get_num_paths (MPT_ADAPTER *ioc, u8 phys_disk_num)
 
 EXPORT_SYMBOL (mpt_raid_phys_disk_get_num_paths)
 
int mpt_raid_phys_disk_pg1 (MPT_ADAPTER *ioc, u8 phys_disk_num, RaidPhysDiskPage1_t *phys_disk)
 
 EXPORT_SYMBOL (mpt_raid_phys_disk_pg1)
 
int mpt_findImVolumes (MPT_ADAPTER *ioc)
 
int mpt_config (MPT_ADAPTER *ioc, CONFIGPARMS *pCfg)
 
void mpt_print_ioc_summary (MPT_ADAPTER *ioc, char *buffer, int *size, int len, int showlan)
 
int mpt_set_taskmgmt_in_progress_flag (MPT_ADAPTER *ioc)
 
 EXPORT_SYMBOL (mpt_set_taskmgmt_in_progress_flag)
 
void mpt_clear_taskmgmt_in_progress_flag (MPT_ADAPTER *ioc)
 
 EXPORT_SYMBOL (mpt_clear_taskmgmt_in_progress_flag)
 
void mpt_halt_firmware (MPT_ADAPTER *ioc)
 
 EXPORT_SYMBOL (mpt_halt_firmware)
 
int mpt_SoftResetHandler (MPT_ADAPTER *ioc, int sleepFlag)
 
int mpt_Soft_Hard_ResetHandler (MPT_ADAPTER *ioc, int sleepFlag)
 
 EXPORT_SYMBOL (mpt_Soft_Hard_ResetHandler)
 
int mpt_HardResetHandler (MPT_ADAPTER *ioc, int sleepFlag)
 
 EXPORT_SYMBOL (mpt_attach)
 
 EXPORT_SYMBOL (mpt_detach)
 
 EXPORT_SYMBOL (ioc_list)
 
 EXPORT_SYMBOL (mpt_register)
 
 EXPORT_SYMBOL (mpt_deregister)
 
 EXPORT_SYMBOL (mpt_event_register)
 
 EXPORT_SYMBOL (mpt_event_deregister)
 
 EXPORT_SYMBOL (mpt_reset_register)
 
 EXPORT_SYMBOL (mpt_reset_deregister)
 
 EXPORT_SYMBOL (mpt_device_driver_register)
 
 EXPORT_SYMBOL (mpt_device_driver_deregister)
 
 EXPORT_SYMBOL (mpt_get_msg_frame)
 
 EXPORT_SYMBOL (mpt_put_msg_frame)
 
 EXPORT_SYMBOL (mpt_put_msg_frame_hi_pri)
 
 EXPORT_SYMBOL (mpt_free_msg_frame)
 
 EXPORT_SYMBOL (mpt_send_handshake_request)
 
 EXPORT_SYMBOL (mpt_verify_adapter)
 
 EXPORT_SYMBOL (mpt_GetIocState)
 
 EXPORT_SYMBOL (mpt_print_ioc_summary)
 
 EXPORT_SYMBOL (mpt_HardResetHandler)
 
 EXPORT_SYMBOL (mpt_config)
 
 EXPORT_SYMBOL (mpt_findImVolumes)
 
 EXPORT_SYMBOL (mpt_alloc_fw_memory)
 
 EXPORT_SYMBOL (mpt_free_fw_memory)
 
 EXPORT_SYMBOL (mptbase_sas_persist_operation)
 
 EXPORT_SYMBOL (mpt_raid_phys_disk_pg0)
 
 module_init (fusion_init)
 
 module_exit (fusion_exit)
 

Variables

int mpt_fwfault_debug
 

Macro Definition Documentation

#define CHIPREG_PIO_READ32 (   addr)    inl((unsigned long)addr)

Definition at line 227 of file mptbase.c.

#define CHIPREG_PIO_WRITE32 (   addr,
  val 
)    outl(val, (unsigned long)addr)

Definition at line 226 of file mptbase.c.

#define CHIPREG_READ32 (   addr)    readl_relaxed(addr)

Definition at line 223 of file mptbase.c.

#define CHIPREG_READ32_dmasync (   addr)    readl(addr)

Definition at line 224 of file mptbase.c.

#define CHIPREG_WRITE32 (   addr,
  val 
)    writel(val, addr)

Definition at line 225 of file mptbase.c.

#define my_NAME   "Fusion MPT base driver"

Definition at line 73 of file mptbase.c.

#define my_VERSION   MPT_LINUX_VERSION_COMMON

Definition at line 74 of file mptbase.c.

#define MYNAM   "mptbase"

Definition at line 75 of file mptbase.c.

#define WHOINIT_UNKNOWN   0xAA

Definition at line 131 of file mptbase.c.

Function Documentation

EXPORT_SYMBOL ( mpt_fwfault_debug  )
EXPORT_SYMBOL ( mpt_raid_phys_disk_get_num_paths  )
EXPORT_SYMBOL ( mpt_raid_phys_disk_pg1  )
EXPORT_SYMBOL ( mpt_set_taskmgmt_in_progress_flag  )
EXPORT_SYMBOL ( mpt_halt_firmware  )
EXPORT_SYMBOL ( mpt_Soft_Hard_ResetHandler  )
EXPORT_SYMBOL ( mpt_attach  )
EXPORT_SYMBOL ( mpt_detach  )
EXPORT_SYMBOL ( ioc_list  )
EXPORT_SYMBOL ( mpt_register  )
EXPORT_SYMBOL ( mpt_deregister  )
EXPORT_SYMBOL ( mpt_event_register  )
EXPORT_SYMBOL ( mpt_event_deregister  )
EXPORT_SYMBOL ( mpt_reset_register  )
EXPORT_SYMBOL ( mpt_reset_deregister  )
EXPORT_SYMBOL ( mpt_device_driver_register  )
EXPORT_SYMBOL ( mpt_device_driver_deregister  )
EXPORT_SYMBOL ( mpt_get_msg_frame  )
EXPORT_SYMBOL ( mpt_put_msg_frame  )
EXPORT_SYMBOL ( mpt_put_msg_frame_hi_pri  )
EXPORT_SYMBOL ( mpt_free_msg_frame  )
EXPORT_SYMBOL ( mpt_send_handshake_request  )
EXPORT_SYMBOL ( mpt_verify_adapter  )
EXPORT_SYMBOL ( mpt_GetIocState  )
EXPORT_SYMBOL ( mpt_print_ioc_summary  )
EXPORT_SYMBOL ( mpt_HardResetHandler  )
EXPORT_SYMBOL ( mpt_config  )
EXPORT_SYMBOL ( mpt_findImVolumes  )
EXPORT_SYMBOL ( mpt_alloc_fw_memory  )
EXPORT_SYMBOL ( mpt_free_fw_memory  )
EXPORT_SYMBOL ( mptbase_sas_persist_operation  )
EXPORT_SYMBOL ( mpt_raid_phys_disk_pg0  )
LIST_HEAD ( ioc_list  )
MODULE_AUTHOR ( MODULEAUTHOR  )
MODULE_DESCRIPTION ( my_NAME  )
module_exit ( fusion_exit  )
module_init ( fusion_init  )
MODULE_LICENSE ( "GPL"  )
module_param ( mpt_msi_enable_spi  ,
int  ,
 
)
module_param ( mpt_msi_enable_fc  ,
int  ,
 
)
module_param ( mpt_msi_enable_sas  ,
int  ,
 
)
module_param ( mpt_channel_mapping  ,
int  ,
 
)
module_param ( mpt_fwfault_debug  ,
int  ,
0600   
)
module_param_call ( mpt_debug_level  ,
mpt_set_debug_level  ,
param_get_int  ,
mpt_debug_level,
0600   
)
MODULE_PARM_DESC ( mpt_msi_enable_spi  ,
" Enable MSI Support for SPI controllers (default=0)"   
)
MODULE_PARM_DESC ( mpt_msi_enable_fc  ,
" Enable MSI Support for FC controllers (default=0)"   
)
MODULE_PARM_DESC ( mpt_msi_enable_sas  ,
" Enable MSI Support for SAS controllers (default=0)"   
)
MODULE_PARM_DESC ( mpt_channel_mapping  ,
" Mapping id's to channels (default=0)"   
)
MODULE_PARM_DESC ( mpt_debug_level  ,
" debug level - refer to mptdebug.h - (default=0)"   
)
MODULE_PARM_DESC ( mpt_fwfault_debug  ,
"Enable detection of Firmware fault and halt Firmware on fault - (default=0)"   
)
MODULE_VERSION ( my_VERSION  )
int mpt_alloc_fw_memory ( MPT_ADAPTER *  ioc,
int  size 
)

mpt_alloc_fw_memory - allocate firmware memory : Pointer to MPT_ADAPTER structure : total FW bytes

If memory has already been allocated, the same (cached) value is returned.

Return 0 if successful, or non-zero for failure

Definition at line 3501 of file mptbase.c.

int mpt_attach ( struct pci_dev pdev,
const struct pci_device_id id 
)

mpt_attach - Install a PCI intelligent MPT adapter. : Pointer to pci_dev structure : PCI device ID information

This routine performs all the steps necessary to bring the IOC of a MPT adapter to a OPERATIONAL state. This includes registering memory regions, registering the interrupt, and allocating request and reply memory pools.

This routine also pre-fetches the LAN MAC address of a Fibre Channel MPT adapter.

Returns 0 for success, non-zero for failure.

TODO: Add support for polled controllers

Definition at line 1778 of file mptbase.c.

void mpt_clear_taskmgmt_in_progress_flag ( MPT_ADAPTER *  ioc)

mpt_clear_taskmgmt_in_progress_flag - clear flags associated with task management : Pointer to MPT_ADAPTER structure

Definition at line 6955 of file mptbase.c.

int mpt_config ( MPT_ADAPTER *  ioc,
CONFIGPARMS *  pCfg 
)

mpt_config - Generic function to issue config message : Pointer to an adapter structure : Pointer to a configuration structure. Struct contains action, page address, direction, physical address and pointer to a configuration page header Page header is updated.

Returns 0 for success -EPERM if not allowed due to ISR context -EAGAIN if no msg frames currently available -EFAULT for non-successful reply or no reply (timeout)

Definition at line 6347 of file mptbase.c.

void mpt_deregister ( u8  cb_idx)

mpt_deregister - Deregister a protocol drivers resources. : previously registered callback handle

Each protocol-specific driver should call this routine when its module is unloaded.

Definition at line 739 of file mptbase.c.

void mpt_detach ( struct pci_dev pdev)

mpt_detach - Remove a PCI intelligent MPT adapter. : Pointer to pci_dev structure

Definition at line 2060 of file mptbase.c.

void mpt_device_driver_deregister ( u8  cb_idx)

mpt_device_driver_deregister - DeRegister device driver hooks : MPT protocol driver index

Definition at line 862 of file mptbase.c.

int mpt_device_driver_register ( struct mpt_pci_driver *  dd_cbfunc,
u8  cb_idx 
)

mpt_device_driver_register - Register device driver hooks : driver callbacks struct : MPT protocol driver index

Definition at line 835 of file mptbase.c.

void mpt_event_deregister ( u8  cb_idx)

mpt_event_deregister - Deregister protocol-specific event callback handler : previously registered callback handle

Each protocol-specific driver should call this routine when it does not (or can no longer) handle events, or when its module is unloaded.

Definition at line 781 of file mptbase.c.

int mpt_event_register ( u8  cb_idx,
MPT_EVHANDLER  ev_cbfunc 
)

mpt_event_register - Register protocol-specific event callback handler. : previously registered (via mpt_register) callback handle : callback function

This routine can be called by one or more protocol-specific drivers if/when they choose to be notified of MPT events.

Returns 0 for success.

Definition at line 762 of file mptbase.c.

int mpt_findImVolumes ( MPT_ADAPTER *  ioc)

mpt_findImVolumes - Identify IDs of hidden disks and RAID Volumes : Pointer to a Adapter Strucutre

Return: 0 on success -EFAULT if read of config page header fails or data pointer not NULL -ENOMEM if pci_alloc failed

Definition at line 5959 of file mptbase.c.

void mpt_free_fw_memory ( MPT_ADAPTER *  ioc)

mpt_free_fw_memory - free firmware memory : Pointer to MPT_ADAPTER structure

If alt_img is NULL, delete from ioc structure. Else, delete a secondary image in same format.

Definition at line 3538 of file mptbase.c.

void mpt_free_msg_frame ( MPT_ADAPTER *  ioc,
MPT_FRAME_HDR *  mf 
)

mpt_free_msg_frame - Place MPT request frame back on FreeQ. : Pointer to MPT adapter structure : Pointer to MPT request frame

This routine places a MPT request frame back on the MPT adapter's FreeQ.

Definition at line 1030 of file mptbase.c.

MPT_FRAME_HDR* mpt_get_msg_frame ( u8  cb_idx,
MPT_ADAPTER *  ioc 
)

mpt_get_msg_frame - Obtain an MPT request frame from the pool : Handle of registered MPT protocol driver : Pointer to MPT adapter structure

Obtain an MPT request frame from the pool (of 1024) that are allocated per MPT adapter.

Returns pointer to a MPT request frame or NULL if none are available or IOC is not active.

Definition at line 894 of file mptbase.c.

u32 mpt_GetIocState ( MPT_ADAPTER *  ioc,
int  cooked 
)

mpt_GetIocState - Get the current state of a MPT adapter. : Pointer to MPT_ADAPTER structure : Request raw or cooked IOC state

Returns all IOC Doorbell register bits if cooked==0, else just the Doorbell bits in MPI_IOC_STATE_MASK.

Definition at line 3041 of file mptbase.c.

void mpt_halt_firmware ( MPT_ADAPTER *  ioc)

mpt_halt_firmware - Halts the firmware if it is operational and panic the kernel : Pointer to MPT_ADAPTER structure

Definition at line 6978 of file mptbase.c.

int mpt_HardResetHandler ( MPT_ADAPTER *  ioc,
int  sleepFlag 
)

mpt_HardResetHandler - Generic reset handler : Pointer to MPT_ADAPTER structure : Indicates if sleep or schedule must be called.

Issues SCSI Task Management call based on input arg values. If TaskMgmt fails, returns associated SCSI request.

Remark: _HardResetHandler can be invoked from an interrupt thread (timer) or a non-interrupt thread. In the former, must not call schedule().

Note: A return of -1 is a FATAL error case, as it means a FW reload/initialization failed.

Returns 0 for SUCCESS or -1 if FAILED.

Definition at line 7184 of file mptbase.c.

void mpt_print_ioc_summary ( MPT_ADAPTER *  ioc,
char buffer,
int size,
int  len,
int  showlan 
)

mpt_print_ioc_summary - Write ASCII summary of IOC to a buffer. : Pointer to MPT_ADAPTER structure : Pointer to buffer where IOC summary info should be written : Pointer to number of bytes we wrote (set by this routine) : Offset at which to start writing in buffer : Display LAN stuff?

This routine writes (english readable) ASCII text, which represents a summary of IOC information, to a buffer.

Definition at line 6849 of file mptbase.c.

void mpt_put_msg_frame ( u8  cb_idx,
MPT_ADAPTER *  ioc,
MPT_FRAME_HDR *  mf 
)

mpt_put_msg_frame - Send a protocol-specific MPT request frame to an IOC : Handle of registered MPT protocol driver : Pointer to MPT adapter structure : Pointer to MPT request frame

This routine posts an MPT request frame to the request post FIFO of a specific MPT adapter.

Definition at line 963 of file mptbase.c.

void mpt_put_msg_frame_hi_pri ( u8  cb_idx,
MPT_ADAPTER *  ioc,
MPT_FRAME_HDR *  mf 
)

mpt_put_msg_frame_hi_pri - Send a hi-pri protocol-specific MPT request frame : Handle of registered MPT protocol driver : Pointer to MPT adapter structure : Pointer to MPT request frame

Send a protocol-specific MPT request frame to an IOC using hi-priority request queue.

This routine posts an MPT request frame to the request post FIFO of a specific MPT adapter.

Definition at line 999 of file mptbase.c.

int mpt_raid_phys_disk_get_num_paths ( MPT_ADAPTER *  ioc,
u8  phys_disk_num 
)

mpt_raid_phys_disk_get_num_paths - returns number paths associated to this phys_num : Pointer to a Adapter Structure : io unit unique phys disk num generated by the ioc

Return: returns number paths

Definition at line 5803 of file mptbase.c.

int mpt_raid_phys_disk_pg0 ( MPT_ADAPTER *  ioc,
u8  phys_disk_num,
RaidPhysDiskPage0_t phys_disk 
)

mpt_raid_phys_disk_pg0 - returns phys disk page zero : Pointer to a Adapter Structure : io unit unique phys disk num generated by the ioc : requested payload data returned

Return: 0 on success -EFAULT if read of config page header fails or data pointer not NULL -ENOMEM if pci_alloc failed

Definition at line 5735 of file mptbase.c.

int mpt_raid_phys_disk_pg1 ( MPT_ADAPTER *  ioc,
u8  phys_disk_num,
RaidPhysDiskPage1_t phys_disk 
)

mpt_raid_phys_disk_pg1 - returns phys disk page 1 : Pointer to a Adapter Structure : io unit unique phys disk num generated by the ioc : requested payload data returned

Return: 0 on success -EFAULT if read of config page header fails or data pointer not NULL -ENOMEM if pci_alloc failed

Definition at line 5871 of file mptbase.c.

u8 mpt_register ( MPT_CALLBACK  cbfunc,
MPT_DRIVER_CLASS  dclass,
char func_name 
)

mpt_register - Register protocol-specific main callback handler. : callback function pointer : Protocol driver's class (MPT_DRIVER_CLASS enum value) : call function's name

This routine is called by a protocol-specific driver (SCSI host, LAN, SCSI target) to register its reply callback routine. Each protocol-specific driver must do this before it will be able to use any IOC resources, such as obtaining request frames.

NOTES: The SCSI protocol driver currently calls this routine thrice in order to register separate callbacks; one for "normal" SCSI IO; one for MptScsiTaskMgmt requests; one for Scan/DV requests.

Returns u8 valued "handle" in the range (and S.O.D. order) {N,...,7,6,5,...,1} if successful. A return value of MPT_MAX_PROTOCOL_DRIVERS (including zero!) should be considered an error by the caller.

Definition at line 706 of file mptbase.c.

void mpt_reset_deregister ( u8  cb_idx)

mpt_reset_deregister - Deregister protocol-specific IOC reset handler. : previously registered callback handle

Each protocol-specific driver should call this routine when it does not (or can no longer) handle IOC reset handling, or when its module is unloaded.

Definition at line 820 of file mptbase.c.

int mpt_reset_register ( u8  cb_idx,
MPT_RESETHANDLER  reset_func 
)

mpt_reset_register - Register protocol-specific IOC reset handler. : previously registered (via mpt_register) callback handle : reset function

This routine can be called by one or more protocol-specific drivers if/when they choose to be notified of IOC resets.

Returns 0 for success.

Definition at line 801 of file mptbase.c.

int mpt_send_handshake_request ( u8  cb_idx,
MPT_ADAPTER *  ioc,
int  reqBytes,
u32 req,
int  sleepFlag 
)

mpt_send_handshake_request - Send MPT request via doorbell handshake method. : Handle of registered MPT protocol driver : Pointer to MPT adapter structure : Size of the request in bytes : Pointer to MPT request frame : Use schedule if CAN_SLEEP else use udelay.

This routine is used exclusively to send MptScsiTaskMgmt requests since they are required to be sent via doorbell handshake.

NOTE: It is the callers responsibility to byte-swap fields in the request which are greater than 1 byte in size.

Returns 0 for success, non-zero for failure.

Definition at line 1188 of file mptbase.c.

int mpt_set_taskmgmt_in_progress_flag ( MPT_ADAPTER *  ioc)

mpt_set_taskmgmt_in_progress_flag - set flags associated with task management : Pointer to MPT_ADAPTER structure

Returns 0 for SUCCESS or -1 if FAILED.

If -1 is return, then it was not possible to set the flags

Definition at line 6925 of file mptbase.c.

int mpt_Soft_Hard_ResetHandler ( MPT_ADAPTER *  ioc,
int  sleepFlag 
)

mpt_Soft_Hard_ResetHandler - Try less expensive reset : Pointer to MPT_ADAPTER structure : Indicates if sleep or schedule must be called.

Returns 0 for SUCCESS or -1 if FAILED. Try for softreset first, only if it fails go for expensive HardReset.

Definition at line 7151 of file mptbase.c.

int mpt_SoftResetHandler ( MPT_ADAPTER *  ioc,
int  sleepFlag 
)

mpt_SoftResetHandler - Issues a less expensive reset : Pointer to MPT_ADAPTER structure : Indicates if sleep or schedule must be called.

Returns 0 for SUCCESS or -1 if FAILED.

Message Unit Reset - instructs the IOC to reset the Reply Post and Free FIFO's. All the Message Frames on Reply Free FIFO are discarded. All posted buffers are freed, and event notification is turned off. IOC doesn't reply to any outstanding request. This will transfer IOC to READY state.

Definition at line 7011 of file mptbase.c.

int mpt_verify_adapter ( int  iocid,
MPT_ADAPTER **  iocpp 
)

mpt_verify_adapter - Given IOC identifier, set pointer to its adapter structure. : IOC unique identifier (integer) : Pointer to pointer to IOC adapter

Given a unique IOC identifier, set pointer to the associated MPT adapter structure.

Returns iocid and sets iocpp if iocid is found. Returns -1 if iocid is not found.

Definition at line 1385 of file mptbase.c.

int mptbase_sas_persist_operation ( MPT_ADAPTER *  ioc,
u8  persist_opcode 
)

mptbase_sas_persist_operation - Perform operation on SAS Persistent Table : Pointer to MPT_ADAPTER structure : see below

MPI_SAS_OP_CLEAR_NOT_PRESENT - Free all persist TargetID mappings for devices not currently present. MPI_SAS_OP_CLEAR_ALL_PERSISTENT - Clear al persist TargetID mappings

NOTE: Don't use not this function during interrupt time.

Returns 0 for success, non-zero error

Definition at line 5069 of file mptbase.c.

Variable Documentation

int mpt_fwfault_debug

Definition at line 112 of file mptbase.c.