aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/lpfc/lpfc_hw4.h
diff options
context:
space:
mode:
authorJames Smart <james.smart@emulex.com>2011-03-11 16:05:35 -0500
committerJames Bottomley <James.Bottomley@suse.de>2011-03-23 12:36:03 -0400
commit5a6f133eea2d0b4f8f75367b803fef0f03acf268 (patch)
tree76c6b5cac1ba7b590289cb04f4a5e26fb631fc71 /drivers/scsi/lpfc/lpfc_hw4.h
parentd1e12de804f9d8ad114786ca7c2ce593cba79891 (diff)
[SCSI] lpfc 8.3.22: Add new mailbox command and new BSG fix
- Add new Queue Create Mailbox version support - Make lpfc_bsg_wake_mbox_wait routine check the mailboxes job reference before using it. Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_hw4.h')
-rw-r--r--drivers/scsi/lpfc/lpfc_hw4.h101
1 files changed, 71 insertions, 30 deletions
diff --git a/drivers/scsi/lpfc/lpfc_hw4.h b/drivers/scsi/lpfc/lpfc_hw4.h
index c7178d60c7bf..b42b6994fd94 100644
--- a/drivers/scsi/lpfc/lpfc_hw4.h
+++ b/drivers/scsi/lpfc/lpfc_hw4.h
@@ -711,21 +711,27 @@ struct lpfc_sli4_cfg_mhdr {
711union lpfc_sli4_cfg_shdr { 711union lpfc_sli4_cfg_shdr {
712 struct { 712 struct {
713 uint32_t word6; 713 uint32_t word6;
714#define lpfc_mbox_hdr_opcode_SHIFT 0 714#define lpfc_mbox_hdr_opcode_SHIFT 0
715#define lpfc_mbox_hdr_opcode_MASK 0x000000FF 715#define lpfc_mbox_hdr_opcode_MASK 0x000000FF
716#define lpfc_mbox_hdr_opcode_WORD word6 716#define lpfc_mbox_hdr_opcode_WORD word6
717#define lpfc_mbox_hdr_subsystem_SHIFT 8 717#define lpfc_mbox_hdr_subsystem_SHIFT 8
718#define lpfc_mbox_hdr_subsystem_MASK 0x000000FF 718#define lpfc_mbox_hdr_subsystem_MASK 0x000000FF
719#define lpfc_mbox_hdr_subsystem_WORD word6 719#define lpfc_mbox_hdr_subsystem_WORD word6
720#define lpfc_mbox_hdr_port_number_SHIFT 16 720#define lpfc_mbox_hdr_port_number_SHIFT 16
721#define lpfc_mbox_hdr_port_number_MASK 0x000000FF 721#define lpfc_mbox_hdr_port_number_MASK 0x000000FF
722#define lpfc_mbox_hdr_port_number_WORD word6 722#define lpfc_mbox_hdr_port_number_WORD word6
723#define lpfc_mbox_hdr_domain_SHIFT 24 723#define lpfc_mbox_hdr_domain_SHIFT 24
724#define lpfc_mbox_hdr_domain_MASK 0x000000FF 724#define lpfc_mbox_hdr_domain_MASK 0x000000FF
725#define lpfc_mbox_hdr_domain_WORD word6 725#define lpfc_mbox_hdr_domain_WORD word6
726 uint32_t timeout; 726 uint32_t timeout;
727 uint32_t request_length; 727 uint32_t request_length;
728 uint32_t reserved9; 728 uint32_t word9;
729#define lpfc_mbox_hdr_version_SHIFT 0
730#define lpfc_mbox_hdr_version_MASK 0x000000FF
731#define lpfc_mbox_hdr_version_WORD word9
732#define LPFC_Q_CREATE_VERSION_2 2
733#define LPFC_Q_CREATE_VERSION_1 1
734#define LPFC_Q_CREATE_VERSION_0 0
729 } request; 735 } request;
730 struct { 736 struct {
731 uint32_t word6; 737 uint32_t word6;
@@ -917,9 +923,12 @@ struct cq_context {
917#define LPFC_CQ_CNT_512 0x1 923#define LPFC_CQ_CNT_512 0x1
918#define LPFC_CQ_CNT_1024 0x2 924#define LPFC_CQ_CNT_1024 0x2
919 uint32_t word1; 925 uint32_t word1;
920#define lpfc_cq_eq_id_SHIFT 22 926#define lpfc_cq_eq_id_SHIFT 22 /* Version 0 Only */
921#define lpfc_cq_eq_id_MASK 0x000000FF 927#define lpfc_cq_eq_id_MASK 0x000000FF
922#define lpfc_cq_eq_id_WORD word1 928#define lpfc_cq_eq_id_WORD word1
929#define lpfc_cq_eq_id_2_SHIFT 0 /* Version 2 Only */
930#define lpfc_cq_eq_id_2_MASK 0x0000FFFF
931#define lpfc_cq_eq_id_2_WORD word1
923 uint32_t reserved0; 932 uint32_t reserved0;
924 uint32_t reserved1; 933 uint32_t reserved1;
925}; 934};
@@ -929,6 +938,9 @@ struct lpfc_mbx_cq_create {
929 union { 938 union {
930 struct { 939 struct {
931 uint32_t word0; 940 uint32_t word0;
941#define lpfc_mbx_cq_create_page_size_SHIFT 16 /* Version 2 Only */
942#define lpfc_mbx_cq_create_page_size_MASK 0x000000FF
943#define lpfc_mbx_cq_create_page_size_WORD word0
932#define lpfc_mbx_cq_create_num_pages_SHIFT 0 944#define lpfc_mbx_cq_create_num_pages_SHIFT 0
933#define lpfc_mbx_cq_create_num_pages_MASK 0x0000FFFF 945#define lpfc_mbx_cq_create_num_pages_MASK 0x0000FFFF
934#define lpfc_mbx_cq_create_num_pages_WORD word0 946#define lpfc_mbx_cq_create_num_pages_WORD word0
@@ -969,7 +981,7 @@ struct wq_context {
969struct lpfc_mbx_wq_create { 981struct lpfc_mbx_wq_create {
970 struct mbox_header header; 982 struct mbox_header header;
971 union { 983 union {
972 struct { 984 struct { /* Version 0 Request */
973 uint32_t word0; 985 uint32_t word0;
974#define lpfc_mbx_wq_create_num_pages_SHIFT 0 986#define lpfc_mbx_wq_create_num_pages_SHIFT 0
975#define lpfc_mbx_wq_create_num_pages_MASK 0x0000FFFF 987#define lpfc_mbx_wq_create_num_pages_MASK 0x0000FFFF
@@ -979,6 +991,23 @@ struct lpfc_mbx_wq_create {
979#define lpfc_mbx_wq_create_cq_id_WORD word0 991#define lpfc_mbx_wq_create_cq_id_WORD word0
980 struct dma_address page[LPFC_MAX_WQ_PAGE]; 992 struct dma_address page[LPFC_MAX_WQ_PAGE];
981 } request; 993 } request;
994 struct { /* Version 1 Request */
995 uint32_t word0; /* Word 0 is the same as in v0 */
996 uint32_t word1;
997#define lpfc_mbx_wq_create_page_size_SHIFT 0
998#define lpfc_mbx_wq_create_page_size_MASK 0x000000FF
999#define lpfc_mbx_wq_create_page_size_WORD word1
1000#define lpfc_mbx_wq_create_wqe_size_SHIFT 8
1001#define lpfc_mbx_wq_create_wqe_size_MASK 0x0000000F
1002#define lpfc_mbx_wq_create_wqe_size_WORD word1
1003#define LPFC_WQ_WQE_SIZE_64 0x5
1004#define LPFC_WQ_WQE_SIZE_128 0x6
1005#define lpfc_mbx_wq_create_wqe_count_SHIFT 16
1006#define lpfc_mbx_wq_create_wqe_count_MASK 0x0000FFFF
1007#define lpfc_mbx_wq_create_wqe_count_WORD word1
1008 uint32_t word2;
1009 struct dma_address page[LPFC_MAX_WQ_PAGE-1];
1010 } request_1;
982 struct { 1011 struct {
983 uint32_t word0; 1012 uint32_t word0;
984#define lpfc_mbx_wq_create_q_id_SHIFT 0 1013#define lpfc_mbx_wq_create_q_id_SHIFT 0
@@ -1007,13 +1036,22 @@ struct lpfc_mbx_wq_destroy {
1007#define LPFC_DATA_BUF_SIZE 2048 1036#define LPFC_DATA_BUF_SIZE 2048
1008struct rq_context { 1037struct rq_context {
1009 uint32_t word0; 1038 uint32_t word0;
1010#define lpfc_rq_context_rq_size_SHIFT 16 1039#define lpfc_rq_context_rqe_count_SHIFT 16 /* Version 0 Only */
1011#define lpfc_rq_context_rq_size_MASK 0x0000000F 1040#define lpfc_rq_context_rqe_count_MASK 0x0000000F
1012#define lpfc_rq_context_rq_size_WORD word0 1041#define lpfc_rq_context_rqe_count_WORD word0
1013#define LPFC_RQ_RING_SIZE_512 9 /* 512 entries */ 1042#define LPFC_RQ_RING_SIZE_512 9 /* 512 entries */
1014#define LPFC_RQ_RING_SIZE_1024 10 /* 1024 entries */ 1043#define LPFC_RQ_RING_SIZE_1024 10 /* 1024 entries */
1015#define LPFC_RQ_RING_SIZE_2048 11 /* 2048 entries */ 1044#define LPFC_RQ_RING_SIZE_2048 11 /* 2048 entries */
1016#define LPFC_RQ_RING_SIZE_4096 12 /* 4096 entries */ 1045#define LPFC_RQ_RING_SIZE_4096 12 /* 4096 entries */
1046#define lpfc_rq_context_rqe_count_1_SHIFT 16 /* Version 1 Only */
1047#define lpfc_rq_context_rqe_count_1_MASK 0x0000FFFF
1048#define lpfc_rq_context_rqe_count_1_WORD word0
1049#define lpfc_rq_context_rqe_size_SHIFT 8 /* Version 1 Only */
1050#define lpfc_rq_context_rqe_size_MASK 0x0000000F
1051#define lpfc_rq_context_rqe_size_WORD word0
1052#define lpfc_rq_context_page_size_SHIFT 0 /* Version 1 Only */
1053#define lpfc_rq_context_page_size_MASK 0x000000FF
1054#define lpfc_rq_context_page_size_WORD word0
1017 uint32_t reserved1; 1055 uint32_t reserved1;
1018 uint32_t word2; 1056 uint32_t word2;
1019#define lpfc_rq_context_cq_id_SHIFT 16 1057#define lpfc_rq_context_cq_id_SHIFT 16
@@ -1022,7 +1060,7 @@ struct rq_context {
1022#define lpfc_rq_context_buf_size_SHIFT 0 1060#define lpfc_rq_context_buf_size_SHIFT 0
1023#define lpfc_rq_context_buf_size_MASK 0x0000FFFF 1061#define lpfc_rq_context_buf_size_MASK 0x0000FFFF
1024#define lpfc_rq_context_buf_size_WORD word2 1062#define lpfc_rq_context_buf_size_WORD word2
1025 uint32_t reserved3; 1063 uint32_t buffer_size; /* Version 1 Only */
1026}; 1064};
1027 1065
1028struct lpfc_mbx_rq_create { 1066struct lpfc_mbx_rq_create {
@@ -1062,16 +1100,16 @@ struct lpfc_mbx_rq_destroy {
1062 1100
1063struct mq_context { 1101struct mq_context {
1064 uint32_t word0; 1102 uint32_t word0;
1065#define lpfc_mq_context_cq_id_SHIFT 22 1103#define lpfc_mq_context_cq_id_SHIFT 22 /* Version 0 Only */
1066#define lpfc_mq_context_cq_id_MASK 0x000003FF 1104#define lpfc_mq_context_cq_id_MASK 0x000003FF
1067#define lpfc_mq_context_cq_id_WORD word0 1105#define lpfc_mq_context_cq_id_WORD word0
1068#define lpfc_mq_context_count_SHIFT 16 1106#define lpfc_mq_context_ring_size_SHIFT 16
1069#define lpfc_mq_context_count_MASK 0x0000000F 1107#define lpfc_mq_context_ring_size_MASK 0x0000000F
1070#define lpfc_mq_context_count_WORD word0 1108#define lpfc_mq_context_ring_size_WORD word0
1071#define LPFC_MQ_CNT_16 0x5 1109#define LPFC_MQ_RING_SIZE_16 0x5
1072#define LPFC_MQ_CNT_32 0x6 1110#define LPFC_MQ_RING_SIZE_32 0x6
1073#define LPFC_MQ_CNT_64 0x7 1111#define LPFC_MQ_RING_SIZE_64 0x7
1074#define LPFC_MQ_CNT_128 0x8 1112#define LPFC_MQ_RING_SIZE_128 0x8
1075 uint32_t word1; 1113 uint32_t word1;
1076#define lpfc_mq_context_valid_SHIFT 31 1114#define lpfc_mq_context_valid_SHIFT 31
1077#define lpfc_mq_context_valid_MASK 0x00000001 1115#define lpfc_mq_context_valid_MASK 0x00000001
@@ -1105,9 +1143,12 @@ struct lpfc_mbx_mq_create_ext {
1105 union { 1143 union {
1106 struct { 1144 struct {
1107 uint32_t word0; 1145 uint32_t word0;
1108#define lpfc_mbx_mq_create_ext_num_pages_SHIFT 0 1146#define lpfc_mbx_mq_create_ext_num_pages_SHIFT 0
1109#define lpfc_mbx_mq_create_ext_num_pages_MASK 0x0000FFFF 1147#define lpfc_mbx_mq_create_ext_num_pages_MASK 0x0000FFFF
1110#define lpfc_mbx_mq_create_ext_num_pages_WORD word0 1148#define lpfc_mbx_mq_create_ext_num_pages_WORD word0
1149#define lpfc_mbx_mq_create_ext_cq_id_SHIFT 16 /* Version 1 Only */
1150#define lpfc_mbx_mq_create_ext_cq_id_MASK 0x0000FFFF
1151#define lpfc_mbx_mq_create_ext_cq_id_WORD word0
1111 uint32_t async_evt_bmap; 1152 uint32_t async_evt_bmap;
1112#define lpfc_mbx_mq_create_ext_async_evt_link_SHIFT LPFC_TRAILER_CODE_LINK 1153#define lpfc_mbx_mq_create_ext_async_evt_link_SHIFT LPFC_TRAILER_CODE_LINK
1113#define lpfc_mbx_mq_create_ext_async_evt_link_MASK 0x00000001 1154#define lpfc_mbx_mq_create_ext_async_evt_link_MASK 0x00000001