Skip to content

Commit 94bb407

Browse files
Merge patch series "Update lpfc to revision 14.4.0.10"
Justin Tee <[email protected]> says: Update lpfc to revision 14.4.0.10 This patch set contains bug fixes related to diagnostic log messaging, driver initialization and removal, updates to mailbox command handling, and string modifications for obsolete adapter model descriptions. The patches were cut against Martin's 6.17/scsi-queue tree. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Martin K. Petersen <[email protected]>
2 parents 15592a1 + f14371a commit 94bb407

File tree

10 files changed

+105
-98
lines changed

10 files changed

+105
-98
lines changed

drivers/scsi/lpfc/lpfc_ct.c

Lines changed: 8 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*******************************************************************
22
* This file is part of the Emulex Linux Device Driver for *
33
* Fibre Channel Host Bus Adapters. *
4-
* Copyright (C) 2017-2024 Broadcom. All Rights Reserved. The term *
4+
* Copyright (C) 2017-2025 Broadcom. All Rights Reserved. The term *
55
* “Broadcom” refers to Broadcom Inc. and/or its subsidiaries. *
66
* Copyright (C) 2004-2016 Emulex. All rights reserved. *
77
* EMULEX and SLI are trademarks of Emulex. *
@@ -264,9 +264,9 @@ lpfc_ct_reject_event(struct lpfc_nodelist *ndlp,
264264
ct_free_mp:
265265
kfree(mp);
266266
ct_exit:
267-
lpfc_printf_vlog(vport, KERN_ERR, LOG_ELS,
268-
"6440 Unsol CT: Rsp err %d Data: x%lx\n",
269-
rc, vport->fc_flag);
267+
lpfc_vlog_msg(vport, KERN_WARNING, LOG_ELS,
268+
"6440 Unsol CT: Rsp err %d Data: x%lx\n",
269+
rc, vport->fc_flag);
270270
}
271271

272272
/**
@@ -313,7 +313,7 @@ lpfc_ct_handle_mibreq(struct lpfc_hba *phba, struct lpfc_iocbq *ctiocbq)
313313

314314
mi_cmd = be16_to_cpu(ct_req->CommandResponse.bits.CmdRsp);
315315
lpfc_vlog_msg(vport, KERN_WARNING, LOG_ELS,
316-
"6442 MI Cmd : x%x Not Supported\n", mi_cmd);
316+
"6442 MI Cmd: x%x Not Supported\n", mi_cmd);
317317
lpfc_ct_reject_event(ndlp, ct_req,
318318
bf_get(wqe_ctxt_tag,
319319
&ctiocbq->wqe.xmit_els_rsp.wqe_com),
@@ -2229,21 +2229,6 @@ lpfc_cmpl_ct_disc_fdmi(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
22292229
/* Look for a retryable error */
22302230
if (ulp_status == IOSTAT_LOCAL_REJECT) {
22312231
switch ((ulp_word4 & IOERR_PARAM_MASK)) {
2232-
case IOERR_SLI_ABORTED:
2233-
case IOERR_SLI_DOWN:
2234-
/* Driver aborted this IO. No retry as error
2235-
* is likely Offline->Online or some adapter
2236-
* error. Recovery will try again, but if port
2237-
* is not active there's no point to continue
2238-
* issuing follow up FDMI commands.
2239-
*/
2240-
if (!(phba->sli.sli_flag & LPFC_SLI_ACTIVE)) {
2241-
free_ndlp = cmdiocb->ndlp;
2242-
lpfc_ct_free_iocb(phba, cmdiocb);
2243-
lpfc_nlp_put(free_ndlp);
2244-
return;
2245-
}
2246-
break;
22472232
case IOERR_ABORT_IN_PROGRESS:
22482233
case IOERR_SEQUENCE_TIMEOUT:
22492234
case IOERR_ILLEGAL_FRAME:
@@ -2269,6 +2254,9 @@ lpfc_cmpl_ct_disc_fdmi(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
22692254
lpfc_ct_free_iocb(phba, cmdiocb);
22702255
lpfc_nlp_put(free_ndlp);
22712256

2257+
if (ulp_status != IOSTAT_SUCCESS)
2258+
return;
2259+
22722260
ndlp = lpfc_findnode_did(vport, FDMI_DID);
22732261
if (!ndlp)
22742262
return;

drivers/scsi/lpfc/lpfc_debugfs.c

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*******************************************************************
22
* This file is part of the Emulex Linux Device Driver for *
33
* Fibre Channel Host Bus Adapters. *
4-
* Copyright (C) 2017-2024 Broadcom. All Rights Reserved. The term *
4+
* Copyright (C) 2017-2025 Broadcom. All Rights Reserved. The term *
55
* “Broadcom” refers to Broadcom Inc. and/or its subsidiaries. *
66
* Copyright (C) 2007-2015 Emulex. All rights reserved. *
77
* EMULEX and SLI are trademarks of Emulex. *
@@ -6227,8 +6227,9 @@ lpfc_debugfs_initialize(struct lpfc_vport *vport)
62276227
i++;
62286228
}
62296229
lpfc_debugfs_max_slow_ring_trc = (1 << i);
6230-
pr_err("lpfc_debugfs_max_disc_trc changed to "
6231-
"%d\n", lpfc_debugfs_max_disc_trc);
6230+
pr_info("lpfc_debugfs_max_slow_ring_trc "
6231+
"changed to %d\n",
6232+
lpfc_debugfs_max_slow_ring_trc);
62326233
}
62336234
}
62346235

@@ -6260,7 +6261,7 @@ lpfc_debugfs_initialize(struct lpfc_vport *vport)
62606261
atomic_set(&phba->nvmeio_trc_cnt, 0);
62616262
if (lpfc_debugfs_max_nvmeio_trc) {
62626263
num = lpfc_debugfs_max_nvmeio_trc - 1;
6263-
if (num & lpfc_debugfs_max_disc_trc) {
6264+
if (num & lpfc_debugfs_max_nvmeio_trc) {
62646265
/* Change to be a power of 2 */
62656266
num = lpfc_debugfs_max_nvmeio_trc;
62666267
i = 0;
@@ -6269,10 +6270,9 @@ lpfc_debugfs_initialize(struct lpfc_vport *vport)
62696270
i++;
62706271
}
62716272
lpfc_debugfs_max_nvmeio_trc = (1 << i);
6272-
lpfc_printf_log(phba, KERN_ERR, LOG_INIT,
6273-
"0575 lpfc_debugfs_max_nvmeio_trc "
6274-
"changed to %d\n",
6275-
lpfc_debugfs_max_nvmeio_trc);
6273+
pr_info("lpfc_debugfs_max_nvmeio_trc changed "
6274+
"to %d\n",
6275+
lpfc_debugfs_max_nvmeio_trc);
62766276
}
62776277
phba->nvmeio_trc_size = lpfc_debugfs_max_nvmeio_trc;
62786278

@@ -6317,8 +6317,8 @@ lpfc_debugfs_initialize(struct lpfc_vport *vport)
63176317
i++;
63186318
}
63196319
lpfc_debugfs_max_disc_trc = (1 << i);
6320-
pr_err("lpfc_debugfs_max_disc_trc changed to %d\n",
6321-
lpfc_debugfs_max_disc_trc);
6320+
pr_info("lpfc_debugfs_max_disc_trc changed to %d\n",
6321+
lpfc_debugfs_max_disc_trc);
63226322
}
63236323
}
63246324

drivers/scsi/lpfc/lpfc_els.c

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7861,6 +7861,13 @@ lpfc_rscn_recovery_check(struct lpfc_vport *vport)
78617861

78627862
/* Move all affected nodes by pending RSCNs to NPR state. */
78637863
list_for_each_entry_safe(ndlp, n, &vport->fc_nodes, nlp_listp) {
7864+
if (test_bit(FC_UNLOADING, &vport->load_flag)) {
7865+
lpfc_printf_vlog(vport, KERN_INFO, LOG_ELS,
7866+
"1000 %s Unloading set\n",
7867+
__func__);
7868+
return 0;
7869+
}
7870+
78647871
if ((ndlp->nlp_state == NLP_STE_UNUSED_NODE) ||
78657872
!lpfc_rscn_payload_check(vport, ndlp->nlp_DID))
78667873
continue;
@@ -8369,9 +8376,9 @@ lpfc_els_rcv_flogi(struct lpfc_vport *vport, struct lpfc_iocbq *cmdiocb,
83698376
clear_bit(FC_PUBLIC_LOOP, &vport->fc_flag);
83708377
lpfc_printf_vlog(vport, KERN_INFO, LOG_ELS,
83718378
"3311 Rcv Flogi PS x%x new PS x%x "
8372-
"fc_flag x%lx new fc_flag x%lx\n",
8379+
"fc_flag x%lx new fc_flag x%lx, hba_flag x%lx\n",
83738380
port_state, vport->port_state,
8374-
fc_flag, vport->fc_flag);
8381+
fc_flag, vport->fc_flag, phba->hba_flag);
83758382

83768383
/*
83778384
* We temporarily set fc_myDID to make it look like we are

drivers/scsi/lpfc/lpfc_hbadisc.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,8 @@ lpfc_dev_loss_tmo_callbk(struct fc_rport *rport)
183183

184184
/* Don't schedule a worker thread event if the vport is going down. */
185185
if (test_bit(FC_UNLOADING, &vport->load_flag) ||
186-
!test_bit(HBA_SETUP, &phba->hba_flag)) {
186+
(phba->sli_rev == LPFC_SLI_REV4 &&
187+
!test_bit(HBA_SETUP, &phba->hba_flag))) {
187188

188189
spin_lock_irqsave(&ndlp->lock, iflags);
189190
ndlp->rport = NULL;
@@ -1266,6 +1267,10 @@ lpfc_linkdown(struct lpfc_hba *phba)
12661267
}
12671268
phba->defer_flogi_acc.flag = false;
12681269

1270+
/* reinitialize initial HBA flag */
1271+
clear_bit(HBA_FLOGI_ISSUED, &phba->hba_flag);
1272+
clear_bit(HBA_RHBA_CMPL, &phba->hba_flag);
1273+
12691274
/* Clear external loopback plug detected flag */
12701275
phba->link_flag &= ~LS_EXTERNAL_LOOPBACK;
12711276

@@ -1436,10 +1441,6 @@ lpfc_linkup(struct lpfc_hba *phba)
14361441
phba->pport->rcv_flogi_cnt = 0;
14371442
spin_unlock_irq(shost->host_lock);
14381443

1439-
/* reinitialize initial HBA flag */
1440-
clear_bit(HBA_FLOGI_ISSUED, &phba->hba_flag);
1441-
clear_bit(HBA_RHBA_CMPL, &phba->hba_flag);
1442-
14431444
return 0;
14441445
}
14451446

drivers/scsi/lpfc/lpfc_hw4.h

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*******************************************************************
22
* This file is part of the Emulex Linux Device Driver for *
33
* Fibre Channel Host Bus Adapters. *
4-
* Copyright (C) 2017-2024 Broadcom. All Rights Reserved. The term *
4+
* Copyright (C) 2017-2025 Broadcom. All Rights Reserved. The term *
55
* “Broadcom” refers to Broadcom Inc. and/or its subsidiaries. *
66
* Copyright (C) 2009-2016 Emulex. All rights reserved. *
77
* EMULEX and SLI are trademarks of Emulex. *
@@ -1328,6 +1328,9 @@ struct cq_context {
13281328
#define LPFC_CQ_CNT_512 0x1
13291329
#define LPFC_CQ_CNT_1024 0x2
13301330
#define LPFC_CQ_CNT_WORD7 0x3
1331+
#define lpfc_cq_context_cqe_sz_SHIFT 25
1332+
#define lpfc_cq_context_cqe_sz_MASK 0x00000003
1333+
#define lpfc_cq_context_cqe_sz_WORD word0
13311334
#define lpfc_cq_context_autovalid_SHIFT 15
13321335
#define lpfc_cq_context_autovalid_MASK 0x00000001
13331336
#define lpfc_cq_context_autovalid_WORD word0
@@ -1383,9 +1386,9 @@ struct lpfc_mbx_cq_create_set {
13831386
#define lpfc_mbx_cq_create_set_valid_SHIFT 29
13841387
#define lpfc_mbx_cq_create_set_valid_MASK 0x00000001
13851388
#define lpfc_mbx_cq_create_set_valid_WORD word1
1386-
#define lpfc_mbx_cq_create_set_cqe_cnt_SHIFT 27
1387-
#define lpfc_mbx_cq_create_set_cqe_cnt_MASK 0x00000003
1388-
#define lpfc_mbx_cq_create_set_cqe_cnt_WORD word1
1389+
#define lpfc_mbx_cq_create_set_cqecnt_SHIFT 27
1390+
#define lpfc_mbx_cq_create_set_cqecnt_MASK 0x00000003
1391+
#define lpfc_mbx_cq_create_set_cqecnt_WORD word1
13891392
#define lpfc_mbx_cq_create_set_cqe_size_SHIFT 25
13901393
#define lpfc_mbx_cq_create_set_cqe_size_MASK 0x00000003
13911394
#define lpfc_mbx_cq_create_set_cqe_size_WORD word1
@@ -1398,13 +1401,16 @@ struct lpfc_mbx_cq_create_set {
13981401
#define lpfc_mbx_cq_create_set_clswm_SHIFT 12
13991402
#define lpfc_mbx_cq_create_set_clswm_MASK 0x00000003
14001403
#define lpfc_mbx_cq_create_set_clswm_WORD word1
1404+
#define lpfc_mbx_cq_create_set_cqe_cnt_hi_SHIFT 0
1405+
#define lpfc_mbx_cq_create_set_cqe_cnt_hi_MASK 0x0000001F
1406+
#define lpfc_mbx_cq_create_set_cqe_cnt_hi_WORD word1
14011407
uint32_t word2;
14021408
#define lpfc_mbx_cq_create_set_arm_SHIFT 31
14031409
#define lpfc_mbx_cq_create_set_arm_MASK 0x00000001
14041410
#define lpfc_mbx_cq_create_set_arm_WORD word2
1405-
#define lpfc_mbx_cq_create_set_cq_cnt_SHIFT 16
1406-
#define lpfc_mbx_cq_create_set_cq_cnt_MASK 0x00007FFF
1407-
#define lpfc_mbx_cq_create_set_cq_cnt_WORD word2
1411+
#define lpfc_mbx_cq_create_set_cqe_cnt_lo_SHIFT 16
1412+
#define lpfc_mbx_cq_create_set_cqe_cnt_lo_MASK 0x00007FFF
1413+
#define lpfc_mbx_cq_create_set_cqe_cnt_lo_WORD word2
14081414
#define lpfc_mbx_cq_create_set_num_cq_SHIFT 0
14091415
#define lpfc_mbx_cq_create_set_num_cq_MASK 0x0000FFFF
14101416
#define lpfc_mbx_cq_create_set_num_cq_WORD word2

0 commit comments

Comments
 (0)