Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Typedefs | Functions | Variables
mptscsih.h File Reference

Go to the source code of this file.

Data Structures

struct  _internal_cmd
 

Macros

#define MPT_SCANDV_GOOD   (0x00000000) /* must be 0 */
 
#define MPT_SCANDV_DID_RESET   (0x00000001)
 
#define MPT_SCANDV_SENSE   (0x00000002)
 
#define MPT_SCANDV_SOME_ERROR   (0x00000004)
 
#define MPT_SCANDV_SELECTION_TIMEOUT   (0x00000008)
 
#define MPT_SCANDV_ISSUE_SENSE   (0x00000010)
 
#define MPT_SCANDV_FALLBACK   (0x00000020)
 
#define MPT_SCANDV_BUSY   (0x00000040)
 
#define MPT_SCANDV_MAX_RETRIES   (10)
 
#define MPT_ICFLAG_BUF_CAP   0x01 /* ReadBuffer Read Capacity format */
 
#define MPT_ICFLAG_ECHO   0x02 /* ReadBuffer Echo buffer format */
 
#define MPT_ICFLAG_EBOS   0x04 /* ReadBuffer Echo buffer has EBOS */
 
#define MPT_ICFLAG_PHYS_DISK   0x08 /* Any SCSI IO but do Phys Disk Format */
 
#define MPT_ICFLAG_TAGGED_CMD   0x10 /* Do tagged IO */
 
#define MPT_ICFLAG_DID_RESET   0x20 /* Bus Reset occurred with this command */
 
#define MPT_ICFLAG_RESERVED   0x40 /* Reserved has been issued */
 
#define MPT_SCSI_CMD_PER_DEV_HIGH   64
 
#define MPT_SCSI_CMD_PER_DEV_LOW   32
 
#define MPT_SCSI_CMD_PER_LUN   7
 
#define MPT_SCSI_MAX_SECTORS   8192
 
#define MPTSCSIH_DOMAIN_VALIDATION   1
 
#define MPTSCSIH_MAX_WIDTH   1
 
#define MPTSCSIH_MIN_SYNC   0x08
 
#define MPTSCSIH_SAF_TE   0
 
#define MPTSCSIH_PT_CLEAR   0
 

Typedefs

typedef struct _internal_cmd INTERNAL_CMD
 

Functions

void mptscsih_remove (struct pci_dev *)
 
void mptscsih_shutdown (struct pci_dev *)
 
int mptscsih_proc_info (struct Scsi_Host *host, char *buffer, char **start, off_t offset, int length, int func)
 
const charmptscsih_info (struct Scsi_Host *SChost)
 
int mptscsih_qcmd (struct scsi_cmnd *SCpnt, void(*done)(struct scsi_cmnd *))
 
int mptscsih_IssueTaskMgmt (MPT_SCSI_HOST *hd, u8 type, u8 channel, u8 id, int lun, int ctx2abort, ulong timeout)
 
void mptscsih_slave_destroy (struct scsi_device *device)
 
int mptscsih_slave_configure (struct scsi_device *device)
 
int mptscsih_abort (struct scsi_cmnd *SCpnt)
 
int mptscsih_dev_reset (struct scsi_cmnd *SCpnt)
 
int mptscsih_bus_reset (struct scsi_cmnd *SCpnt)
 
int mptscsih_host_reset (struct scsi_cmnd *SCpnt)
 
int mptscsih_bios_param (struct scsi_device *sdev, struct block_device *bdev, sector_t capacity, int geom[])
 
int mptscsih_io_done (MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, MPT_FRAME_HDR *r)
 
int mptscsih_taskmgmt_complete (MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, MPT_FRAME_HDR *r)
 
int mptscsih_scandv_complete (MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, MPT_FRAME_HDR *r)
 
int mptscsih_event_process (MPT_ADAPTER *ioc, EventNotificationReply_t *pEvReply)
 
int mptscsih_ioc_reset (MPT_ADAPTER *ioc, int post_reset)
 
int mptscsih_change_queue_depth (struct scsi_device *sdev, int qdepth, int reason)
 
u8 mptscsih_raid_id_to_num (MPT_ADAPTER *ioc, u8 channel, u8 id)
 
int mptscsih_is_phys_disk (MPT_ADAPTER *ioc, u8 channel, u8 id)
 
struct scsi_cmndmptscsih_get_scsi_lookup (MPT_ADAPTER *ioc, int i)
 
void mptscsih_taskmgmt_response_code (MPT_ADAPTER *ioc, u8 response_code)
 
void mptscsih_flush_running_cmds (MPT_SCSI_HOST *hd)
 

Variables

struct device_attributemptscsih_host_attrs []
 

Macro Definition Documentation

#define MPT_ICFLAG_BUF_CAP   0x01 /* ReadBuffer Read Capacity format */

Definition at line 67 of file mptscsih.h.

#define MPT_ICFLAG_DID_RESET   0x20 /* Bus Reset occurred with this command */

Definition at line 72 of file mptscsih.h.

#define MPT_ICFLAG_EBOS   0x04 /* ReadBuffer Echo buffer has EBOS */

Definition at line 69 of file mptscsih.h.

#define MPT_ICFLAG_ECHO   0x02 /* ReadBuffer Echo buffer format */

Definition at line 68 of file mptscsih.h.

#define MPT_ICFLAG_PHYS_DISK   0x08 /* Any SCSI IO but do Phys Disk Format */

Definition at line 70 of file mptscsih.h.

#define MPT_ICFLAG_RESERVED   0x40 /* Reserved has been issued */

Definition at line 73 of file mptscsih.h.

#define MPT_ICFLAG_TAGGED_CMD   0x10 /* Do tagged IO */

Definition at line 71 of file mptscsih.h.

#define MPT_SCANDV_BUSY   (0x00000040)

Definition at line 63 of file mptscsih.h.

#define MPT_SCANDV_DID_RESET   (0x00000001)

Definition at line 57 of file mptscsih.h.

#define MPT_SCANDV_FALLBACK   (0x00000020)

Definition at line 62 of file mptscsih.h.

#define MPT_SCANDV_GOOD   (0x00000000) /* must be 0 */

Definition at line 56 of file mptscsih.h.

#define MPT_SCANDV_ISSUE_SENSE   (0x00000010)

Definition at line 61 of file mptscsih.h.

#define MPT_SCANDV_MAX_RETRIES   (10)

Definition at line 65 of file mptscsih.h.

#define MPT_SCANDV_SELECTION_TIMEOUT   (0x00000008)

Definition at line 60 of file mptscsih.h.

#define MPT_SCANDV_SENSE   (0x00000002)

Definition at line 58 of file mptscsih.h.

#define MPT_SCANDV_SOME_ERROR   (0x00000004)

Definition at line 59 of file mptscsih.h.

#define MPT_SCSI_CMD_PER_DEV_HIGH   64

Definition at line 75 of file mptscsih.h.

#define MPT_SCSI_CMD_PER_DEV_LOW   32

Definition at line 76 of file mptscsih.h.

#define MPT_SCSI_CMD_PER_LUN   7

Definition at line 78 of file mptscsih.h.

#define MPT_SCSI_MAX_SECTORS   8192

Definition at line 80 of file mptscsih.h.

#define MPTSCSIH_DOMAIN_VALIDATION   1

Definition at line 85 of file mptscsih.h.

#define MPTSCSIH_MAX_WIDTH   1

Definition at line 86 of file mptscsih.h.

#define MPTSCSIH_MIN_SYNC   0x08

Definition at line 87 of file mptscsih.h.

#define MPTSCSIH_PT_CLEAR   0

Definition at line 89 of file mptscsih.h.

#define MPTSCSIH_SAF_TE   0

Definition at line 88 of file mptscsih.h.

Typedef Documentation

Function Documentation

int mptscsih_abort ( struct scsi_cmnd SCpnt)

mptscsih_abort - Abort linux scsi_cmnd routine, new_eh variant : Pointer to scsi_cmnd structure, IO to be aborted

(linux scsi_host_template.eh_abort_handler routine)

Returns SUCCESS or FAILED.

Definition at line 1775 of file mptscsih.c.

int mptscsih_bios_param ( struct scsi_device sdev,
struct block_device bdev,
sector_t  capacity,
int  geom[] 
)

Definition at line 2178 of file mptscsih.c.

int mptscsih_bus_reset ( struct scsi_cmnd SCpnt)

mptscsih_bus_reset - Perform a SCSI BUS_RESET! new_eh variant : Pointer to scsi_cmnd structure, IO which reset is due to

(linux scsi_host_template.eh_bus_reset_handler routine)

Returns SUCCESS or FAILED.

Definition at line 1958 of file mptscsih.c.

int mptscsih_change_queue_depth ( struct scsi_device sdev,
int  qdepth,
int  reason 
)

Definition at line 2407 of file mptscsih.c.

int mptscsih_dev_reset ( struct scsi_cmnd SCpnt)

mptscsih_dev_reset - Perform a SCSI TARGET_RESET! new_eh variant : Pointer to scsi_cmnd structure, IO which reset is due to

(linux scsi_host_template.eh_dev_reset_handler routine)

Returns SUCCESS or FAILED.

Definition at line 1898 of file mptscsih.c.

int mptscsih_event_process ( MPT_ADAPTER *  ioc,
EventNotificationReply_t pEvReply 
)

Definition at line 2686 of file mptscsih.c.

void mptscsih_flush_running_cmds ( MPT_SCSI_HOST *  hd)

Definition at line 1029 of file mptscsih.c.

struct scsi_cmnd* mptscsih_get_scsi_lookup ( MPT_ADAPTER *  ioc,
int  i 
)
read

mptscsih_get_scsi_lookup - retrieves scmd entry : Pointer to MPT_ADAPTER structure : index into the array

Returns the scsi_cmd pointer

Definition at line 2572 of file mptscsih.c.

int mptscsih_host_reset ( struct scsi_cmnd SCpnt)

mptscsih_host_reset - Perform a SCSI host adapter RESET (new_eh variant) : Pointer to scsi_cmnd structure, IO which reset is due to

(linux scsi_host_template.eh_host_reset_handler routine)

Returns SUCCESS or FAILED.

Definition at line 2008 of file mptscsih.c.

const char* mptscsih_info ( struct Scsi_Host SChost)

mptscsih_info - Return information about MPT adapter : Pointer to Scsi_Host structure

(linux scsi_host_template.info routine)

Returns pointer to buffer where information was written.

Definition at line 1266 of file mptscsih.c.

int mptscsih_io_done ( MPT_ADAPTER *  ioc,
MPT_FRAME_HDR *  mf,
MPT_FRAME_HDR *  r 
)

Definition at line 588 of file mptscsih.c.

int mptscsih_ioc_reset ( MPT_ADAPTER *  ioc,
int  post_reset 
)

Definition at line 2651 of file mptscsih.c.

int mptscsih_is_phys_disk ( MPT_ADAPTER *  ioc,
u8  channel,
u8  id 
)

Definition at line 2217 of file mptscsih.c.

int mptscsih_IssueTaskMgmt ( MPT_SCSI_HOST *  hd,
u8  type,
u8  channel,
u8  id,
int  lun,
int  ctx2abort,
ulong  timeout 
)

mptscsih_IssueTaskMgmt - Generic send Task Management function. : Pointer to MPT_SCSI_HOST structure : Task Management type : channel number for task management : Logical Target ID for reset (if appropriate) : Logical Unit for reset (if appropriate) : Context for the task to be aborted (if appropriate) : timeout for task management control

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.

Definition at line 1606 of file mptscsih.c.

int mptscsih_proc_info ( struct Scsi_Host host,
char buffer,
char **  start,
off_t  offset,
int  length,
int  func 
)

mptscsih_proc_info - Return information about MPT adapter : scsi host struct : if write, user data; if read, buffer for user : returns the buffer address : if write, 0; if read, the current offset into the buffer from the previous read. : if write, return length; : write = 1; read = 0

(linux scsi_host_template.info routine)

Definition at line 1362 of file mptscsih.c.

int mptscsih_qcmd ( struct scsi_cmnd SCpnt,
void(*)(struct scsi_cmnd *)  done 
)

mptscsih_qcmd - Primary Fusion MPT SCSI initiator IO start routine. : Pointer to scsi_cmnd structure : Pointer SCSI mid-layer IO completion function

(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)

Definition at line 1399 of file mptscsih.c.

u8 mptscsih_raid_id_to_num ( MPT_ADAPTER *  ioc,
u8  channel,
u8  id 
)

Definition at line 2295 of file mptscsih.c.

void mptscsih_remove ( struct pci_dev )

Definition at line 1171 of file mptscsih.c.

int mptscsih_scandv_complete ( MPT_ADAPTER *  ioc,
MPT_FRAME_HDR *  mf,
MPT_FRAME_HDR *  r 
)

Definition at line 2728 of file mptscsih.c.

void mptscsih_shutdown ( struct pci_dev )

Definition at line 1215 of file mptscsih.c.

int mptscsih_slave_configure ( struct scsi_device device)

Definition at line 2454 of file mptscsih.c.

void mptscsih_slave_destroy ( struct scsi_device device)

Definition at line 2376 of file mptscsih.c.

int mptscsih_taskmgmt_complete ( MPT_ADAPTER *  ioc,
MPT_FRAME_HDR *  mf,
MPT_FRAME_HDR *  r 
)

mptscsih_taskmgmt_complete - Registered with Fusion MPT base driver : Pointer to MPT_ADAPTER structure : Pointer to SCSI task mgmt request frame : Pointer to SCSI task mgmt reply frame

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.

Definition at line 2147 of file mptscsih.c.

void mptscsih_taskmgmt_response_code ( MPT_ADAPTER *  ioc,
u8  response_code 
)

Definition at line 2097 of file mptscsih.c.

Variable Documentation

struct device_attribute* mptscsih_host_attrs[]

Definition at line 3326 of file mptscsih.c.