Skip to content

Commit 5b5dedf

Browse files
Merge patch series "Update lpfc to revision 14.4.0.12"
Justin Tee <justin.tee@broadcom.com> says: Update lpfc to revision 14.4.0.12 This patch set contains updates to log messaging, revision of outdated comment descriptions, fixes to kref accounting, support for BB credit recovery in point-to-point mode, and introduction of registering unique platform name identifiers with fabrics. The patches were cut against Martin's 6.19/scsi-queue tree. Link: https://patch.msgid.link/20251106224639.139176-1-justintee8345@gmail.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2 parents e157102 + d45fdc6 commit 5b5dedf

10 files changed

Lines changed: 327 additions & 110 deletions

File tree

drivers/scsi/lpfc/lpfc.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,6 @@ struct lpfc_defer_flogi_acc {
311311
u16 rx_id;
312312
u16 ox_id;
313313
struct lpfc_nodelist *ndlp;
314-
315314
};
316315

317316
#define LPFC_VMID_TIMER 300 /* timer interval in seconds */
@@ -634,6 +633,7 @@ struct lpfc_vport {
634633
#define FC_CT_RSPN_ID 0x8 /* RSPN_ID accepted by switch */
635634
#define FC_CT_RFT_ID 0x10 /* RFT_ID accepted by switch */
636635
#define FC_CT_RPRT_DEFER 0x20 /* Defer issuing FDMI RPRT */
636+
#define FC_CT_RSPNI_PNI 0x40 /* RSPNI_PNI accepted by switch */
637637

638638
struct list_head fc_nodes;
639639
spinlock_t fc_nodes_list_lock; /* spinlock for fc_nodes list */
@@ -1078,6 +1078,8 @@ struct lpfc_hba {
10781078

10791079
uint32_t nport_event_cnt; /* timestamp for nlplist entry */
10801080

1081+
unsigned long pni; /* 64-bit Platform Name Identifier */
1082+
10811083
uint8_t wwnn[8];
10821084
uint8_t wwpn[8];
10831085
uint32_t RandomData[7];

drivers/scsi/lpfc/lpfc_ct.c

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1742,6 +1742,28 @@ lpfc_cmpl_ct_cmd_rsnn_nn(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
17421742
return;
17431743
}
17441744

1745+
static void
1746+
lpfc_cmpl_ct_cmd_rspni_pni(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
1747+
struct lpfc_iocbq *rspiocb)
1748+
{
1749+
struct lpfc_vport *vport;
1750+
struct lpfc_dmabuf *outp;
1751+
struct lpfc_sli_ct_request *ctrsp;
1752+
u32 ulp_status;
1753+
1754+
vport = cmdiocb->vport;
1755+
ulp_status = get_job_ulpstatus(phba, rspiocb);
1756+
1757+
if (ulp_status == IOSTAT_SUCCESS) {
1758+
outp = cmdiocb->rsp_dmabuf;
1759+
ctrsp = (struct lpfc_sli_ct_request *)outp->virt;
1760+
if (be16_to_cpu(ctrsp->CommandResponse.bits.CmdRsp) ==
1761+
SLI_CT_RESPONSE_FS_ACC)
1762+
vport->ct_flags |= FC_CT_RSPNI_PNI;
1763+
}
1764+
lpfc_cmpl_ct(phba, cmdiocb, rspiocb);
1765+
}
1766+
17451767
static void
17461768
lpfc_cmpl_ct_cmd_da_id(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
17471769
struct lpfc_iocbq *rspiocb)
@@ -1956,6 +1978,8 @@ lpfc_ns_cmd(struct lpfc_vport *vport, int cmdcode,
19561978
bpl->tus.f.bdeSize = RSPN_REQUEST_SZ;
19571979
else if (cmdcode == SLI_CTNS_RSNN_NN)
19581980
bpl->tus.f.bdeSize = RSNN_REQUEST_SZ;
1981+
else if (cmdcode == SLI_CTNS_RSPNI_PNI)
1982+
bpl->tus.f.bdeSize = RSPNI_REQUEST_SZ;
19591983
else if (cmdcode == SLI_CTNS_DA_ID)
19601984
bpl->tus.f.bdeSize = DA_ID_REQUEST_SZ;
19611985
else if (cmdcode == SLI_CTNS_RFF_ID)
@@ -2077,6 +2101,18 @@ lpfc_ns_cmd(struct lpfc_vport *vport, int cmdcode,
20772101
CtReq->un.rsnn.symbname, size);
20782102
cmpl = lpfc_cmpl_ct_cmd_rsnn_nn;
20792103
break;
2104+
case SLI_CTNS_RSPNI_PNI:
2105+
vport->ct_flags &= ~FC_CT_RSPNI_PNI;
2106+
CtReq->CommandResponse.bits.CmdRsp =
2107+
cpu_to_be16(SLI_CTNS_RSPNI_PNI);
2108+
CtReq->un.rspni.pni = cpu_to_be64(phba->pni);
2109+
scnprintf(CtReq->un.rspni.symbname,
2110+
sizeof(CtReq->un.rspni.symbname), "OS Host Name::%s",
2111+
phba->os_host_name);
2112+
CtReq->un.rspni.len = strnlen(CtReq->un.rspni.symbname,
2113+
sizeof(CtReq->un.rspni.symbname));
2114+
cmpl = lpfc_cmpl_ct_cmd_rspni_pni;
2115+
break;
20802116
case SLI_CTNS_DA_ID:
20812117
/* Implement DA_ID Nameserver request */
20822118
CtReq->CommandResponse.bits.CmdRsp =

drivers/scsi/lpfc/lpfc_disc.h

Lines changed: 2 additions & 1 deletion
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-2013 Emulex. All rights reserved. *
77
* EMULEX and SLI are trademarks of Emulex. *
@@ -208,6 +208,7 @@ enum lpfc_nlp_flag {
208208
NPR list */
209209
NLP_RM_DFLT_RPI = 26, /* need to remove leftover dflt RPI */
210210
NLP_NODEV_REMOVE = 27, /* Defer removal till discovery ends */
211+
NLP_FLOGI_DFR_ACC = 28, /* FLOGI LS_ACC was Deferred */
211212
NLP_SC_REQ = 29, /* Target requires authentication */
212213
NLP_FIRSTBURST = 30, /* Target supports FirstBurst */
213214
NLP_RPI_REGISTERED = 31 /* nlp_rpi is valid */

0 commit comments

Comments
 (0)