aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/message/fusion/mptbase.h
diff options
context:
space:
mode:
authorKashyap, Desai <kashyap.desai@lsi.com>2009-05-29 07:10:57 -0400
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2009-06-09 18:26:20 -0400
commitf0f09d3b3f06900d64971625d6753dea0623ed45 (patch)
tree896237d53275eeb6b4484c2cb747f0b333157c30 /drivers/message/fusion/mptbase.h
parentfd76175a7d3abf4d14df17f5f4c7e68b466b455d (diff)
[SCSI] mpt fusion: config path optimized, completion queue is used
1) Previously we had mutliple #defines to use same values. Now those #defines are optimized. MPT_IOCTL_STATUS_* is removed and MPT_MGMT_STATUS_* are new #defines. 2.) config path is optimized. Instead of wait Queue and timer, using completion Q. 3.) mpt_timer_expired is not used. [jejb: elide patch to eliminate mpt_timer_expired] 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.h45
1 files changed, 20 insertions, 25 deletions
diff --git a/drivers/message/fusion/mptbase.h b/drivers/message/fusion/mptbase.h
index 8cd0a16cdfac..41273fff4b01 100644
--- a/drivers/message/fusion/mptbase.h
+++ b/drivers/message/fusion/mptbase.h
@@ -432,14 +432,6 @@ do { \
432 * IOCTL structure and associated defines 432 * IOCTL structure and associated defines
433 */ 433 */
434 434
435#define MPT_IOCTL_STATUS_DID_IOCRESET 0x01 /* IOC Reset occurred on the current*/
436#define MPT_IOCTL_STATUS_RF_VALID 0x02 /* The Reply Frame is VALID */
437#define MPT_IOCTL_STATUS_TIMER_ACTIVE 0x04 /* The timer is running */
438#define MPT_IOCTL_STATUS_SENSE_VALID 0x08 /* Sense data is valid */
439#define MPT_IOCTL_STATUS_COMMAND_GOOD 0x10 /* Command Status GOOD */
440#define MPT_IOCTL_STATUS_TMTIMER_ACTIVE 0x20 /* The TM timer is running */
441#define MPT_IOCTL_STATUS_TM_FAILED 0x40 /* User TM request failed */
442
443#define MPTCTL_RESET_OK 0x01 /* Issue Bus Reset */ 435#define MPTCTL_RESET_OK 0x01 /* Issue Bus Reset */
444 436
445typedef struct _MPT_IOCTL { 437typedef struct _MPT_IOCTL {
@@ -454,16 +446,27 @@ typedef struct _MPT_IOCTL {
454 struct mutex ioctl_mutex; 446 struct mutex ioctl_mutex;
455} MPT_IOCTL; 447} MPT_IOCTL;
456 448
457#define MPT_SAS_MGMT_STATUS_RF_VALID 0x02 /* The Reply Frame is VALID */ 449#define MPT_MGMT_STATUS_RF_VALID 0x01 /* The Reply Frame is VALID */
458#define MPT_SAS_MGMT_STATUS_COMMAND_GOOD 0x10 /* Command Status GOOD */ 450#define MPT_MGMT_STATUS_COMMAND_GOOD 0x02 /* Command Status GOOD */
459#define MPT_SAS_MGMT_STATUS_TM_FAILED 0x40 /* User TM request failed */ 451#define MPT_MGMT_STATUS_PENDING 0x04 /* command is pending */
460 452#define MPT_MGMT_STATUS_DID_IOCRESET 0x08 /* IOC Reset occurred
461typedef struct _MPT_SAS_MGMT { 453 on the current*/
454#define MPT_MGMT_STATUS_SENSE_VALID 0x10 /* valid sense info */
455#define MPT_MGMT_STATUS_TIMER_ACTIVE 0x20 /* obsolete */
456#define MPT_MGMT_STATUS_FREE_MF 0x40 /* free the mf from
457 complete routine */
458
459#define INITIALIZE_MGMT_STATUS(status) \
460 status = MPT_MGMT_STATUS_PENDING;
461#define CLEAR_MGMT_STATUS(status) \
462 status = 0;
463
464typedef struct _MPT_MGMT {
462 struct mutex mutex; 465 struct mutex mutex;
463 struct completion done; 466 struct completion done;
464 u8 reply[MPT_DEFAULT_FRAME_SIZE]; /* reply frame data */ 467 u8 reply[MPT_DEFAULT_FRAME_SIZE]; /* reply frame data */
465 u8 status; /* current command status */ 468 u8 status; /* current command status */
466}MPT_SAS_MGMT; 469} MPT_MGMT;
467 470
468/* 471/*
469 * Event Structure and define 472 * Event Structure and define
@@ -661,7 +664,6 @@ typedef struct _MPT_ADAPTER
661 struct _mpt_ioctl_events *events; /* pointer to event log */ 664 struct _mpt_ioctl_events *events; /* pointer to event log */
662 u8 *cached_fw; /* Pointer to FW */ 665 u8 *cached_fw; /* Pointer to FW */
663 dma_addr_t cached_fw_dma; 666 dma_addr_t cached_fw_dma;
664 struct list_head configQ; /* linked list of config. requests */
665 int hs_reply_idx; 667 int hs_reply_idx;
666#ifndef MFCNT 668#ifndef MFCNT
667 u32 pad0; 669 u32 pad0;
@@ -674,9 +676,6 @@ typedef struct _MPT_ADAPTER
674 IOCFactsReply_t facts; 676 IOCFactsReply_t facts;
675 PortFactsReply_t pfacts[2]; 677 PortFactsReply_t pfacts[2];
676 FCPortPage0_t fc_port_page0[2]; 678 FCPortPage0_t fc_port_page0[2];
677 struct timer_list persist_timer; /* persist table timer */
678 int persist_wait_done; /* persist completion flag */
679 u8 persist_reply_frame[MPT_DEFAULT_FRAME_SIZE]; /* persist reply */
680 LANPage0_t lan_cnfg_page0; 679 LANPage0_t lan_cnfg_page0;
681 LANPage1_t lan_cnfg_page1; 680 LANPage1_t lan_cnfg_page1;
682 681
@@ -708,7 +707,8 @@ typedef struct _MPT_ADAPTER
708 u8 sas_discovery_ignore_events; 707 u8 sas_discovery_ignore_events;
709 u8 sas_discovery_quiesce_io; 708 u8 sas_discovery_quiesce_io;
710 int sas_index; /* index refrencing */ 709 int sas_index; /* index refrencing */
711 MPT_SAS_MGMT sas_mgmt; 710 MPT_MGMT sas_mgmt;
711 MPT_MGMT mptbase_cmds; /* for sending config pages */
712 struct work_struct sas_persist_task; 712 struct work_struct sas_persist_task;
713 713
714 struct work_struct fc_setup_reset_work; 714 struct work_struct fc_setup_reset_work;
@@ -884,21 +884,16 @@ struct scsi_cmnd;
884 * Generic structure passed to the base mpt_config function. 884 * Generic structure passed to the base mpt_config function.
885 */ 885 */
886typedef struct _x_config_parms { 886typedef struct _x_config_parms {
887 struct list_head linkage; /* linked list */
888 struct timer_list timer; /* timer function for this request */
889 union { 887 union {
890 ConfigExtendedPageHeader_t *ehdr; 888 ConfigExtendedPageHeader_t *ehdr;
891 ConfigPageHeader_t *hdr; 889 ConfigPageHeader_t *hdr;
892 } cfghdr; 890 } cfghdr;
893 dma_addr_t physAddr; 891 dma_addr_t physAddr;
894 int wait_done; /* wait for this request */
895 u32 pageAddr; /* properly formatted */ 892 u32 pageAddr; /* properly formatted */
893 u16 status;
896 u8 action; 894 u8 action;
897 u8 dir; 895 u8 dir;
898 u8 timeout; /* seconds */ 896 u8 timeout; /* seconds */
899 u8 pad1;
900 u16 status;
901 u16 pad2;
902} CONFIGPARMS; 897} CONFIGPARMS;
903 898
904/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ 899/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/