From: Hannes Reinecke <hare@suse.de>
To: James Smart <james.smart@broadcom.com>
Cc: Dick Kennedy <dick.kennedy@broadcom.com>,
"Martin K. Petersen" <martin.petersen@oracle.com>,
Christoph Hellwig <hch@lst.de>,
James Bottomley <james.bottomley@hansenpartnership.com>,
linux-scsi@vger.kernel.org, Hannes Reinecke <hare@suse.de>,
Hannes Reinecke <hare@suse.com>
Subject: [PATCH 2/3] lpfc: access nodelist through scsi-specific rdata pointer
Date: Fri, 18 Oct 2019 09:50:09 +0200 [thread overview]
Message-ID: <20191018075010.55653-3-hare@suse.de> (raw)
In-Reply-To: <20191018075010.55653-1-hare@suse.de>
Access the nodelist through the scsi-specific rdata pointer when
handling SCSI requests.
Signed-off-by: Hannes Reinecke <hare@suse.com>
---
drivers/scsi/lpfc/lpfc_scsi.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/scsi/lpfc/lpfc_scsi.c b/drivers/scsi/lpfc/lpfc_scsi.c
index bb66dfb8dd71..5f80ec31afb7 100644
--- a/drivers/scsi/lpfc/lpfc_scsi.c
+++ b/drivers/scsi/lpfc/lpfc_scsi.c
@@ -808,8 +808,8 @@ lpfc_release_scsi_buf_s4(struct lpfc_hba *phba, struct lpfc_io_buf *psb)
static void
lpfc_release_scsi_buf(struct lpfc_hba *phba, struct lpfc_io_buf *psb)
{
- if ((psb->flags & LPFC_SBUF_BUMP_QDEPTH) && psb->ndlp)
- atomic_dec(&psb->ndlp->cmd_pending);
+ if ((psb->flags & LPFC_SBUF_BUMP_QDEPTH) && psb->scsi.rdata->pnode)
+ atomic_dec(&psb->scsi.rdata->pnode->cmd_pending);
psb->flags &= ~LPFC_SBUF_BUMP_QDEPTH;
phba->lpfc_release_scsi_buf(phba, psb);
@@ -4580,7 +4580,6 @@ lpfc_queuecommand(struct Scsi_Host *shost, struct scsi_cmnd *cmnd)
*/
lpfc_cmd->scsi.pCmd = cmnd;
lpfc_cmd->scsi.rdata = rdata;
- lpfc_cmd->ndlp = ndlp;
cmnd->host_scribble = (unsigned char *)lpfc_cmd;
if (scsi_get_prot_op(cmnd) != SCSI_PROT_NORMAL) {
@@ -5035,7 +5034,6 @@ lpfc_send_taskmgmt(struct lpfc_vport *vport, struct scsi_cmnd *cmnd,
lpfc_cmd->timeout = phba->cfg_task_mgmt_tmo;
lpfc_cmd->scsi.rdata = rdata;
lpfc_cmd->scsi.pCmd = cmnd;
- lpfc_cmd->ndlp = pnode;
status = lpfc_scsi_prep_task_mgmt_cmd(vport, lpfc_cmd, lun_id,
task_mgmt_cmd);
--
2.16.4
next prev parent reply other threads:[~2019-10-18 7:50 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-18 7:50 [RFC PATCH 0/3] lpfc: nodelist pointer cleanup Hannes Reinecke
2019-10-18 7:50 ` [PATCH 1/3] lpfc: use named structure for combined I/O buffer Hannes Reinecke
2019-10-18 7:50 ` Hannes Reinecke [this message]
2019-10-18 7:50 ` [PATCH 3/3] lpfc: access nvme nodelist through nvme rport structure Hannes Reinecke
2019-10-18 21:45 ` [RFC PATCH 0/3] lpfc: nodelist pointer cleanup James Smart
2019-10-19 15:55 ` Hannes Reinecke
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=20191018075010.55653-3-hare@suse.de \
--to=hare@suse.de \
--cc=dick.kennedy@broadcom.com \
--cc=hare@suse.com \
--cc=hch@lst.de \
--cc=james.bottomley@hansenpartnership.com \
--cc=james.smart@broadcom.com \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).