diff options
author | James Smart <James.Smart@Emulex.Com> | 2009-05-22 14:51:39 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2009-06-08 12:21:29 -0400 |
commit | da0436e915a5c17ee79e72c1bf978a4ebb1cbf4d (patch) | |
tree | 7784646b7627117fa7849a901c85294fae905505 /drivers/scsi/lpfc/lpfc.h | |
parent | 3772a99175f5378b5001e8da364341a8b8226a4a (diff) |
[SCSI] lpfc 8.3.2 : Addition of SLI4 Interface - Base Support
Adds new hardware and interface definitions.
Adds new interface routines - utilizing the reorganized layout of the
driver. Adds SLI-4 specific functions for attachment, initialization,
teardown, etc.
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.h | 49 |
1 files changed, 44 insertions, 5 deletions
diff --git a/drivers/scsi/lpfc/lpfc.h b/drivers/scsi/lpfc/lpfc.h index 6c24c9aabe7b..13ac108a244c 100644 --- a/drivers/scsi/lpfc/lpfc.h +++ b/drivers/scsi/lpfc/lpfc.h | |||
@@ -105,9 +105,11 @@ struct lpfc_dma_pool { | |||
105 | }; | 105 | }; |
106 | 106 | ||
107 | struct hbq_dmabuf { | 107 | struct hbq_dmabuf { |
108 | struct lpfc_dmabuf hbuf; | ||
108 | struct lpfc_dmabuf dbuf; | 109 | struct lpfc_dmabuf dbuf; |
109 | uint32_t size; | 110 | uint32_t size; |
110 | uint32_t tag; | 111 | uint32_t tag; |
112 | struct lpfc_rcqe rcqe; | ||
111 | }; | 113 | }; |
112 | 114 | ||
113 | /* Priority bit. Set value to exceed low water mark in lpfc_mem. */ | 115 | /* Priority bit. Set value to exceed low water mark in lpfc_mem. */ |
@@ -141,7 +143,10 @@ typedef struct lpfc_vpd { | |||
141 | } rev; | 143 | } rev; |
142 | struct { | 144 | struct { |
143 | #ifdef __BIG_ENDIAN_BITFIELD | 145 | #ifdef __BIG_ENDIAN_BITFIELD |
144 | uint32_t rsvd2 :24; /* Reserved */ | 146 | uint32_t rsvd3 :19; /* Reserved */ |
147 | uint32_t cdss : 1; /* Configure Data Security SLI */ | ||
148 | uint32_t rsvd2 : 3; /* Reserved */ | ||
149 | uint32_t cbg : 1; /* Configure BlockGuard */ | ||
145 | uint32_t cmv : 1; /* Configure Max VPIs */ | 150 | uint32_t cmv : 1; /* Configure Max VPIs */ |
146 | uint32_t ccrp : 1; /* Config Command Ring Polling */ | 151 | uint32_t ccrp : 1; /* Config Command Ring Polling */ |
147 | uint32_t csah : 1; /* Configure Synchronous Abort Handling */ | 152 | uint32_t csah : 1; /* Configure Synchronous Abort Handling */ |
@@ -159,7 +164,10 @@ typedef struct lpfc_vpd { | |||
159 | uint32_t csah : 1; /* Configure Synchronous Abort Handling */ | 164 | uint32_t csah : 1; /* Configure Synchronous Abort Handling */ |
160 | uint32_t ccrp : 1; /* Config Command Ring Polling */ | 165 | uint32_t ccrp : 1; /* Config Command Ring Polling */ |
161 | uint32_t cmv : 1; /* Configure Max VPIs */ | 166 | uint32_t cmv : 1; /* Configure Max VPIs */ |
162 | uint32_t rsvd2 :24; /* Reserved */ | 167 | uint32_t cbg : 1; /* Configure BlockGuard */ |
168 | uint32_t rsvd2 : 3; /* Reserved */ | ||
169 | uint32_t cdss : 1; /* Configure Data Security SLI */ | ||
170 | uint32_t rsvd3 :19; /* Reserved */ | ||
163 | #endif | 171 | #endif |
164 | } sli3Feat; | 172 | } sli3Feat; |
165 | } lpfc_vpd_t; | 173 | } lpfc_vpd_t; |
@@ -280,6 +288,9 @@ struct lpfc_vport { | |||
280 | enum discovery_state port_state; | 288 | enum discovery_state port_state; |
281 | 289 | ||
282 | uint16_t vpi; | 290 | uint16_t vpi; |
291 | uint16_t vfi; | ||
292 | uint8_t vfi_state; | ||
293 | #define LPFC_VFI_REGISTERED 0x1 | ||
283 | 294 | ||
284 | uint32_t fc_flag; /* FC flags */ | 295 | uint32_t fc_flag; /* FC flags */ |
285 | /* Several of these flags are HBA centric and should be moved to | 296 | /* Several of these flags are HBA centric and should be moved to |
@@ -392,6 +403,9 @@ struct lpfc_vport { | |||
392 | #endif | 403 | #endif |
393 | uint8_t stat_data_enabled; | 404 | uint8_t stat_data_enabled; |
394 | uint8_t stat_data_blocked; | 405 | uint8_t stat_data_blocked; |
406 | struct list_head rcv_buffer_list; | ||
407 | uint32_t vport_flag; | ||
408 | #define STATIC_VPORT 1 | ||
395 | }; | 409 | }; |
396 | 410 | ||
397 | struct hbq_s { | 411 | struct hbq_s { |
@@ -494,6 +508,7 @@ struct lpfc_hba { | |||
494 | #define LPFC_SLI3_CRP_ENABLED 0x08 | 508 | #define LPFC_SLI3_CRP_ENABLED 0x08 |
495 | #define LPFC_SLI3_INB_ENABLED 0x10 | 509 | #define LPFC_SLI3_INB_ENABLED 0x10 |
496 | #define LPFC_SLI3_BG_ENABLED 0x20 | 510 | #define LPFC_SLI3_BG_ENABLED 0x20 |
511 | #define LPFC_SLI3_DSS_ENABLED 0x40 | ||
497 | uint32_t iocb_cmd_size; | 512 | uint32_t iocb_cmd_size; |
498 | uint32_t iocb_rsp_size; | 513 | uint32_t iocb_rsp_size; |
499 | 514 | ||
@@ -507,8 +522,13 @@ struct lpfc_hba { | |||
507 | 522 | ||
508 | uint32_t hba_flag; /* hba generic flags */ | 523 | uint32_t hba_flag; /* hba generic flags */ |
509 | #define HBA_ERATT_HANDLED 0x1 /* This flag is set when eratt handled */ | 524 | #define HBA_ERATT_HANDLED 0x1 /* This flag is set when eratt handled */ |
510 | 525 | #define DEFER_ERATT 0x2 /* Deferred error attention in progress */ | |
511 | #define DEFER_ERATT 0x4 /* Deferred error attention in progress */ | 526 | #define HBA_FCOE_SUPPORT 0x4 /* HBA function supports FCOE */ |
527 | #define HBA_RECEIVE_BUFFER 0x8 /* Rcv buffer posted to worker thread */ | ||
528 | #define HBA_POST_RECEIVE_BUFFER 0x10 /* Rcv buffers need to be posted */ | ||
529 | #define FCP_XRI_ABORT_EVENT 0x20 | ||
530 | #define ELS_XRI_ABORT_EVENT 0x40 | ||
531 | #define ASYNC_EVENT 0x80 | ||
512 | struct lpfc_dmabuf slim2p; | 532 | struct lpfc_dmabuf slim2p; |
513 | 533 | ||
514 | MAILBOX_t *mbox; | 534 | MAILBOX_t *mbox; |
@@ -567,6 +587,9 @@ struct lpfc_hba { | |||
567 | uint32_t cfg_poll; | 587 | uint32_t cfg_poll; |
568 | uint32_t cfg_poll_tmo; | 588 | uint32_t cfg_poll_tmo; |
569 | uint32_t cfg_use_msi; | 589 | uint32_t cfg_use_msi; |
590 | uint32_t cfg_fcp_imax; | ||
591 | uint32_t cfg_fcp_wq_count; | ||
592 | uint32_t cfg_fcp_eq_count; | ||
570 | uint32_t cfg_sg_seg_cnt; | 593 | uint32_t cfg_sg_seg_cnt; |
571 | uint32_t cfg_prot_sg_seg_cnt; | 594 | uint32_t cfg_prot_sg_seg_cnt; |
572 | uint32_t cfg_sg_dma_buf_size; | 595 | uint32_t cfg_sg_dma_buf_size; |
@@ -576,6 +599,8 @@ struct lpfc_hba { | |||
576 | uint32_t cfg_enable_hba_reset; | 599 | uint32_t cfg_enable_hba_reset; |
577 | uint32_t cfg_enable_hba_heartbeat; | 600 | uint32_t cfg_enable_hba_heartbeat; |
578 | uint32_t cfg_enable_bg; | 601 | uint32_t cfg_enable_bg; |
602 | uint32_t cfg_enable_fip; | ||
603 | uint32_t cfg_log_verbose; | ||
579 | 604 | ||
580 | lpfc_vpd_t vpd; /* vital product data */ | 605 | lpfc_vpd_t vpd; /* vital product data */ |
581 | 606 | ||
@@ -659,7 +684,8 @@ struct lpfc_hba { | |||
659 | /* pci_mem_pools */ | 684 | /* pci_mem_pools */ |
660 | struct pci_pool *lpfc_scsi_dma_buf_pool; | 685 | struct pci_pool *lpfc_scsi_dma_buf_pool; |
661 | struct pci_pool *lpfc_mbuf_pool; | 686 | struct pci_pool *lpfc_mbuf_pool; |
662 | struct pci_pool *lpfc_hbq_pool; | 687 | struct pci_pool *lpfc_hrb_pool; /* header receive buffer pool */ |
688 | struct pci_pool *lpfc_drb_pool; /* data receive buffer pool */ | ||
663 | struct lpfc_dma_pool lpfc_mbuf_safety_pool; | 689 | struct lpfc_dma_pool lpfc_mbuf_safety_pool; |
664 | 690 | ||
665 | mempool_t *mbox_mem_pool; | 691 | mempool_t *mbox_mem_pool; |
@@ -675,6 +701,14 @@ struct lpfc_hba { | |||
675 | struct lpfc_vport *pport; /* physical lpfc_vport pointer */ | 701 | struct lpfc_vport *pport; /* physical lpfc_vport pointer */ |
676 | uint16_t max_vpi; /* Maximum virtual nports */ | 702 | uint16_t max_vpi; /* Maximum virtual nports */ |
677 | #define LPFC_MAX_VPI 0xFFFF /* Max number of VPI supported */ | 703 | #define LPFC_MAX_VPI 0xFFFF /* Max number of VPI supported */ |
704 | uint16_t max_vports; /* | ||
705 | * For IOV HBAs max_vpi can change | ||
706 | * after a reset. max_vports is max | ||
707 | * number of vports present. This can | ||
708 | * be greater than max_vpi. | ||
709 | */ | ||
710 | uint16_t vpi_base; | ||
711 | uint16_t vfi_base; | ||
678 | unsigned long *vpi_bmask; /* vpi allocation table */ | 712 | unsigned long *vpi_bmask; /* vpi allocation table */ |
679 | 713 | ||
680 | /* Data structure used by fabric iocb scheduler */ | 714 | /* Data structure used by fabric iocb scheduler */ |
@@ -733,6 +767,11 @@ struct lpfc_hba { | |||
733 | /* Maximum number of events that can be outstanding at any time*/ | 767 | /* Maximum number of events that can be outstanding at any time*/ |
734 | #define LPFC_MAX_EVT_COUNT 512 | 768 | #define LPFC_MAX_EVT_COUNT 512 |
735 | atomic_t fast_event_count; | 769 | atomic_t fast_event_count; |
770 | struct lpfc_fcf fcf; | ||
771 | uint8_t fc_map[3]; | ||
772 | uint8_t valid_vlan; | ||
773 | uint16_t vlan_id; | ||
774 | struct list_head fcf_conn_rec_list; | ||
736 | }; | 775 | }; |
737 | 776 | ||
738 | static inline struct Scsi_Host * | 777 | static inline struct Scsi_Host * |