Register protocol-specific main callback handler.
Parameters
Description
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
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.
Deregister a protocol drivers resources.
Parameters
Description
Each protocol-specific driver should call this routine when its module is unloaded.
Register protocol-specific event callback handler.
Parameters
Description
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.
Deregister protocol-specific event callback handler
Parameters
Description
Each protocol-specific driver should call this routine when it does not (or can no longer) handle events, or when its module is unloaded.
Register protocol-specific IOC reset handler.
Parameters
Description
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.
Deregister protocol-specific IOC reset handler.
Parameters
Description
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.
Register device driver hooks
Parameters
DeRegister device driver hooks
Parameters
Obtain an MPT request frame from the pool
Parameters
Description
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.
Send a protocol-specific MPT request frame to an IOC
Parameters
Description
This routine posts an MPT request frame to the request post FIFO of a specific MPT adapter.
Send a hi-pri protocol-specific MPT request frame
Parameters
Description
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.
Place MPT request frame back on FreeQ.
Parameters
Description
This routine places a MPT request frame back on the MPT adapter’s FreeQ.
Send MPT request via doorbell handshake method.
Parameters
Description
This routine is used exclusively to send MptScsiTaskMgmt requests since they are required to be sent via doorbell handshake.
NOTE
request which are greater than 1 byte in size.
Returns 0 for success, non-zero for failure.
Given IOC identifier, set pointer to its adapter structure.
Parameters
Description
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.
Install a PCI intelligent MPT adapter.
Parameters
Description
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
Remove a PCI intelligent MPT adapter.
Parameters
Fusion MPT base driver suspend routine.
Parameters
Fusion MPT base driver resume routine.
Parameters
Get the current state of a MPT adapter.
Parameters
Description
Returns all IOC Doorbell register bits if cooked==0, else just the Doorbell bits in MPI_IOC_STATE_MASK.
allocate firmware memory
Parameters
Description
If memory has already been allocated, the same (cached) value is returned.
Return 0 if successful, or non-zero for failure
free firmware memory
Parameters
Description
If alt_img is NULL, delete from ioc structure. Else, delete a secondary image in same format.
Perform operation on SAS Persistent Table
Parameters
Description
- 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
returns phys disk page zero
Parameters
Return
0 on success -EFAULT if read of config page header fails or data pointer not NULL -ENOMEM if pci_alloc failed
returns number paths associated to this phys_num
Parameters
Return
returns number paths
returns phys disk page 1
Parameters
Return
0 on success -EFAULT if read of config page header fails or data pointer not NULL -ENOMEM if pci_alloc failed
Identify IDs of hidden disks and RAID Volumes
Parameters
Return
0 on success -EFAULT if read of config page header fails or data pointer not NULL -ENOMEM if pci_alloc failed
Generic function to issue config message
Parameters
Description
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)
Write ASCII summary of IOC to a buffer.
Parameters
Description
This routine writes (english readable) ASCII text, which represents a summary of IOC information, to a buffer.
set flags associated with task management
Parameters
Description
Returns 0 for SUCCESS or -1 if FAILED.
If -1 is return, then it was not possible to set the flags
clear flags associated with task management
Parameters
Halts the firmware if it is operational and panic the kernel
Parameters
Try less expensive reset
Parameters
Description
Returns 0 for SUCCESS or -1 if FAILED. Try for softreset first, only if it fails go for expensive HardReset.
Generic reset handler
Parameters
Description
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
FW reload/initialization failed.
Returns 0 for SUCCESS or -1 if FAILED.
Return information about MPT adapter
Parameters
Description
(linux scsi_host_template.info routine)
Returns pointer to buffer where information was written.
Primary Fusion MPT SCSI initiator IO start routine.
Parameters
Description
(linux scsi_host_template.queuecommand routine) This is the primary SCSI IO start routine. Create a MPI SCSIIORequest from a linux scsi_cmnd request and send it to the IOC.
Returns 0. (rtn value discarded by linux scsi mid-layer)
Generic send Task Management function.
Parameters
Description
Remark: _HardResetHandler can be invoked from an interrupt thread (timer) or a non-interrupt thread. In the former, must not call schedule().
Not all fields are meaningfull for all task types.
Returns 0 for SUCCESS, or FAILED.
Abort linux scsi_cmnd routine, new_eh variant
Parameters
Description
(linux scsi_host_template.eh_abort_handler routine)
Returns SUCCESS or FAILED.
Perform a SCSI TARGET_RESET! new_eh variant
Parameters
Description
(linux scsi_host_template.eh_dev_reset_handler routine)
Returns SUCCESS or FAILED.
Perform a SCSI BUS_RESET! new_eh variant
Parameters
Description
(linux scsi_host_template.eh_bus_reset_handler routine)
Returns SUCCESS or FAILED.
Perform a SCSI host adapter RESET (new_eh variant)
Parameters
Description
(linux scsi_host_template.eh_host_reset_handler routine)
Returns SUCCESS or FAILED.
Registered with Fusion MPT base driver
Parameters
Description
This routine is called from mptbase.c::mpt_interrupt() at the completion of any SCSI task management request. This routine is registered with the MPT (base) driver at driver load/init time via the mpt_register() API call.
Returns 1 indicating alloc’d request frame ptr should be freed.
retrieves scmd entry
Parameters
Description
Returns the scsi_cmd pointer