Skip to content

Commit bf86e7d

Browse files
Hannes Reineckekeithbusch
authored andcommitted
lpfc_nvmet: implement 'host_traddr'
Implement the 'host_traddr' callback to display the host transport address for nvmet debugfs. Signed-off-by: Hannes Reinecke <[email protected]> Reviewed-by: Sagi Grimberg <[email protected]> Reviewed-by: Chaitanya Kulkarni <[email protected]> Reviewed-by: Justin Tee <[email protected]> Signed-off-by: Daniel Wagner <[email protected]> Signed-off-by: Keith Busch <[email protected]>
1 parent bbb443e commit bf86e7d

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

drivers/scsi/lpfc/lpfc_nvmet.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1363,6 +1363,16 @@ lpfc_nvmet_ls_abort(struct nvmet_fc_target_port *targetport,
13631363
atomic_inc(&lpfc_nvmet->xmt_ls_abort);
13641364
}
13651365

1366+
static int
1367+
lpfc_nvmet_host_traddr(void *hosthandle, u64 *wwnn, u64 *wwpn)
1368+
{
1369+
struct lpfc_nodelist *ndlp = hosthandle;
1370+
1371+
*wwnn = wwn_to_u64(ndlp->nlp_nodename.u.wwn);
1372+
*wwpn = wwn_to_u64(ndlp->nlp_portname.u.wwn);
1373+
return 0;
1374+
}
1375+
13661376
static void
13671377
lpfc_nvmet_host_release(void *hosthandle)
13681378
{
@@ -1413,6 +1423,7 @@ static struct nvmet_fc_target_template lpfc_tgttemplate = {
14131423
.ls_req = lpfc_nvmet_ls_req,
14141424
.ls_abort = lpfc_nvmet_ls_abort,
14151425
.host_release = lpfc_nvmet_host_release,
1426+
.host_traddr = lpfc_nvmet_host_traddr,
14161427

14171428
.max_hw_queues = 1,
14181429
.max_sgl_segments = LPFC_NVMET_DEFAULT_SEGS,

0 commit comments

Comments
 (0)