aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/lpfc
diff options
context:
space:
mode:
authorJames Smart <james.smart@emulex.com>2010-04-06 14:48:51 -0400
committerJames Bottomley <James.Bottomley@suse.de>2010-04-11 14:44:44 -0400
commitb19a061a785db22401b62cc4ee2baf95d5c7e2e7 (patch)
treecc5219324cd5a59455f195f51afe9807d3b07595 /drivers/scsi/lpfc
parent40364a40b68a26cc882df05f7cc7f0ad87aac935 (diff)
[SCSI] lpfc 8.3.12: Emulex SLI enhancements
- Add the new Logical Link speed event support. - Add RATOV and EDTOV to the REG_VFI mailbox command. 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')
-rw-r--r--drivers/scsi/lpfc/lpfc_hw.h1
-rw-r--r--drivers/scsi/lpfc/lpfc_hw4.h53
-rw-r--r--drivers/scsi/lpfc/lpfc_init.c30
-rw-r--r--drivers/scsi/lpfc/lpfc_mbox.c2
-rw-r--r--drivers/scsi/lpfc/lpfc_sli.c116
-rw-r--r--drivers/scsi/lpfc/lpfc_sli.h1
-rw-r--r--drivers/scsi/lpfc/lpfc_sli4.h4
7 files changed, 187 insertions, 20 deletions
diff --git a/drivers/scsi/lpfc/lpfc_hw.h b/drivers/scsi/lpfc/lpfc_hw.h
index 6c71ea416634..6ba1f307ccce 100644
--- a/drivers/scsi/lpfc/lpfc_hw.h
+++ b/drivers/scsi/lpfc/lpfc_hw.h
@@ -1500,6 +1500,7 @@ typedef struct { /* FireFly BIU registers */
1500#define MBXERR_BAD_RCV_LENGTH 14 1500#define MBXERR_BAD_RCV_LENGTH 14
1501#define MBXERR_DMA_ERROR 15 1501#define MBXERR_DMA_ERROR 15
1502#define MBXERR_ERROR 16 1502#define MBXERR_ERROR 16
1503#define MBXERR_UNKNOWN_CMD 18
1503#define MBXERR_LINK_DOWN 0x33 1504#define MBXERR_LINK_DOWN 0x33
1504#define MBX_NOT_FINISHED 255 1505#define MBX_NOT_FINISHED 255
1505 1506
diff --git a/drivers/scsi/lpfc/lpfc_hw4.h b/drivers/scsi/lpfc/lpfc_hw4.h
index bff98add80cd..bbdcf96800f6 100644
--- a/drivers/scsi/lpfc/lpfc_hw4.h
+++ b/drivers/scsi/lpfc/lpfc_hw4.h
@@ -787,6 +787,7 @@ struct mbox_header {
787#define LPFC_MBOX_OPCODE_EQ_DESTROY 0x37 787#define LPFC_MBOX_OPCODE_EQ_DESTROY 0x37
788#define LPFC_MBOX_OPCODE_QUERY_FW_CFG 0x3A 788#define LPFC_MBOX_OPCODE_QUERY_FW_CFG 0x3A
789#define LPFC_MBOX_OPCODE_FUNCTION_RESET 0x3D 789#define LPFC_MBOX_OPCODE_FUNCTION_RESET 0x3D
790#define LPFC_MBOX_OPCODE_MQ_CREATE_EXT 0x5A
790 791
791/* FCoE Opcodes */ 792/* FCoE Opcodes */
792#define LPFC_MBOX_OPCODE_FCOE_WQ_CREATE 0x01 793#define LPFC_MBOX_OPCODE_FCOE_WQ_CREATE 0x01
@@ -1108,6 +1109,39 @@ struct lpfc_mbx_mq_create {
1108 } u; 1109 } u;
1109}; 1110};
1110 1111
1112struct lpfc_mbx_mq_create_ext {
1113 struct mbox_header header;
1114 union {
1115 struct {
1116 uint32_t word0;
1117#define lpfc_mbx_mq_create_ext_num_pages_SHIFT 0
1118#define lpfc_mbx_mq_create_ext_num_pages_MASK 0x0000FFFF
1119#define lpfc_mbx_mq_create_ext_num_pages_WORD word0
1120 uint32_t async_evt_bmap;
1121#define lpfc_mbx_mq_create_ext_async_evt_link_SHIFT LPFC_TRAILER_CODE_LINK
1122#define lpfc_mbx_mq_create_ext_async_evt_link_MASK 0x00000001
1123#define lpfc_mbx_mq_create_ext_async_evt_link_WORD async_evt_bmap
1124#define lpfc_mbx_mq_create_ext_async_evt_fcfste_SHIFT LPFC_TRAILER_CODE_FCOE
1125#define lpfc_mbx_mq_create_ext_async_evt_fcfste_MASK 0x00000001
1126#define lpfc_mbx_mq_create_ext_async_evt_fcfste_WORD async_evt_bmap
1127#define lpfc_mbx_mq_create_ext_async_evt_group5_SHIFT LPFC_TRAILER_CODE_GRP5
1128#define lpfc_mbx_mq_create_ext_async_evt_group5_MASK 0x00000001
1129#define lpfc_mbx_mq_create_ext_async_evt_group5_WORD async_evt_bmap
1130 struct mq_context context;
1131 struct dma_address page[LPFC_MAX_MQ_PAGE];
1132 } request;
1133 struct {
1134 uint32_t word0;
1135#define lpfc_mbx_mq_create_q_id_SHIFT 0
1136#define lpfc_mbx_mq_create_q_id_MASK 0x0000FFFF
1137#define lpfc_mbx_mq_create_q_id_WORD word0
1138 } response;
1139 } u;
1140#define LPFC_ASYNC_EVENT_LINK_STATE 0x2
1141#define LPFC_ASYNC_EVENT_FCF_STATE 0x4
1142#define LPFC_ASYNC_EVENT_GROUP5 0x20
1143};
1144
1111struct lpfc_mbx_mq_destroy { 1145struct lpfc_mbx_mq_destroy {
1112 struct mbox_header header; 1146 struct mbox_header header;
1113 union { 1147 union {
@@ -1434,8 +1468,8 @@ struct lpfc_mbx_reg_vfi {
1434#define lpfc_reg_vfi_fcfi_WORD word2 1468#define lpfc_reg_vfi_fcfi_WORD word2
1435 uint32_t wwn[2]; 1469 uint32_t wwn[2];
1436 struct ulp_bde64 bde; 1470 struct ulp_bde64 bde;
1437 uint32_t word8_rsvd; 1471 uint32_t e_d_tov;
1438 uint32_t word9_rsvd; 1472 uint32_t r_a_tov;
1439 uint32_t word10; 1473 uint32_t word10;
1440#define lpfc_reg_vfi_nport_id_SHIFT 0 1474#define lpfc_reg_vfi_nport_id_SHIFT 0
1441#define lpfc_reg_vfi_nport_id_MASK 0x00FFFFFF 1475#define lpfc_reg_vfi_nport_id_MASK 0x00FFFFFF
@@ -2048,6 +2082,7 @@ struct lpfc_mqe {
2048 struct lpfc_mbx_reg_fcfi reg_fcfi; 2082 struct lpfc_mbx_reg_fcfi reg_fcfi;
2049 struct lpfc_mbx_unreg_fcfi unreg_fcfi; 2083 struct lpfc_mbx_unreg_fcfi unreg_fcfi;
2050 struct lpfc_mbx_mq_create mq_create; 2084 struct lpfc_mbx_mq_create mq_create;
2085 struct lpfc_mbx_mq_create_ext mq_create_ext;
2051 struct lpfc_mbx_eq_create eq_create; 2086 struct lpfc_mbx_eq_create eq_create;
2052 struct lpfc_mbx_cq_create cq_create; 2087 struct lpfc_mbx_cq_create cq_create;
2053 struct lpfc_mbx_wq_create wq_create; 2088 struct lpfc_mbx_wq_create wq_create;
@@ -2106,6 +2141,7 @@ struct lpfc_mcqe {
2106#define LPFC_TRAILER_CODE_LINK 0x1 2141#define LPFC_TRAILER_CODE_LINK 0x1
2107#define LPFC_TRAILER_CODE_FCOE 0x2 2142#define LPFC_TRAILER_CODE_FCOE 0x2
2108#define LPFC_TRAILER_CODE_DCBX 0x3 2143#define LPFC_TRAILER_CODE_DCBX 0x3
2144#define LPFC_TRAILER_CODE_GRP5 0x5
2109}; 2145};
2110 2146
2111struct lpfc_acqe_link { 2147struct lpfc_acqe_link {
@@ -2175,6 +2211,19 @@ struct lpfc_acqe_dcbx {
2175 uint32_t trailer; 2211 uint32_t trailer;
2176}; 2212};
2177 2213
2214struct lpfc_acqe_grp5 {
2215 uint32_t word0;
2216#define lpfc_acqe_grp5_pport_SHIFT 0
2217#define lpfc_acqe_grp5_pport_MASK 0x000000FF
2218#define lpfc_acqe_grp5_pport_WORD word0
2219 uint32_t word1;
2220#define lpfc_acqe_grp5_llink_spd_SHIFT 16
2221#define lpfc_acqe_grp5_llink_spd_MASK 0x0000FFFF
2222#define lpfc_acqe_grp5_llink_spd_WORD word1
2223 uint32_t event_tag;
2224 uint32_t trailer;
2225};
2226
2178/* 2227/*
2179 * Define the bootstrap mailbox (bmbx) region used to communicate 2228 * Define the bootstrap mailbox (bmbx) region used to communicate
2180 * mailbox command between the host and port. The mailbox consists 2229 * mailbox command between the host and port. The mailbox consists
diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c
index 56421c714bf8..8341d44fe87b 100644
--- a/drivers/scsi/lpfc/lpfc_init.c
+++ b/drivers/scsi/lpfc/lpfc_init.c
@@ -3526,6 +3526,32 @@ lpfc_sli4_async_dcbx_evt(struct lpfc_hba *phba,
3526} 3526}
3527 3527
3528/** 3528/**
3529 * lpfc_sli4_async_grp5_evt - Process the asynchronous group5 event
3530 * @phba: pointer to lpfc hba data structure.
3531 * @acqe_link: pointer to the async grp5 completion queue entry.
3532 *
3533 * This routine is to handle the SLI4 asynchronous grp5 event. A grp5 event
3534 * is an asynchronous notified of a logical link speed change. The Port
3535 * reports the logical link speed in units of 10Mbps.
3536 **/
3537static void
3538lpfc_sli4_async_grp5_evt(struct lpfc_hba *phba,
3539 struct lpfc_acqe_grp5 *acqe_grp5)
3540{
3541 uint16_t prev_ll_spd;
3542
3543 phba->fc_eventTag = acqe_grp5->event_tag;
3544 phba->fcoe_eventtag = acqe_grp5->event_tag;
3545 prev_ll_spd = phba->sli4_hba.link_state.logical_speed;
3546 phba->sli4_hba.link_state.logical_speed =
3547 (bf_get(lpfc_acqe_grp5_llink_spd, acqe_grp5));
3548 lpfc_printf_log(phba, KERN_INFO, LOG_SLI,
3549 "2789 GRP5 Async Event: Updating logical link speed "
3550 "from %dMbps to %dMbps\n", (prev_ll_spd * 10),
3551 (phba->sli4_hba.link_state.logical_speed*10));
3552}
3553
3554/**
3529 * lpfc_sli4_async_event_proc - Process all the pending asynchronous event 3555 * lpfc_sli4_async_event_proc - Process all the pending asynchronous event
3530 * @phba: pointer to lpfc hba data structure. 3556 * @phba: pointer to lpfc hba data structure.
3531 * 3557 *
@@ -3561,6 +3587,10 @@ void lpfc_sli4_async_event_proc(struct lpfc_hba *phba)
3561 lpfc_sli4_async_dcbx_evt(phba, 3587 lpfc_sli4_async_dcbx_evt(phba,
3562 &cq_event->cqe.acqe_dcbx); 3588 &cq_event->cqe.acqe_dcbx);
3563 break; 3589 break;
3590 case LPFC_TRAILER_CODE_GRP5:
3591 lpfc_sli4_async_grp5_evt(phba,
3592 &cq_event->cqe.acqe_grp5);
3593 break;
3564 default: 3594 default:
3565 lpfc_printf_log(phba, KERN_ERR, LOG_SLI, 3595 lpfc_printf_log(phba, KERN_ERR, LOG_SLI,
3566 "1804 Invalid asynchrous event code: " 3596 "1804 Invalid asynchrous event code: "
diff --git a/drivers/scsi/lpfc/lpfc_mbox.c b/drivers/scsi/lpfc/lpfc_mbox.c
index a6b7f5a0210b..f9b056ec6186 100644
--- a/drivers/scsi/lpfc/lpfc_mbox.c
+++ b/drivers/scsi/lpfc/lpfc_mbox.c
@@ -1899,6 +1899,8 @@ lpfc_reg_vfi(struct lpfcMboxq *mbox, struct lpfc_vport *vport, dma_addr_t phys)
1899 memcpy(reg_vfi->wwn, &vport->fc_portname, sizeof(struct lpfc_name)); 1899 memcpy(reg_vfi->wwn, &vport->fc_portname, sizeof(struct lpfc_name));
1900 reg_vfi->wwn[0] = cpu_to_le32(reg_vfi->wwn[0]); 1900 reg_vfi->wwn[0] = cpu_to_le32(reg_vfi->wwn[0]);
1901 reg_vfi->wwn[1] = cpu_to_le32(reg_vfi->wwn[1]); 1901 reg_vfi->wwn[1] = cpu_to_le32(reg_vfi->wwn[1]);
1902 reg_vfi->e_d_tov = vport->phba->fc_edtov;
1903 reg_vfi->r_a_tov = vport->phba->fc_ratov;
1902 reg_vfi->bde.addrHigh = putPaddrHigh(phys); 1904 reg_vfi->bde.addrHigh = putPaddrHigh(phys);
1903 reg_vfi->bde.addrLow = putPaddrLow(phys); 1905 reg_vfi->bde.addrLow = putPaddrLow(phys);
1904 reg_vfi->bde.tus.f.bdeSize = sizeof(vport->fc_sparam); 1906 reg_vfi->bde.tus.f.bdeSize = sizeof(vport->fc_sparam);
diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c
index 2f7018821531..2c88999b7095 100644
--- a/drivers/scsi/lpfc/lpfc_sli.c
+++ b/drivers/scsi/lpfc/lpfc_sli.c
@@ -9834,9 +9834,70 @@ out:
9834} 9834}
9835 9835
9836/** 9836/**
9837 * lpfc_mq_create_fb_init - Send MCC_CREATE without async events registration
9838 * @phba: HBA structure that indicates port to create a queue on.
9839 * @mq: The queue structure to use to create the mailbox queue.
9840 * @mbox: An allocated pointer to type LPFC_MBOXQ_t
9841 * @cq: The completion queue to associate with this cq.
9842 *
9843 * This function provides failback (fb) functionality when the
9844 * mq_create_ext fails on older FW generations. It's purpose is identical
9845 * to mq_create_ext otherwise.
9846 *
9847 * This routine cannot fail as all attributes were previously accessed and
9848 * initialized in mq_create_ext.
9849 **/
9850static void
9851lpfc_mq_create_fb_init(struct lpfc_hba *phba, struct lpfc_queue *mq,
9852 LPFC_MBOXQ_t *mbox, struct lpfc_queue *cq)
9853{
9854 struct lpfc_mbx_mq_create *mq_create;
9855 struct lpfc_dmabuf *dmabuf;
9856 int length;
9857
9858 length = (sizeof(struct lpfc_mbx_mq_create) -
9859 sizeof(struct lpfc_sli4_cfg_mhdr));
9860 lpfc_sli4_config(phba, mbox, LPFC_MBOX_SUBSYSTEM_COMMON,
9861 LPFC_MBOX_OPCODE_MQ_CREATE,
9862 length, LPFC_SLI4_MBX_EMBED);
9863 mq_create = &mbox->u.mqe.un.mq_create;
9864 bf_set(lpfc_mbx_mq_create_num_pages, &mq_create->u.request,
9865 mq->page_count);
9866 bf_set(lpfc_mq_context_cq_id, &mq_create->u.request.context,
9867 cq->queue_id);
9868 bf_set(lpfc_mq_context_valid, &mq_create->u.request.context, 1);
9869 switch (mq->entry_count) {
9870 case 16:
9871 bf_set(lpfc_mq_context_count, &mq_create->u.request.context,
9872 LPFC_MQ_CNT_16);
9873 break;
9874 case 32:
9875 bf_set(lpfc_mq_context_count, &mq_create->u.request.context,
9876 LPFC_MQ_CNT_32);
9877 break;
9878 case 64:
9879 bf_set(lpfc_mq_context_count, &mq_create->u.request.context,
9880 LPFC_MQ_CNT_64);
9881 break;
9882 case 128:
9883 bf_set(lpfc_mq_context_count, &mq_create->u.request.context,
9884 LPFC_MQ_CNT_128);
9885 break;
9886 }
9887 list_for_each_entry(dmabuf, &mq->page_list, list) {
9888 mq_create->u.request.page[dmabuf->buffer_tag].addr_lo =
9889 putPaddrLow(dmabuf->phys);
9890 mq_create->u.request.page[dmabuf->buffer_tag].addr_hi =
9891 putPaddrHigh(dmabuf->phys);
9892 }
9893}
9894
9895/**
9837 * lpfc_mq_create - Create a mailbox Queue on the HBA 9896 * lpfc_mq_create - Create a mailbox Queue on the HBA
9838 * @phba: HBA structure that indicates port to create a queue on. 9897 * @phba: HBA structure that indicates port to create a queue on.
9839 * @mq: The queue structure to use to create the mailbox queue. 9898 * @mq: The queue structure to use to create the mailbox queue.
9899 * @cq: The completion queue to associate with this cq.
9900 * @subtype: The queue's subtype.
9840 * 9901 *
9841 * This function creates a mailbox queue, as detailed in @mq, on a port, 9902 * This function creates a mailbox queue, as detailed in @mq, on a port,
9842 * described by @phba by sending a MQ_CREATE mailbox command to the HBA. 9903 * described by @phba by sending a MQ_CREATE mailbox command to the HBA.
@@ -9852,31 +9913,40 @@ out:
9852 * memory this function will return ENOMEM. If the queue create mailbox command 9913 * memory this function will return ENOMEM. If the queue create mailbox command
9853 * fails this function will return ENXIO. 9914 * fails this function will return ENXIO.
9854 **/ 9915 **/
9855uint32_t 9916int32_t
9856lpfc_mq_create(struct lpfc_hba *phba, struct lpfc_queue *mq, 9917lpfc_mq_create(struct lpfc_hba *phba, struct lpfc_queue *mq,
9857 struct lpfc_queue *cq, uint32_t subtype) 9918 struct lpfc_queue *cq, uint32_t subtype)
9858{ 9919{
9859 struct lpfc_mbx_mq_create *mq_create; 9920 struct lpfc_mbx_mq_create *mq_create;
9921 struct lpfc_mbx_mq_create_ext *mq_create_ext;
9860 struct lpfc_dmabuf *dmabuf; 9922 struct lpfc_dmabuf *dmabuf;
9861 LPFC_MBOXQ_t *mbox; 9923 LPFC_MBOXQ_t *mbox;
9862 int rc, length, status = 0; 9924 int rc, length, status = 0;
9863 uint32_t shdr_status, shdr_add_status; 9925 uint32_t shdr_status, shdr_add_status;
9864 union lpfc_sli4_cfg_shdr *shdr; 9926 union lpfc_sli4_cfg_shdr *shdr;
9865 9927
9928
9866 mbox = mempool_alloc(phba->mbox_mem_pool, GFP_KERNEL); 9929 mbox = mempool_alloc(phba->mbox_mem_pool, GFP_KERNEL);
9867 if (!mbox) 9930 if (!mbox)
9868 return -ENOMEM; 9931 return -ENOMEM;
9869 length = (sizeof(struct lpfc_mbx_mq_create) - 9932 length = (sizeof(struct lpfc_mbx_mq_create_ext) -
9870 sizeof(struct lpfc_sli4_cfg_mhdr)); 9933 sizeof(struct lpfc_sli4_cfg_mhdr));
9871 lpfc_sli4_config(phba, mbox, LPFC_MBOX_SUBSYSTEM_COMMON, 9934 lpfc_sli4_config(phba, mbox, LPFC_MBOX_SUBSYSTEM_COMMON,
9872 LPFC_MBOX_OPCODE_MQ_CREATE, 9935 LPFC_MBOX_OPCODE_MQ_CREATE_EXT,
9873 length, LPFC_SLI4_MBX_EMBED); 9936 length, LPFC_SLI4_MBX_EMBED);
9874 mq_create = &mbox->u.mqe.un.mq_create; 9937
9875 bf_set(lpfc_mbx_mq_create_num_pages, &mq_create->u.request, 9938 mq_create_ext = &mbox->u.mqe.un.mq_create_ext;
9939 bf_set(lpfc_mbx_mq_create_ext_num_pages, &mq_create_ext->u.request,
9876 mq->page_count); 9940 mq->page_count);
9877 bf_set(lpfc_mq_context_cq_id, &mq_create->u.request.context, 9941 bf_set(lpfc_mbx_mq_create_ext_async_evt_link, &mq_create_ext->u.request,
9878 cq->queue_id); 9942 1);
9879 bf_set(lpfc_mq_context_valid, &mq_create->u.request.context, 1); 9943 bf_set(lpfc_mbx_mq_create_ext_async_evt_fcfste,
9944 &mq_create_ext->u.request, 1);
9945 bf_set(lpfc_mbx_mq_create_ext_async_evt_group5,
9946 &mq_create_ext->u.request, 1);
9947 bf_set(lpfc_mq_context_cq_id, &mq_create_ext->u.request.context,
9948 cq->queue_id);
9949 bf_set(lpfc_mq_context_valid, &mq_create_ext->u.request.context, 1);
9880 switch (mq->entry_count) { 9950 switch (mq->entry_count) {
9881 default: 9951 default:
9882 lpfc_printf_log(phba, KERN_ERR, LOG_SLI, 9952 lpfc_printf_log(phba, KERN_ERR, LOG_SLI,
@@ -9886,31 +9956,46 @@ lpfc_mq_create(struct lpfc_hba *phba, struct lpfc_queue *mq,
9886 return -EINVAL; 9956 return -EINVAL;
9887 /* otherwise default to smallest count (drop through) */ 9957 /* otherwise default to smallest count (drop through) */
9888 case 16: 9958 case 16:
9889 bf_set(lpfc_mq_context_count, &mq_create->u.request.context, 9959 bf_set(lpfc_mq_context_count, &mq_create_ext->u.request.context,
9890 LPFC_MQ_CNT_16); 9960 LPFC_MQ_CNT_16);
9891 break; 9961 break;
9892 case 32: 9962 case 32:
9893 bf_set(lpfc_mq_context_count, &mq_create->u.request.context, 9963 bf_set(lpfc_mq_context_count, &mq_create_ext->u.request.context,
9894 LPFC_MQ_CNT_32); 9964 LPFC_MQ_CNT_32);
9895 break; 9965 break;
9896 case 64: 9966 case 64:
9897 bf_set(lpfc_mq_context_count, &mq_create->u.request.context, 9967 bf_set(lpfc_mq_context_count, &mq_create_ext->u.request.context,
9898 LPFC_MQ_CNT_64); 9968 LPFC_MQ_CNT_64);
9899 break; 9969 break;
9900 case 128: 9970 case 128:
9901 bf_set(lpfc_mq_context_count, &mq_create->u.request.context, 9971 bf_set(lpfc_mq_context_count, &mq_create_ext->u.request.context,
9902 LPFC_MQ_CNT_128); 9972 LPFC_MQ_CNT_128);
9903 break; 9973 break;
9904 } 9974 }
9905 list_for_each_entry(dmabuf, &mq->page_list, list) { 9975 list_for_each_entry(dmabuf, &mq->page_list, list) {
9906 mq_create->u.request.page[dmabuf->buffer_tag].addr_lo = 9976 mq_create_ext->u.request.page[dmabuf->buffer_tag].addr_lo =
9907 putPaddrLow(dmabuf->phys); 9977 putPaddrLow(dmabuf->phys);
9908 mq_create->u.request.page[dmabuf->buffer_tag].addr_hi = 9978 mq_create_ext->u.request.page[dmabuf->buffer_tag].addr_hi =
9909 putPaddrHigh(dmabuf->phys); 9979 putPaddrHigh(dmabuf->phys);
9910 } 9980 }
9911 rc = lpfc_sli_issue_mbox(phba, mbox, MBX_POLL); 9981 rc = lpfc_sli_issue_mbox(phba, mbox, MBX_POLL);
9982 shdr = (union lpfc_sli4_cfg_shdr *) &mq_create_ext->header.cfg_shdr;
9983 mq->queue_id = bf_get(lpfc_mbx_mq_create_q_id,
9984 &mq_create_ext->u.response);
9985 if (rc != MBX_SUCCESS) {
9986 lpfc_printf_log(phba, KERN_INFO, LOG_INIT,
9987 "2795 MQ_CREATE_EXT failed with "
9988 "status x%x. Failback to MQ_CREATE.\n",
9989 rc);
9990 lpfc_mq_create_fb_init(phba, mq, mbox, cq);
9991 mq_create = &mbox->u.mqe.un.mq_create;
9992 rc = lpfc_sli_issue_mbox(phba, mbox, MBX_POLL);
9993 shdr = (union lpfc_sli4_cfg_shdr *) &mq_create->header.cfg_shdr;
9994 mq->queue_id = bf_get(lpfc_mbx_mq_create_q_id,
9995 &mq_create->u.response);
9996 }
9997
9912 /* The IOCTL status is embedded in the mailbox subheader. */ 9998 /* The IOCTL status is embedded in the mailbox subheader. */
9913 shdr = (union lpfc_sli4_cfg_shdr *) &mq_create->header.cfg_shdr;
9914 shdr_status = bf_get(lpfc_mbox_hdr_status, &shdr->response); 9999 shdr_status = bf_get(lpfc_mbox_hdr_status, &shdr->response);
9915 shdr_add_status = bf_get(lpfc_mbox_hdr_add_status, &shdr->response); 10000 shdr_add_status = bf_get(lpfc_mbox_hdr_add_status, &shdr->response);
9916 if (shdr_status || shdr_add_status || rc) { 10001 if (shdr_status || shdr_add_status || rc) {
@@ -9921,7 +10006,6 @@ lpfc_mq_create(struct lpfc_hba *phba, struct lpfc_queue *mq,
9921 status = -ENXIO; 10006 status = -ENXIO;
9922 goto out; 10007 goto out;
9923 } 10008 }
9924 mq->queue_id = bf_get(lpfc_mbx_mq_create_q_id, &mq_create->u.response);
9925 if (mq->queue_id == 0xFFFF) { 10009 if (mq->queue_id == 0xFFFF) {
9926 status = -ENXIO; 10010 status = -ENXIO;
9927 goto out; 10011 goto out;
diff --git a/drivers/scsi/lpfc/lpfc_sli.h b/drivers/scsi/lpfc/lpfc_sli.h
index 54a5e0bc827f..e3792151ca06 100644
--- a/drivers/scsi/lpfc/lpfc_sli.h
+++ b/drivers/scsi/lpfc/lpfc_sli.h
@@ -36,6 +36,7 @@ struct lpfc_cq_event {
36 struct lpfc_acqe_link acqe_link; 36 struct lpfc_acqe_link acqe_link;
37 struct lpfc_acqe_fcoe acqe_fcoe; 37 struct lpfc_acqe_fcoe acqe_fcoe;
38 struct lpfc_acqe_dcbx acqe_dcbx; 38 struct lpfc_acqe_dcbx acqe_dcbx;
39 struct lpfc_acqe_grp5 acqe_grp5;
39 struct lpfc_rcqe rcqe_cmpl; 40 struct lpfc_rcqe rcqe_cmpl;
40 struct sli4_wcqe_xri_aborted wcqe_axri; 41 struct sli4_wcqe_xri_aborted wcqe_axri;
41 struct lpfc_wcqe_complete wcqe_cmpl; 42 struct lpfc_wcqe_complete wcqe_cmpl;
diff --git a/drivers/scsi/lpfc/lpfc_sli4.h b/drivers/scsi/lpfc/lpfc_sli4.h
index 5b6cb9742c58..58bb4c81b54e 100644
--- a/drivers/scsi/lpfc/lpfc_sli4.h
+++ b/drivers/scsi/lpfc/lpfc_sli4.h
@@ -493,8 +493,8 @@ void lpfc_sli4_queue_free(struct lpfc_queue *);
493uint32_t lpfc_eq_create(struct lpfc_hba *, struct lpfc_queue *, uint16_t); 493uint32_t lpfc_eq_create(struct lpfc_hba *, struct lpfc_queue *, uint16_t);
494uint32_t lpfc_cq_create(struct lpfc_hba *, struct lpfc_queue *, 494uint32_t lpfc_cq_create(struct lpfc_hba *, struct lpfc_queue *,
495 struct lpfc_queue *, uint32_t, uint32_t); 495 struct lpfc_queue *, uint32_t, uint32_t);
496uint32_t lpfc_mq_create(struct lpfc_hba *, struct lpfc_queue *, 496int32_t lpfc_mq_create(struct lpfc_hba *, struct lpfc_queue *,
497 struct lpfc_queue *, uint32_t); 497 struct lpfc_queue *, uint32_t);
498uint32_t lpfc_wq_create(struct lpfc_hba *, struct lpfc_queue *, 498uint32_t lpfc_wq_create(struct lpfc_hba *, struct lpfc_queue *,
499 struct lpfc_queue *, uint32_t); 499 struct lpfc_queue *, uint32_t);
500uint32_t lpfc_rq_create(struct lpfc_hba *, struct lpfc_queue *, 500uint32_t lpfc_rq_create(struct lpfc_hba *, struct lpfc_queue *,