aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/lpfc/lpfc.h
diff options
context:
space:
mode:
authorJames Smart <James.Smart@Emulex.Com>2008-09-07 11:52:10 -0400
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2008-10-13 09:28:57 -0400
commitea2151b4e142fa2de0319d9dd80413a997bf435a (patch)
tree1daa395a0b8584431c1b739af2761a840d013985 /drivers/scsi/lpfc/lpfc.h
parent977b5a0af6d22a1a0170057c19cde37eeac68acd (diff)
[SCSI] lpfc 8.2.8 v2 : Add statistical reporting control and additional fc vendor events
Added support for new sysfs attributes: lpfc_stat_data_ctrl and lpfc_max_scsicmpl_time. The attributes control statistical reporting of io load. Added support for new fc vendor events for error reporting. Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/scsi/lpfc/lpfc.h')
-rw-r--r--drivers/scsi/lpfc/lpfc.h27
1 files changed, 15 insertions, 12 deletions
diff --git a/drivers/scsi/lpfc/lpfc.h b/drivers/scsi/lpfc/lpfc.h
index 3a500d683065..60a9e6e9384b 100644
--- a/drivers/scsi/lpfc/lpfc.h
+++ b/drivers/scsi/lpfc/lpfc.h
@@ -40,6 +40,8 @@ struct lpfc_sli2_slim;
40#define LPFC_MIN_TGT_QDEPTH 100 40#define LPFC_MIN_TGT_QDEPTH 100
41#define LPFC_MAX_TGT_QDEPTH 0xFFFF 41#define LPFC_MAX_TGT_QDEPTH 0xFFFF
42 42
43#define LPFC_MAX_BUCKET_COUNT 20 /* Maximum no. of buckets for stat data
44 collection. */
43/* 45/*
44 * Following time intervals are used of adjusting SCSI device 46 * Following time intervals are used of adjusting SCSI device
45 * queue depths when there are driver resource error or Firmware 47 * queue depths when there are driver resource error or Firmware
@@ -381,6 +383,8 @@ struct lpfc_vport {
381 struct lpfc_debugfs_trc *disc_trc; 383 struct lpfc_debugfs_trc *disc_trc;
382 atomic_t disc_trc_cnt; 384 atomic_t disc_trc_cnt;
383#endif 385#endif
386 uint8_t stat_data_enabled;
387 uint8_t stat_data_blocked;
384}; 388};
385 389
386struct hbq_s { 390struct hbq_s {
@@ -641,6 +645,17 @@ struct lpfc_hba {
641 uint32_t buffer_tag_count; 645 uint32_t buffer_tag_count;
642 int wait_4_mlo_maint_flg; 646 int wait_4_mlo_maint_flg;
643 wait_queue_head_t wait_4_mlo_m_q; 647 wait_queue_head_t wait_4_mlo_m_q;
648 /* data structure used for latency data collection */
649#define LPFC_NO_BUCKET 0
650#define LPFC_LINEAR_BUCKET 1
651#define LPFC_POWER2_BUCKET 2
652 uint8_t bucket_type;
653 uint32_t bucket_base;
654 uint32_t bucket_step;
655
656/* Maximum number of events that can be outstanding at any time*/
657#define LPFC_MAX_EVT_COUNT 512
658 atomic_t fast_event_count;
644}; 659};
645 660
646static inline struct Scsi_Host * 661static inline struct Scsi_Host *
@@ -699,15 +714,3 @@ lpfc_sli_read_hs(struct lpfc_hba *phba)
699 return; 714 return;
700} 715}
701 716
702#define FC_REG_DUMP_EVENT 0x10 /* Register for Dump events */
703#define FC_REG_TEMPERATURE_EVENT 0x20 /* Register for temperature
704 event */
705
706struct temp_event {
707 uint32_t event_type;
708 uint32_t event_code;
709 uint32_t data;
710};
711#define LPFC_CRIT_TEMP 0x1
712#define LPFC_THRESHOLD_TEMP 0x2
713#define LPFC_NORMAL_TEMP 0x3