diff options
author | Hannes Reinecke <hare@kernel.org> | 2024-05-27 07:15:25 +0200 |
---|---|---|
committer | Keith Busch <kbusch@kernel.org> | 2024-06-24 12:53:43 -0700 |
commit | bf86e7d97b448eadf7959f025ce9e39c42eef92d (patch) | |
tree | 0ddee52338813dc9f3b5ee210613e0f56badc683 /drivers/scsi/lpfc | |
parent | bbb443e99cd34a49ab9f14c5519447cdabff1a46 (diff) | |
download | linux-bf86e7d97b448eadf7959f025ce9e39c42eef92d.tar.gz linux-bf86e7d97b448eadf7959f025ce9e39c42eef92d.tar.bz2 linux-bf86e7d97b448eadf7959f025ce9e39c42eef92d.zip |
lpfc_nvmet: implement 'host_traddr'
Implement the 'host_traddr' callback to display the host transport
address for nvmet debugfs.
Signed-off-by: Hannes Reinecke <hare@kernel.org>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
Reviewed-by: Justin Tee <justin.tee@broadcom.com>
Signed-off-by: Daniel Wagner <dwagner@suse.de>
Signed-off-by: Keith Busch <kbusch@kernel.org>
Diffstat (limited to 'drivers/scsi/lpfc')
-rw-r--r-- | drivers/scsi/lpfc/lpfc_nvmet.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/scsi/lpfc/lpfc_nvmet.c b/drivers/scsi/lpfc/lpfc_nvmet.c index 5297cacc8beb..0cef5d089f34 100644 --- a/drivers/scsi/lpfc/lpfc_nvmet.c +++ b/drivers/scsi/lpfc/lpfc_nvmet.c @@ -1363,6 +1363,16 @@ lpfc_nvmet_ls_abort(struct nvmet_fc_target_port *targetport, atomic_inc(&lpfc_nvmet->xmt_ls_abort); } +static int +lpfc_nvmet_host_traddr(void *hosthandle, u64 *wwnn, u64 *wwpn) +{ + struct lpfc_nodelist *ndlp = hosthandle; + + *wwnn = wwn_to_u64(ndlp->nlp_nodename.u.wwn); + *wwpn = wwn_to_u64(ndlp->nlp_portname.u.wwn); + return 0; +} + static void lpfc_nvmet_host_release(void *hosthandle) { @@ -1413,6 +1423,7 @@ static struct nvmet_fc_target_template lpfc_tgttemplate = { .ls_req = lpfc_nvmet_ls_req, .ls_abort = lpfc_nvmet_ls_abort, .host_release = lpfc_nvmet_host_release, + .host_traddr = lpfc_nvmet_host_traddr, .max_hw_queues = 1, .max_sgl_segments = LPFC_NVMET_DEFAULT_SEGS, |