diff options
author | Kashyap, Desai <kashyap.desai@lsi.com> | 2009-05-29 07:16:50 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2009-06-09 18:29:45 -0400 |
commit | ea2a788de4ce5ebab09276e25443f55592af2335 (patch) | |
tree | 22f062d2cd47ec004ddfa7ef05ec548e7ada5f45 /drivers/message/fusion/mptbase.h | |
parent | e7deff3374cc5951f914dcb3c66bc1b8de8a084e (diff) |
[SCSI] mpt fusion: rewrite of ioctl_cmds internal generated function
1) rewrite of ioctl_cmds internal generated function that issue commands to
firmware, porting them to be single threaded using the generic MPT_MGMT
struct. All wait Queues are replace by completion Queue.
2) added seperate callback handler for ioctl task managment
(mptctl_taskmgmt_reply), to handle command that timeout
3) rewrite mptctl_bus_reset
Signed-off-by: Kashyap Desai <kadesai@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/message/fusion/mptbase.h')
-rw-r--r-- | drivers/message/fusion/mptbase.h | 21 |
1 files changed, 6 insertions, 15 deletions
diff --git a/drivers/message/fusion/mptbase.h b/drivers/message/fusion/mptbase.h index a0bf7d88fcfc..24d60128bfe6 100644 --- a/drivers/message/fusion/mptbase.h +++ b/drivers/message/fusion/mptbase.h | |||
@@ -434,18 +434,6 @@ do { \ | |||
434 | 434 | ||
435 | #define MPTCTL_RESET_OK 0x01 /* Issue Bus Reset */ | 435 | #define MPTCTL_RESET_OK 0x01 /* Issue Bus Reset */ |
436 | 436 | ||
437 | typedef struct _MPT_IOCTL { | ||
438 | struct _MPT_ADAPTER *ioc; | ||
439 | u8 ReplyFrame[MPT_DEFAULT_FRAME_SIZE]; /* reply frame data */ | ||
440 | u8 sense[MPT_SENSE_BUFFER_ALLOC]; | ||
441 | int wait_done; /* wake-up value for this ioc */ | ||
442 | u8 rsvd; | ||
443 | u8 status; /* current command status */ | ||
444 | u8 reset; /* 1 if bus reset allowed */ | ||
445 | u8 id; /* target for reset */ | ||
446 | struct mutex ioctl_mutex; | ||
447 | } MPT_IOCTL; | ||
448 | |||
449 | #define MPT_MGMT_STATUS_RF_VALID 0x01 /* The Reply Frame is VALID */ | 437 | #define MPT_MGMT_STATUS_RF_VALID 0x01 /* The Reply Frame is VALID */ |
450 | #define MPT_MGMT_STATUS_COMMAND_GOOD 0x02 /* Command Status GOOD */ | 438 | #define MPT_MGMT_STATUS_COMMAND_GOOD 0x02 /* Command Status GOOD */ |
451 | #define MPT_MGMT_STATUS_PENDING 0x04 /* command is pending */ | 439 | #define MPT_MGMT_STATUS_PENDING 0x04 /* command is pending */ |
@@ -460,6 +448,10 @@ typedef struct _MPT_IOCTL { | |||
460 | status = MPT_MGMT_STATUS_PENDING; | 448 | status = MPT_MGMT_STATUS_PENDING; |
461 | #define CLEAR_MGMT_STATUS(status) \ | 449 | #define CLEAR_MGMT_STATUS(status) \ |
462 | status = 0; | 450 | status = 0; |
451 | #define CLEAR_MGMT_PENDING_STATUS(status) \ | ||
452 | status &= ~MPT_MGMT_STATUS_PENDING; | ||
453 | #define SET_MGMT_MSG_CONTEXT(msg_context, value) \ | ||
454 | msg_context = value; | ||
463 | 455 | ||
464 | typedef struct _MPT_MGMT { | 456 | typedef struct _MPT_MGMT { |
465 | struct mutex mutex; | 457 | struct mutex mutex; |
@@ -468,6 +460,7 @@ typedef struct _MPT_MGMT { | |||
468 | u8 sense[MPT_SENSE_BUFFER_ALLOC]; | 460 | u8 sense[MPT_SENSE_BUFFER_ALLOC]; |
469 | u8 status; /* current command status */ | 461 | u8 status; /* current command status */ |
470 | int completion_code; | 462 | int completion_code; |
463 | u32 msg_context; | ||
471 | } MPT_MGMT; | 464 | } MPT_MGMT; |
472 | 465 | ||
473 | /* | 466 | /* |
@@ -654,7 +647,6 @@ typedef struct _MPT_ADAPTER | |||
654 | RaidCfgData raid_data; /* Raid config. data */ | 647 | RaidCfgData raid_data; /* Raid config. data */ |
655 | SasCfgData sas_data; /* Sas config. data */ | 648 | SasCfgData sas_data; /* Sas config. data */ |
656 | FcCfgData fc_data; /* Fc config. data */ | 649 | FcCfgData fc_data; /* Fc config. data */ |
657 | MPT_IOCTL *ioctl; /* ioctl data pointer */ | ||
658 | struct proc_dir_entry *ioc_dentry; | 650 | struct proc_dir_entry *ioc_dentry; |
659 | struct _MPT_ADAPTER *alt_ioc; /* ptr to 929 bound adapter port */ | 651 | struct _MPT_ADAPTER *alt_ioc; /* ptr to 929 bound adapter port */ |
660 | u32 biosVersion; /* BIOS version from IO Unit Page 2 */ | 652 | u32 biosVersion; /* BIOS version from IO Unit Page 2 */ |
@@ -711,6 +703,7 @@ typedef struct _MPT_ADAPTER | |||
711 | MPT_MGMT mptbase_cmds; /* for sending config pages */ | 703 | MPT_MGMT mptbase_cmds; /* for sending config pages */ |
712 | MPT_MGMT internal_cmds; | 704 | MPT_MGMT internal_cmds; |
713 | MPT_MGMT taskmgmt_cmds; | 705 | MPT_MGMT taskmgmt_cmds; |
706 | MPT_MGMT ioctl_cmds; | ||
714 | spinlock_t taskmgmt_lock; /* diagnostic reset lock */ | 707 | spinlock_t taskmgmt_lock; /* diagnostic reset lock */ |
715 | int taskmgmt_in_progress; | 708 | int taskmgmt_in_progress; |
716 | u8 taskmgmt_quiesce_io; | 709 | u8 taskmgmt_quiesce_io; |
@@ -855,10 +848,8 @@ typedef struct _MPT_SCSI_HOST { | |||
855 | /* Pool of memory for holding SCpnts before doing | 848 | /* Pool of memory for holding SCpnts before doing |
856 | * OS callbacks. freeQ is the free pool. | 849 | * OS callbacks. freeQ is the free pool. |
857 | */ | 850 | */ |
858 | u8 tmPending; | ||
859 | u8 negoNvram; /* DV disabled, nego NVRAM */ | 851 | u8 negoNvram; /* DV disabled, nego NVRAM */ |
860 | u8 pad1; | 852 | u8 pad1; |
861 | u8 tmState; | ||
862 | u8 rsvd[2]; | 853 | u8 rsvd[2]; |
863 | MPT_FRAME_HDR *cmdPtr; /* Ptr to nonOS request */ | 854 | MPT_FRAME_HDR *cmdPtr; /* Ptr to nonOS request */ |
864 | struct scsi_cmnd *abortSCpnt; | 855 | struct scsi_cmnd *abortSCpnt; |