|
| 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) |
|
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.
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.
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.
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_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.
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.
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_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.