aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/lpfc/lpfc_sli.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_sli.h')
-rw-r--r--drivers/scsi/lpfc/lpfc_sli.h30
1 files changed, 24 insertions, 6 deletions
diff --git a/drivers/scsi/lpfc/lpfc_sli.h b/drivers/scsi/lpfc/lpfc_sli.h
index 883938652a6a..3c53316cf6d0 100644
--- a/drivers/scsi/lpfc/lpfc_sli.h
+++ b/drivers/scsi/lpfc/lpfc_sli.h
@@ -29,13 +29,23 @@ typedef enum _lpfc_ctx_cmd {
29 LPFC_CTX_HOST 29 LPFC_CTX_HOST
30} lpfc_ctx_cmd; 30} lpfc_ctx_cmd;
31 31
32/* This structure is used to carry the needed response IOCB states */
33struct lpfc_sli4_rspiocb_info {
34 uint8_t hw_status;
35 uint8_t bfield;
36#define LPFC_XB 0x1
37#define LPFC_PV 0x2
38 uint8_t priority;
39 uint8_t reserved;
40};
41
32/* This structure is used to handle IOCB requests / responses */ 42/* This structure is used to handle IOCB requests / responses */
33struct lpfc_iocbq { 43struct lpfc_iocbq {
34 /* lpfc_iocbqs are used in double linked lists */ 44 /* lpfc_iocbqs are used in double linked lists */
35 struct list_head list; 45 struct list_head list;
36 struct list_head clist; 46 struct list_head clist;
37 uint16_t iotag; /* pre-assigned IO tag */ 47 uint16_t iotag; /* pre-assigned IO tag */
38 uint16_t rsvd1; 48 uint16_t sli4_xritag; /* pre-assigned XRI, (OXID) tag. */
39 49
40 IOCB_t iocb; /* IOCB cmd */ 50 IOCB_t iocb; /* IOCB cmd */
41 uint8_t retry; /* retry counter for IOCB cmd - if needed */ 51 uint8_t retry; /* retry counter for IOCB cmd - if needed */
@@ -46,6 +56,7 @@ struct lpfc_iocbq {
46#define LPFC_DRIVER_ABORTED 8 /* driver aborted this request */ 56#define LPFC_DRIVER_ABORTED 8 /* driver aborted this request */
47#define LPFC_IO_FABRIC 0x10 /* Iocb send using fabric scheduler */ 57#define LPFC_IO_FABRIC 0x10 /* Iocb send using fabric scheduler */
48#define LPFC_DELAY_MEM_FREE 0x20 /* Defer free'ing of FC data */ 58#define LPFC_DELAY_MEM_FREE 0x20 /* Defer free'ing of FC data */
59#define LPFC_FIP_ELS 0x40
49 60
50 uint8_t abort_count; 61 uint8_t abort_count;
51 uint8_t rsvd2; 62 uint8_t rsvd2;
@@ -65,7 +76,7 @@ struct lpfc_iocbq {
65 struct lpfc_iocbq *); 76 struct lpfc_iocbq *);
66 void (*iocb_cmpl) (struct lpfc_hba *, struct lpfc_iocbq *, 77 void (*iocb_cmpl) (struct lpfc_hba *, struct lpfc_iocbq *,
67 struct lpfc_iocbq *); 78 struct lpfc_iocbq *);
68 79 struct lpfc_sli4_rspiocb_info sli4_info;
69}; 80};
70 81
71#define SLI_IOCB_RET_IOCB 1 /* Return IOCB if cmd ring full */ 82#define SLI_IOCB_RET_IOCB 1 /* Return IOCB if cmd ring full */
@@ -81,14 +92,18 @@ struct lpfc_iocbq {
81typedef struct lpfcMboxq { 92typedef struct lpfcMboxq {
82 /* MBOXQs are used in single linked lists */ 93 /* MBOXQs are used in single linked lists */
83 struct list_head list; /* ptr to next mailbox command */ 94 struct list_head list; /* ptr to next mailbox command */
84 MAILBOX_t mb; /* Mailbox cmd */ 95 union {
85 struct lpfc_vport *vport;/* virutal port pointer */ 96 MAILBOX_t mb; /* Mailbox cmd */
97 struct lpfc_mqe mqe;
98 } u;
99 struct lpfc_vport *vport;/* virtual port pointer */
86 void *context1; /* caller context information */ 100 void *context1; /* caller context information */
87 void *context2; /* caller context information */ 101 void *context2; /* caller context information */
88 102
89 void (*mbox_cmpl) (struct lpfc_hba *, struct lpfcMboxq *); 103 void (*mbox_cmpl) (struct lpfc_hba *, struct lpfcMboxq *);
90 uint8_t mbox_flag; 104 uint8_t mbox_flag;
91 105 struct lpfc_mcqe mcqe;
106 struct lpfc_mbx_nembed_sge_virt *sge_array;
92} LPFC_MBOXQ_t; 107} LPFC_MBOXQ_t;
93 108
94#define MBX_POLL 1 /* poll mailbox till command done, then 109#define MBX_POLL 1 /* poll mailbox till command done, then
@@ -230,10 +245,11 @@ struct lpfc_sli {
230 245
231 /* Additional sli_flags */ 246 /* Additional sli_flags */
232#define LPFC_SLI_MBOX_ACTIVE 0x100 /* HBA mailbox is currently active */ 247#define LPFC_SLI_MBOX_ACTIVE 0x100 /* HBA mailbox is currently active */
233#define LPFC_SLI2_ACTIVE 0x200 /* SLI2 overlay in firmware is active */ 248#define LPFC_SLI_ACTIVE 0x200 /* SLI in firmware is active */
234#define LPFC_PROCESS_LA 0x400 /* Able to process link attention */ 249#define LPFC_PROCESS_LA 0x400 /* Able to process link attention */
235#define LPFC_BLOCK_MGMT_IO 0x800 /* Don't allow mgmt mbx or iocb cmds */ 250#define LPFC_BLOCK_MGMT_IO 0x800 /* Don't allow mgmt mbx or iocb cmds */
236#define LPFC_MENLO_MAINT 0x1000 /* need for menl fw download */ 251#define LPFC_MENLO_MAINT 0x1000 /* need for menl fw download */
252#define LPFC_SLI_ASYNC_MBX_BLK 0x2000 /* Async mailbox is blocked */
237 253
238 struct lpfc_sli_ring ring[LPFC_MAX_RING]; 254 struct lpfc_sli_ring ring[LPFC_MAX_RING];
239 int fcp_ring; /* ring used for FCP initiator commands */ 255 int fcp_ring; /* ring used for FCP initiator commands */
@@ -261,6 +277,8 @@ struct lpfc_sli {
261 277
262#define LPFC_MBOX_TMO 30 /* Sec tmo for outstanding mbox 278#define LPFC_MBOX_TMO 30 /* Sec tmo for outstanding mbox
263 command */ 279 command */
280#define LPFC_MBOX_SLI4_CONFIG_TMO 60 /* Sec tmo for outstanding mbox
281 command */
264#define LPFC_MBOX_TMO_FLASH_CMD 300 /* Sec tmo for outstanding FLASH write 282#define LPFC_MBOX_TMO_FLASH_CMD 300 /* Sec tmo for outstanding FLASH write
265 * or erase cmds. This is especially 283 * or erase cmds. This is especially
266 * long because of the potential of 284 * long because of the potential of