Skip to content

Commit 115d137

Browse files
Justin Teemartinkpetersen
authored andcommitted
scsi: lpfc: Define lpfc_dmabuf type for ctx_buf ptr
In LPFC_MBOXQ_t, the ctx_buf ptr shouldn't be defined as a generic void *ptr. It is named ctx_buf and it should only be used as an lpfc_dmabuf *ptr. Due to the void* declaration, there have been abuses of ctx_buf for things not related to lpfc_dmabuf. So, set the ptr type for *ctx_buf as lpfc_dmabuf. Remove all type casts on ctx_buf because it is no longer a void *ptr. Convert the abuse of ctx_buf for something not related to lpfc_dmabuf to use the void *context3 ptr. A particular abuse of the ctx_buf warranted a new void *ext_buf ptr. However, the usage of this new void *ext_buf is not generic. It is intended to only hold virtual addresses for extended mailbox commands. Signed-off-by: Justin Tee <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Martin K. Petersen <[email protected]>
1 parent 18f7fe4 commit 115d137

File tree

9 files changed

+50
-54
lines changed

9 files changed

+50
-54
lines changed

drivers/scsi/lpfc/lpfc_bsg.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2513,7 +2513,7 @@ static int lpfcdiag_loop_self_reg(struct lpfc_hba *phba, uint16_t *rpi)
25132513
return -ENOMEM;
25142514
}
25152515

2516-
dmabuff = (struct lpfc_dmabuf *)mbox->ctx_buf;
2516+
dmabuff = mbox->ctx_buf;
25172517
mbox->ctx_buf = NULL;
25182518
mbox->ctx_ndlp = NULL;
25192519
status = lpfc_sli_issue_mbox_wait(phba, mbox, LPFC_MBOX_TMO);
@@ -3553,7 +3553,7 @@ lpfc_bsg_issue_mbox_ext_handle_job(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmboxq)
35533553
struct lpfc_sli_config_mbox *sli_cfg_mbx;
35543554
uint8_t *pmbx;
35553555

3556-
dd_data = pmboxq->ctx_buf;
3556+
dd_data = pmboxq->context3;
35573557

35583558
/* Determine if job has been aborted */
35593559
spin_lock_irqsave(&phba->ct_ev_lock, flags);
@@ -3940,7 +3940,7 @@ lpfc_bsg_sli_cfg_read_cmd_ext(struct lpfc_hba *phba, struct bsg_job *job,
39403940
pmboxq->mbox_cmpl = lpfc_bsg_issue_read_mbox_ext_cmpl;
39413941

39423942
/* context fields to callback function */
3943-
pmboxq->ctx_buf = dd_data;
3943+
pmboxq->context3 = dd_data;
39443944
dd_data->type = TYPE_MBOX;
39453945
dd_data->set_job = job;
39463946
dd_data->context_un.mbox.pmboxq = pmboxq;
@@ -4112,7 +4112,7 @@ lpfc_bsg_sli_cfg_write_cmd_ext(struct lpfc_hba *phba, struct bsg_job *job,
41124112
pmboxq->mbox_cmpl = lpfc_bsg_issue_write_mbox_ext_cmpl;
41134113

41144114
/* context fields to callback function */
4115-
pmboxq->ctx_buf = dd_data;
4115+
pmboxq->context3 = dd_data;
41164116
dd_data->type = TYPE_MBOX;
41174117
dd_data->set_job = job;
41184118
dd_data->context_un.mbox.pmboxq = pmboxq;
@@ -4460,7 +4460,7 @@ lpfc_bsg_write_ebuf_set(struct lpfc_hba *phba, struct bsg_job *job,
44604460
pmboxq->mbox_cmpl = lpfc_bsg_issue_write_mbox_ext_cmpl;
44614461

44624462
/* context fields to callback function */
4463-
pmboxq->ctx_buf = dd_data;
4463+
pmboxq->context3 = dd_data;
44644464
dd_data->type = TYPE_MBOX;
44654465
dd_data->set_job = job;
44664466
dd_data->context_un.mbox.pmboxq = pmboxq;
@@ -4747,7 +4747,7 @@ lpfc_bsg_issue_mbox(struct lpfc_hba *phba, struct bsg_job *job,
47474747
if (mbox_req->inExtWLen || mbox_req->outExtWLen) {
47484748
from = pmbx;
47494749
ext = from + sizeof(MAILBOX_t);
4750-
pmboxq->ctx_buf = ext;
4750+
pmboxq->ext_buf = ext;
47514751
pmboxq->in_ext_byte_len =
47524752
mbox_req->inExtWLen * sizeof(uint32_t);
47534753
pmboxq->out_ext_byte_len =

drivers/scsi/lpfc/lpfc_els.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7290,7 +7290,7 @@ int lpfc_get_sfp_info_wait(struct lpfc_hba *phba,
72907290
mbox->in_ext_byte_len = DMP_SFF_PAGE_A0_SIZE;
72917291
mbox->out_ext_byte_len = DMP_SFF_PAGE_A0_SIZE;
72927292
mbox->mbox_offset_word = 5;
7293-
mbox->ctx_buf = virt;
7293+
mbox->ext_buf = virt;
72947294
} else {
72957295
bf_set(lpfc_mbx_memory_dump_type3_length,
72967296
&mbox->u.mqe.un.mem_dump_type3, DMP_SFF_PAGE_A0_SIZE);
@@ -7306,7 +7306,7 @@ int lpfc_get_sfp_info_wait(struct lpfc_hba *phba,
73067306
}
73077307

73087308
if (phba->sli_rev == LPFC_SLI_REV4)
7309-
mp = (struct lpfc_dmabuf *)(mbox->ctx_buf);
7309+
mp = mbox->ctx_buf;
73107310
else
73117311
mp = mpsave;
73127312

@@ -7349,7 +7349,7 @@ int lpfc_get_sfp_info_wait(struct lpfc_hba *phba,
73497349
mbox->in_ext_byte_len = DMP_SFF_PAGE_A2_SIZE;
73507350
mbox->out_ext_byte_len = DMP_SFF_PAGE_A2_SIZE;
73517351
mbox->mbox_offset_word = 5;
7352-
mbox->ctx_buf = virt;
7352+
mbox->ext_buf = virt;
73537353
} else {
73547354
bf_set(lpfc_mbx_memory_dump_type3_length,
73557355
&mbox->u.mqe.un.mem_dump_type3, DMP_SFF_PAGE_A2_SIZE);
@@ -8637,9 +8637,9 @@ lpfc_els_rsp_rls_acc(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmb)
86378637
mb = &pmb->u.mb;
86388638

86398639
ndlp = pmb->ctx_ndlp;
8640-
rxid = (uint16_t)((unsigned long)(pmb->ctx_buf) & 0xffff);
8641-
oxid = (uint16_t)(((unsigned long)(pmb->ctx_buf) >> 16) & 0xffff);
8642-
pmb->ctx_buf = NULL;
8640+
rxid = (uint16_t)((unsigned long)(pmb->context3) & 0xffff);
8641+
oxid = (uint16_t)(((unsigned long)(pmb->context3) >> 16) & 0xffff);
8642+
pmb->context3 = NULL;
86438643
pmb->ctx_ndlp = NULL;
86448644

86458645
if (mb->mbxStatus) {
@@ -8743,7 +8743,7 @@ lpfc_els_rcv_rls(struct lpfc_vport *vport, struct lpfc_iocbq *cmdiocb,
87438743
mbox = mempool_alloc(phba->mbox_mem_pool, GFP_ATOMIC);
87448744
if (mbox) {
87458745
lpfc_read_lnk_stat(phba, mbox);
8746-
mbox->ctx_buf = (void *)((unsigned long)
8746+
mbox->context3 = (void *)((unsigned long)
87478747
(ox_id << 16 | ctx));
87488748
mbox->ctx_ndlp = lpfc_nlp_get(ndlp);
87498749
if (!mbox->ctx_ndlp)

drivers/scsi/lpfc/lpfc_hbadisc.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3428,7 +3428,7 @@ static void
34283428
lpfc_mbx_cmpl_read_sparam(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmb)
34293429
{
34303430
MAILBOX_t *mb = &pmb->u.mb;
3431-
struct lpfc_dmabuf *mp = (struct lpfc_dmabuf *)pmb->ctx_buf;
3431+
struct lpfc_dmabuf *mp = pmb->ctx_buf;
34323432
struct lpfc_vport *vport = pmb->vport;
34333433
struct Scsi_Host *shost = lpfc_shost_from_vport(vport);
34343434
struct serv_parm *sp = &vport->fc_sparam;
@@ -3736,7 +3736,7 @@ lpfc_mbx_cmpl_read_topology(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmb)
37363736
struct lpfc_mbx_read_top *la;
37373737
struct lpfc_sli_ring *pring;
37383738
MAILBOX_t *mb = &pmb->u.mb;
3739-
struct lpfc_dmabuf *mp = (struct lpfc_dmabuf *)(pmb->ctx_buf);
3739+
struct lpfc_dmabuf *mp = pmb->ctx_buf;
37403740
uint8_t attn_type;
37413741

37423742
/* Unblock ELS traffic */
@@ -3850,7 +3850,7 @@ void
38503850
lpfc_mbx_cmpl_reg_login(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmb)
38513851
{
38523852
struct lpfc_vport *vport = pmb->vport;
3853-
struct lpfc_dmabuf *mp = (struct lpfc_dmabuf *)pmb->ctx_buf;
3853+
struct lpfc_dmabuf *mp = pmb->ctx_buf;
38543854
struct lpfc_nodelist *ndlp = pmb->ctx_ndlp;
38553855

38563856
/* The driver calls the state machine with the pmb pointer
@@ -4065,7 +4065,7 @@ lpfc_create_static_vport(struct lpfc_hba *phba)
40654065
* the dump routine is a single-use construct.
40664066
*/
40674067
if (pmb->ctx_buf) {
4068-
mp = (struct lpfc_dmabuf *)pmb->ctx_buf;
4068+
mp = pmb->ctx_buf;
40694069
lpfc_mbuf_free(phba, mp->virt, mp->phys);
40704070
kfree(mp);
40714071
pmb->ctx_buf = NULL;
@@ -4088,7 +4088,7 @@ lpfc_create_static_vport(struct lpfc_hba *phba)
40884088

40894089
if (phba->sli_rev == LPFC_SLI_REV4) {
40904090
byte_count = pmb->u.mqe.un.mb_words[5];
4091-
mp = (struct lpfc_dmabuf *)pmb->ctx_buf;
4091+
mp = pmb->ctx_buf;
40924092
if (byte_count > sizeof(struct static_vport_info) -
40934093
offset)
40944094
byte_count = sizeof(struct static_vport_info)

drivers/scsi/lpfc/lpfc_init.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,7 @@ lpfc_config_port_post(struct lpfc_hba *phba)
460460
return -EIO;
461461
}
462462

463-
mp = (struct lpfc_dmabuf *)pmb->ctx_buf;
463+
mp = pmb->ctx_buf;
464464

465465
/* This dmabuf was allocated by lpfc_read_sparam. The dmabuf is no
466466
* longer needed. Prevent unintended ctx_buf access as the mbox is
@@ -2217,7 +2217,7 @@ lpfc_handle_latt(struct lpfc_hba *phba)
22172217
/* Cleanup any outstanding ELS commands */
22182218
lpfc_els_flush_all_cmd(phba);
22192219
psli->slistat.link_event++;
2220-
lpfc_read_topology(phba, pmb, (struct lpfc_dmabuf *)pmb->ctx_buf);
2220+
lpfc_read_topology(phba, pmb, pmb->ctx_buf);
22212221
pmb->mbox_cmpl = lpfc_mbx_cmpl_read_topology;
22222222
pmb->vport = vport;
22232223
/* Block ELS IOCBs until we have processed this mbox command */
@@ -5454,7 +5454,7 @@ lpfc_sli4_async_link_evt(struct lpfc_hba *phba,
54545454
phba->sli.slistat.link_event++;
54555455

54565456
/* Create lpfc_handle_latt mailbox command from link ACQE */
5457-
lpfc_read_topology(phba, pmb, (struct lpfc_dmabuf *)pmb->ctx_buf);
5457+
lpfc_read_topology(phba, pmb, pmb->ctx_buf);
54585458
pmb->mbox_cmpl = lpfc_mbx_cmpl_read_topology;
54595459
pmb->vport = phba->pport;
54605460

@@ -6347,7 +6347,7 @@ lpfc_sli4_async_fc_evt(struct lpfc_hba *phba, struct lpfc_acqe_fc_la *acqe_fc)
63476347
phba->sli.slistat.link_event++;
63486348

63496349
/* Create lpfc_handle_latt mailbox command from link ACQE */
6350-
lpfc_read_topology(phba, pmb, (struct lpfc_dmabuf *)pmb->ctx_buf);
6350+
lpfc_read_topology(phba, pmb, pmb->ctx_buf);
63516351
pmb->mbox_cmpl = lpfc_mbx_cmpl_read_topology;
63526352
pmb->vport = phba->pport;
63536353

drivers/scsi/lpfc/lpfc_mbox.c

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ lpfc_mbox_rsrc_cleanup(struct lpfc_hba *phba, LPFC_MBOXQ_t *mbox,
102102
{
103103
struct lpfc_dmabuf *mp;
104104

105-
mp = (struct lpfc_dmabuf *)mbox->ctx_buf;
105+
mp = mbox->ctx_buf;
106106
mbox->ctx_buf = NULL;
107107

108108
/* Release the generic BPL buffer memory. */
@@ -204,10 +204,8 @@ lpfc_dump_mem(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmb, uint16_t offset,
204204
uint16_t region_id)
205205
{
206206
MAILBOX_t *mb;
207-
void *ctx;
208207

209208
mb = &pmb->u.mb;
210-
ctx = pmb->ctx_buf;
211209

212210
/* Setup to dump VPD region */
213211
memset(pmb, 0, sizeof (LPFC_MBOXQ_t));
@@ -219,7 +217,6 @@ lpfc_dump_mem(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmb, uint16_t offset,
219217
mb->un.varDmp.word_cnt = (DMP_RSP_SIZE / sizeof (uint32_t));
220218
mb->un.varDmp.co = 0;
221219
mb->un.varDmp.resp_offset = 0;
222-
pmb->ctx_buf = ctx;
223220
mb->mbxOwner = OWN_HOST;
224221
return;
225222
}
@@ -236,11 +233,8 @@ void
236233
lpfc_dump_wakeup_param(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmb)
237234
{
238235
MAILBOX_t *mb;
239-
void *ctx;
240236

241237
mb = &pmb->u.mb;
242-
/* Save context so that we can restore after memset */
243-
ctx = pmb->ctx_buf;
244238

245239
/* Setup to dump VPD region */
246240
memset(pmb, 0, sizeof(LPFC_MBOXQ_t));
@@ -254,7 +248,6 @@ lpfc_dump_wakeup_param(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmb)
254248
mb->un.varDmp.word_cnt = WAKE_UP_PARMS_WORD_SIZE;
255249
mb->un.varDmp.co = 0;
256250
mb->un.varDmp.resp_offset = 0;
257-
pmb->ctx_buf = ctx;
258251
return;
259252
}
260253

@@ -372,7 +365,7 @@ lpfc_read_topology(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmb,
372365
/* Save address for later completion and set the owner to host so that
373366
* the FW knows this mailbox is available for processing.
374367
*/
375-
pmb->ctx_buf = (uint8_t *)mp;
368+
pmb->ctx_buf = mp;
376369
mb->mbxOwner = OWN_HOST;
377370
return (0);
378371
}
@@ -2385,7 +2378,7 @@ lpfc_mbx_cmpl_rdp_link_stat(struct lpfc_hba *phba, LPFC_MBOXQ_t *mboxq)
23852378
static void
23862379
lpfc_mbx_cmpl_rdp_page_a2(struct lpfc_hba *phba, LPFC_MBOXQ_t *mbox)
23872380
{
2388-
struct lpfc_dmabuf *mp = (struct lpfc_dmabuf *)mbox->ctx_buf;
2381+
struct lpfc_dmabuf *mp = mbox->ctx_buf;
23892382
struct lpfc_rdp_context *rdp_context =
23902383
(struct lpfc_rdp_context *)(mbox->context3);
23912384

@@ -2416,7 +2409,7 @@ void
24162409
lpfc_mbx_cmpl_rdp_page_a0(struct lpfc_hba *phba, LPFC_MBOXQ_t *mbox)
24172410
{
24182411
int rc;
2419-
struct lpfc_dmabuf *mp = (struct lpfc_dmabuf *)(mbox->ctx_buf);
2412+
struct lpfc_dmabuf *mp = mbox->ctx_buf;
24202413
struct lpfc_rdp_context *rdp_context =
24212414
(struct lpfc_rdp_context *)(mbox->context3);
24222415

drivers/scsi/lpfc/lpfc_nportdisc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -682,7 +682,7 @@ lpfc_mbx_cmpl_resume_rpi(struct lpfc_hba *phba, LPFC_MBOXQ_t *mboxq)
682682
struct lpfc_nodelist *ndlp;
683683
uint32_t cmd;
684684

685-
elsiocb = (struct lpfc_iocbq *)mboxq->ctx_buf;
685+
elsiocb = mboxq->context3;
686686
ndlp = mboxq->ctx_ndlp;
687687
vport = mboxq->vport;
688688
cmd = elsiocb->drvrTimeout;

drivers/scsi/lpfc/lpfc_sli.c

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2885,7 +2885,7 @@ lpfc_sli_def_mbox_cmpl(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmb)
28852885
if (!test_bit(FC_UNLOADING, &phba->pport->load_flag) &&
28862886
pmb->u.mb.mbxCommand == MBX_REG_LOGIN64 &&
28872887
!pmb->u.mb.mbxStatus) {
2888-
mp = (struct lpfc_dmabuf *)pmb->ctx_buf;
2888+
mp = pmb->ctx_buf;
28892889
if (mp) {
28902890
pmb->ctx_buf = NULL;
28912891
lpfc_mbuf_free(phba, mp->virt, mp->phys);
@@ -5819,7 +5819,7 @@ lpfc_sli4_read_fcoe_params(struct lpfc_hba *phba)
58195819
goto out_free_mboxq;
58205820
}
58215821

5822-
mp = (struct lpfc_dmabuf *)mboxq->ctx_buf;
5822+
mp = mboxq->ctx_buf;
58235823
rc = lpfc_sli_issue_mbox(phba, mboxq, MBX_POLL);
58245824

58255825
lpfc_printf_log(phba, KERN_INFO, LOG_MBOX | LOG_SLI,
@@ -8766,7 +8766,7 @@ lpfc_sli4_hba_setup(struct lpfc_hba *phba)
87668766

87678767
mboxq->vport = vport;
87688768
rc = lpfc_sli_issue_mbox(phba, mboxq, MBX_POLL);
8769-
mp = (struct lpfc_dmabuf *)mboxq->ctx_buf;
8769+
mp = mboxq->ctx_buf;
87708770
if (rc == MBX_SUCCESS) {
87718771
memcpy(&vport->fc_sparam, mp->virt, sizeof(struct serv_parm));
87728772
rc = 0;
@@ -9548,8 +9548,8 @@ lpfc_sli_issue_mbox_s3(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmbox,
95489548
}
95499549

95509550
/* Copy the mailbox extension data */
9551-
if (pmbox->in_ext_byte_len && pmbox->ctx_buf) {
9552-
lpfc_sli_pcimem_bcopy(pmbox->ctx_buf,
9551+
if (pmbox->in_ext_byte_len && pmbox->ext_buf) {
9552+
lpfc_sli_pcimem_bcopy(pmbox->ext_buf,
95539553
(uint8_t *)phba->mbox_ext,
95549554
pmbox->in_ext_byte_len);
95559555
}
@@ -9562,10 +9562,10 @@ lpfc_sli_issue_mbox_s3(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmbox,
95629562
= MAILBOX_HBA_EXT_OFFSET;
95639563

95649564
/* Copy the mailbox extension data */
9565-
if (pmbox->in_ext_byte_len && pmbox->ctx_buf)
9565+
if (pmbox->in_ext_byte_len && pmbox->ext_buf)
95669566
lpfc_memcpy_to_slim(phba->MBslimaddr +
95679567
MAILBOX_HBA_EXT_OFFSET,
9568-
pmbox->ctx_buf, pmbox->in_ext_byte_len);
9568+
pmbox->ext_buf, pmbox->in_ext_byte_len);
95699569

95709570
if (mbx->mbxCommand == MBX_CONFIG_PORT)
95719571
/* copy command data into host mbox for cmpl */
@@ -9688,19 +9688,19 @@ lpfc_sli_issue_mbox_s3(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmbox,
96889688
lpfc_sli_pcimem_bcopy(phba->mbox, mbx,
96899689
MAILBOX_CMD_SIZE);
96909690
/* Copy the mailbox extension data */
9691-
if (pmbox->out_ext_byte_len && pmbox->ctx_buf) {
9691+
if (pmbox->out_ext_byte_len && pmbox->ext_buf) {
96929692
lpfc_sli_pcimem_bcopy(phba->mbox_ext,
9693-
pmbox->ctx_buf,
9693+
pmbox->ext_buf,
96949694
pmbox->out_ext_byte_len);
96959695
}
96969696
} else {
96979697
/* First copy command data */
96989698
lpfc_memcpy_from_slim(mbx, phba->MBslimaddr,
96999699
MAILBOX_CMD_SIZE);
97009700
/* Copy the mailbox extension data */
9701-
if (pmbox->out_ext_byte_len && pmbox->ctx_buf) {
9701+
if (pmbox->out_ext_byte_len && pmbox->ext_buf) {
97029702
lpfc_memcpy_from_slim(
9703-
pmbox->ctx_buf,
9703+
pmbox->ext_buf,
97049704
phba->MBslimaddr +
97059705
MAILBOX_HBA_EXT_OFFSET,
97069706
pmbox->out_ext_byte_len);
@@ -13813,10 +13813,10 @@ lpfc_sli_sp_intr_handler(int irq, void *dev_id)
1381313813
lpfc_sli_pcimem_bcopy(mbox, pmbox,
1381413814
MAILBOX_CMD_SIZE);
1381513815
if (pmb->out_ext_byte_len &&
13816-
pmb->ctx_buf)
13816+
pmb->ext_buf)
1381713817
lpfc_sli_pcimem_bcopy(
1381813818
phba->mbox_ext,
13819-
pmb->ctx_buf,
13819+
pmb->ext_buf,
1382013820
pmb->out_ext_byte_len);
1382113821
}
1382213822
if (pmb->mbox_flag & LPFC_MBX_IMED_UNREG) {
@@ -13830,8 +13830,7 @@ lpfc_sli_sp_intr_handler(int irq, void *dev_id)
1383013830
pmbox->un.varWords[0], 0);
1383113831

1383213832
if (!pmbox->mbxStatus) {
13833-
mp = (struct lpfc_dmabuf *)
13834-
(pmb->ctx_buf);
13833+
mp = pmb->ctx_buf;
1383513834
ndlp = pmb->ctx_ndlp;
1383613835

1383713836
/* Reg_LOGIN of dflt RPI was
@@ -14339,7 +14338,7 @@ lpfc_sli4_sp_handle_mbox_event(struct lpfc_hba *phba, struct lpfc_mcqe *mcqe)
1433914338
mcqe_status,
1434014339
pmbox->un.varWords[0], 0);
1434114340
if (mcqe_status == MB_CQE_STATUS_SUCCESS) {
14342-
mp = (struct lpfc_dmabuf *)(pmb->ctx_buf);
14341+
mp = pmb->ctx_buf;
1434314342
ndlp = pmb->ctx_ndlp;
1434414343

1434514344
/* Reg_LOGIN of dflt RPI was successful. Mark the
@@ -19858,7 +19857,7 @@ lpfc_sli4_resume_rpi(struct lpfc_nodelist *ndlp,
1985819857
lpfc_resume_rpi(mboxq, ndlp);
1985919858
if (cmpl) {
1986019859
mboxq->mbox_cmpl = cmpl;
19861-
mboxq->ctx_buf = arg;
19860+
mboxq->context3 = arg;
1986219861
} else
1986319862
mboxq->mbox_cmpl = lpfc_sli_def_mbox_cmpl;
1986419863
mboxq->ctx_ndlp = ndlp;
@@ -20675,7 +20674,7 @@ lpfc_sli4_get_config_region23(struct lpfc_hba *phba, char *rgn23_data)
2067520674
if (lpfc_sli4_dump_cfg_rg23(phba, mboxq))
2067620675
goto out;
2067720676
mqe = &mboxq->u.mqe;
20678-
mp = (struct lpfc_dmabuf *)mboxq->ctx_buf;
20677+
mp = mboxq->ctx_buf;
2067920678
rc = lpfc_sli_issue_mbox(phba, mboxq, MBX_POLL);
2068020679
if (rc)
2068120680
goto out;

0 commit comments

Comments
 (0)