All of lore.kernel.org
 help / color / mirror / Atom feed
From: James Smart <jsmart2021@gmail.com>
To: linux-scsi@vger.kernel.org
Cc: linux-nvme@lists.infradead.org,
	James Smart <jsmart2021@gmail.com>,
	Gaurav Srivastava <gaurav.srivastava@broadcom.com>
Subject: [PATCH 3/4] lpfc: rework lpfc_vmid_get_appid() to be protocol independent
Date: Tue, 10 May 2022 13:00:27 -0700	[thread overview]
Message-ID: <20220510200028.37399-4-jsmart2021@gmail.com> (raw)
In-Reply-To: <20220510200028.37399-1-jsmart2021@gmail.com>

Rework lpfc_vmid_get_appid() arguments to remove scsi cmd dependency.
It's now callable by nvme path.

Fixup scsi calling path for arg change.

Signed-off-by: Gaurav Srivastava <gaurav.srivastava@broadcom.com>
Signed-off-by: James Smart <jsmart2021@gmail.com>
---
 drivers/scsi/lpfc/lpfc_crtn.h | 5 +++--
 drivers/scsi/lpfc/lpfc_scsi.c | 7 ++++---
 2 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/drivers/scsi/lpfc/lpfc_crtn.h b/drivers/scsi/lpfc/lpfc_crtn.h
index 913844f01bf5..b1be0dd0337a 100644
--- a/drivers/scsi/lpfc/lpfc_crtn.h
+++ b/drivers/scsi/lpfc/lpfc_crtn.h
@@ -671,8 +671,9 @@ int lpfc_vmid_cmd(struct lpfc_vport *vport,
 int lpfc_vmid_hash_fn(const char *vmid, int len);
 struct lpfc_vmid *lpfc_get_vmid_from_hashtable(struct lpfc_vport *vport,
 					      uint32_t hash, uint8_t *buf);
-int lpfc_vmid_get_appid(struct lpfc_vport *vport, char *uuid, struct
-			       scsi_cmnd * cmd, union lpfc_vmid_io_tag *tag);
+int lpfc_vmid_get_appid(struct lpfc_vport *vport, char *uuid,
+			enum dma_data_direction iodir,
+			union lpfc_vmid_io_tag *tag);
 void lpfc_vmid_vport_cleanup(struct lpfc_vport *vport);
 int lpfc_issue_els_qfpa(struct lpfc_vport *vport);
 
diff --git a/drivers/scsi/lpfc/lpfc_scsi.c b/drivers/scsi/lpfc/lpfc_scsi.c
index 70d0a4d3d92e..f5f4409e24cd 100644
--- a/drivers/scsi/lpfc/lpfc_scsi.c
+++ b/drivers/scsi/lpfc/lpfc_scsi.c
@@ -5446,9 +5446,10 @@ lpfc_queuecommand(struct Scsi_Host *shost, struct scsi_cmnd *cmnd)
 		uuid = lpfc_is_command_vm_io(cmnd);
 
 		if (uuid) {
-			err = lpfc_vmid_get_appid(vport, uuid, cmnd,
-				(union lpfc_vmid_io_tag *)
-					&cur_iocbq->vmid_tag);
+			err = lpfc_vmid_get_appid(vport, uuid,
+					cmnd->sc_data_direction,
+					(union lpfc_vmid_io_tag *)
+						&cur_iocbq->vmid_tag);
 			if (!err)
 				cur_iocbq->cmd_flag |= LPFC_IO_VMID;
 		}
-- 
2.26.2


  parent reply	other threads:[~2022-05-10 20:00 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-10 20:00 [PATCH 0/4] Add VMID support to nvme-fc transport and lpfc driver James Smart
2022-05-10 20:00 ` [PATCH 1/4] nvme-fc: Add new routine nvme_fc_io_getuuid James Smart
2022-05-12  9:50   ` Hannes Reinecke
2022-05-12 23:38   ` Himanshu Madhani
2022-05-16  5:57   ` Christoph Hellwig
2022-05-10 20:00 ` [PATCH 2/4] lpfc: commonize VMID code location James Smart
2022-05-12  9:50   ` Hannes Reinecke
2022-05-12 23:45   ` Himanshu Madhani
2022-05-10 20:00 ` James Smart [this message]
2022-05-12  9:51   ` [PATCH 3/4] lpfc: rework lpfc_vmid_get_appid() to be protocol independent Hannes Reinecke
2022-05-12 23:48   ` Himanshu Madhani
2022-05-10 20:00 ` [PATCH 4/4] lpfc: Add support for vmid tagging of NVMe I/Os James Smart
2022-05-12  9:51   ` Hannes Reinecke
2022-05-12 23:50   ` Himanshu Madhani
2022-05-17  1:40 ` [PATCH 0/4] Add VMID support to nvme-fc transport and lpfc driver Martin K. Petersen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220510200028.37399-4-jsmart2021@gmail.com \
    --to=jsmart2021@gmail.com \
    --cc=gaurav.srivastava@broadcom.com \
    --cc=linux-nvme@lists.infradead.org \
    --cc=linux-scsi@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.