diff options
Diffstat (limited to 'drivers/scsi/lpfc/lpfc.h')
-rw-r--r-- | drivers/scsi/lpfc/lpfc.h | 53 |
1 files changed, 46 insertions, 7 deletions
diff --git a/drivers/scsi/lpfc/lpfc.h b/drivers/scsi/lpfc/lpfc.h index ba3ecab9baf3..f26b9538affe 100644 --- a/drivers/scsi/lpfc/lpfc.h +++ b/drivers/scsi/lpfc/lpfc.h | |||
@@ -29,7 +29,8 @@ struct lpfc_sli2_slim; | |||
29 | #define LPFC_MAX_NS_RETRY 3 /* Number of retry attempts to contact | 29 | #define LPFC_MAX_NS_RETRY 3 /* Number of retry attempts to contact |
30 | the NameServer before giving up. */ | 30 | the NameServer before giving up. */ |
31 | #define LPFC_CMD_PER_LUN 3 /* max outstanding cmds per lun */ | 31 | #define LPFC_CMD_PER_LUN 3 /* max outstanding cmds per lun */ |
32 | #define LPFC_SG_SEG_CNT 64 /* sg element count per scsi cmnd */ | 32 | #define LPFC_DEFAULT_SG_SEG_CNT 64 /* sg element count per scsi cmnd */ |
33 | #define LPFC_MAX_SG_SEG_CNT 256 /* sg element count per scsi cmnd */ | ||
33 | #define LPFC_IOCB_LIST_CNT 2250 /* list of IOCBs for fast-path usage. */ | 34 | #define LPFC_IOCB_LIST_CNT 2250 /* list of IOCBs for fast-path usage. */ |
34 | #define LPFC_Q_RAMP_UP_INTERVAL 120 /* lun q_depth ramp up interval */ | 35 | #define LPFC_Q_RAMP_UP_INTERVAL 120 /* lun q_depth ramp up interval */ |
35 | 36 | ||
@@ -68,6 +69,7 @@ struct lpfc_dmabuf { | |||
68 | struct list_head list; | 69 | struct list_head list; |
69 | void *virt; /* virtual address ptr */ | 70 | void *virt; /* virtual address ptr */ |
70 | dma_addr_t phys; /* mapped address */ | 71 | dma_addr_t phys; /* mapped address */ |
72 | uint32_t buffer_tag; /* used for tagged queue ring */ | ||
71 | }; | 73 | }; |
72 | 74 | ||
73 | struct lpfc_dma_pool { | 75 | struct lpfc_dma_pool { |
@@ -272,10 +274,16 @@ struct lpfc_vport { | |||
272 | #define FC_ABORT_DISCOVERY 0x8000 /* we want to abort discovery */ | 274 | #define FC_ABORT_DISCOVERY 0x8000 /* we want to abort discovery */ |
273 | #define FC_NDISC_ACTIVE 0x10000 /* NPort discovery active */ | 275 | #define FC_NDISC_ACTIVE 0x10000 /* NPort discovery active */ |
274 | #define FC_BYPASSED_MODE 0x20000 /* NPort is in bypassed mode */ | 276 | #define FC_BYPASSED_MODE 0x20000 /* NPort is in bypassed mode */ |
275 | #define FC_RFF_NOT_SUPPORTED 0x40000 /* RFF_ID was rejected by switch */ | ||
276 | #define FC_VPORT_NEEDS_REG_VPI 0x80000 /* Needs to have its vpi registered */ | 277 | #define FC_VPORT_NEEDS_REG_VPI 0x80000 /* Needs to have its vpi registered */ |
277 | #define FC_RSCN_DEFERRED 0x100000 /* A deferred RSCN being processed */ | 278 | #define FC_RSCN_DEFERRED 0x100000 /* A deferred RSCN being processed */ |
278 | 279 | ||
280 | uint32_t ct_flags; | ||
281 | #define FC_CT_RFF_ID 0x1 /* RFF_ID accepted by switch */ | ||
282 | #define FC_CT_RNN_ID 0x2 /* RNN_ID accepted by switch */ | ||
283 | #define FC_CT_RSNN_NN 0x4 /* RSNN_NN accepted by switch */ | ||
284 | #define FC_CT_RSPN_ID 0x8 /* RSPN_ID accepted by switch */ | ||
285 | #define FC_CT_RFT_ID 0x10 /* RFT_ID accepted by switch */ | ||
286 | |||
279 | struct list_head fc_nodes; | 287 | struct list_head fc_nodes; |
280 | 288 | ||
281 | /* Keep counters for the number of entries in each list. */ | 289 | /* Keep counters for the number of entries in each list. */ |
@@ -344,6 +352,7 @@ struct lpfc_vport { | |||
344 | uint32_t cfg_discovery_threads; | 352 | uint32_t cfg_discovery_threads; |
345 | uint32_t cfg_log_verbose; | 353 | uint32_t cfg_log_verbose; |
346 | uint32_t cfg_max_luns; | 354 | uint32_t cfg_max_luns; |
355 | uint32_t cfg_enable_da_id; | ||
347 | 356 | ||
348 | uint32_t dev_loss_tmo_changed; | 357 | uint32_t dev_loss_tmo_changed; |
349 | 358 | ||
@@ -360,6 +369,7 @@ struct lpfc_vport { | |||
360 | 369 | ||
361 | struct hbq_s { | 370 | struct hbq_s { |
362 | uint16_t entry_count; /* Current number of HBQ slots */ | 371 | uint16_t entry_count; /* Current number of HBQ slots */ |
372 | uint16_t buffer_count; /* Current number of buffers posted */ | ||
363 | uint32_t next_hbqPutIdx; /* Index to next HBQ slot to use */ | 373 | uint32_t next_hbqPutIdx; /* Index to next HBQ slot to use */ |
364 | uint32_t hbqPutIdx; /* HBQ slot to use */ | 374 | uint32_t hbqPutIdx; /* HBQ slot to use */ |
365 | uint32_t local_hbqGetIdx; /* Local copy of Get index from Port */ | 375 | uint32_t local_hbqGetIdx; /* Local copy of Get index from Port */ |
@@ -377,6 +387,11 @@ struct hbq_s { | |||
377 | #define LPFC_ELS_HBQ 0 | 387 | #define LPFC_ELS_HBQ 0 |
378 | #define LPFC_EXTRA_HBQ 1 | 388 | #define LPFC_EXTRA_HBQ 1 |
379 | 389 | ||
390 | enum hba_temp_state { | ||
391 | HBA_NORMAL_TEMP, | ||
392 | HBA_OVER_TEMP | ||
393 | }; | ||
394 | |||
380 | struct lpfc_hba { | 395 | struct lpfc_hba { |
381 | struct lpfc_sli sli; | 396 | struct lpfc_sli sli; |
382 | uint32_t sli_rev; /* SLI2 or SLI3 */ | 397 | uint32_t sli_rev; /* SLI2 or SLI3 */ |
@@ -457,7 +472,8 @@ struct lpfc_hba { | |||
457 | uint64_t cfg_soft_wwnn; | 472 | uint64_t cfg_soft_wwnn; |
458 | uint64_t cfg_soft_wwpn; | 473 | uint64_t cfg_soft_wwpn; |
459 | uint32_t cfg_hba_queue_depth; | 474 | uint32_t cfg_hba_queue_depth; |
460 | 475 | uint32_t cfg_enable_hba_reset; | |
476 | uint32_t cfg_enable_hba_heartbeat; | ||
461 | 477 | ||
462 | lpfc_vpd_t vpd; /* vital product data */ | 478 | lpfc_vpd_t vpd; /* vital product data */ |
463 | 479 | ||
@@ -544,8 +560,7 @@ struct lpfc_hba { | |||
544 | struct list_head port_list; | 560 | struct list_head port_list; |
545 | struct lpfc_vport *pport; /* physical lpfc_vport pointer */ | 561 | struct lpfc_vport *pport; /* physical lpfc_vport pointer */ |
546 | uint16_t max_vpi; /* Maximum virtual nports */ | 562 | uint16_t max_vpi; /* Maximum virtual nports */ |
547 | #define LPFC_MAX_VPI 100 /* Max number of VPI supported */ | 563 | #define LPFC_MAX_VPI 0xFFFF /* Max number of VPI supported */ |
548 | #define LPFC_MAX_VPORTS (LPFC_MAX_VPI+1)/* Max number of VPorts supported */ | ||
549 | unsigned long *vpi_bmask; /* vpi allocation table */ | 564 | unsigned long *vpi_bmask; /* vpi allocation table */ |
550 | 565 | ||
551 | /* Data structure used by fabric iocb scheduler */ | 566 | /* Data structure used by fabric iocb scheduler */ |
@@ -563,16 +578,30 @@ struct lpfc_hba { | |||
563 | struct dentry *hba_debugfs_root; | 578 | struct dentry *hba_debugfs_root; |
564 | atomic_t debugfs_vport_count; | 579 | atomic_t debugfs_vport_count; |
565 | struct dentry *debug_hbqinfo; | 580 | struct dentry *debug_hbqinfo; |
566 | struct dentry *debug_dumpslim; | 581 | struct dentry *debug_dumpHostSlim; |
582 | struct dentry *debug_dumpHBASlim; | ||
567 | struct dentry *debug_slow_ring_trc; | 583 | struct dentry *debug_slow_ring_trc; |
568 | struct lpfc_debugfs_trc *slow_ring_trc; | 584 | struct lpfc_debugfs_trc *slow_ring_trc; |
569 | atomic_t slow_ring_trc_cnt; | 585 | atomic_t slow_ring_trc_cnt; |
570 | #endif | 586 | #endif |
571 | 587 | ||
588 | /* Used for deferred freeing of ELS data buffers */ | ||
589 | struct list_head elsbuf; | ||
590 | int elsbuf_cnt; | ||
591 | int elsbuf_prev_cnt; | ||
592 | |||
593 | uint8_t temp_sensor_support; | ||
572 | /* Fields used for heart beat. */ | 594 | /* Fields used for heart beat. */ |
573 | unsigned long last_completion_time; | 595 | unsigned long last_completion_time; |
574 | struct timer_list hb_tmofunc; | 596 | struct timer_list hb_tmofunc; |
575 | uint8_t hb_outstanding; | 597 | uint8_t hb_outstanding; |
598 | /* | ||
599 | * Following bit will be set for all buffer tags which are not | ||
600 | * associated with any HBQ. | ||
601 | */ | ||
602 | #define QUE_BUFTAG_BIT (1<<31) | ||
603 | uint32_t buffer_tag_count; | ||
604 | enum hba_temp_state over_temp_state; | ||
576 | }; | 605 | }; |
577 | 606 | ||
578 | static inline struct Scsi_Host * | 607 | static inline struct Scsi_Host * |
@@ -598,5 +627,15 @@ lpfc_is_link_up(struct lpfc_hba *phba) | |||
598 | phba->link_state == LPFC_HBA_READY; | 627 | phba->link_state == LPFC_HBA_READY; |
599 | } | 628 | } |
600 | 629 | ||
601 | #define FC_REG_DUMP_EVENT 0x10 /* Register for Dump events */ | 630 | #define FC_REG_DUMP_EVENT 0x10 /* Register for Dump events */ |
631 | #define FC_REG_TEMPERATURE_EVENT 0x20 /* Register for temperature | ||
632 | event */ | ||
602 | 633 | ||
634 | struct temp_event { | ||
635 | uint32_t event_type; | ||
636 | uint32_t event_code; | ||
637 | uint32_t data; | ||
638 | }; | ||
639 | #define LPFC_CRIT_TEMP 0x1 | ||
640 | #define LPFC_THRESHOLD_TEMP 0x2 | ||
641 | #define LPFC_NORMAL_TEMP 0x3 | ||