All of lore.kernel.org
 help / color / mirror / Atom feed
From: "hoyoung seo" <hy50.seo@samsung.com>
To: "'Bart Van Assche'" <bvanassche@acm.org>
Cc: <Arthur.Simchaev@wdc.com>, <JBottomley@Parallels.com>,
	<adrian.hunter@intel.com>, <athierry@redhat.com>,
	<avri.altman@wdc.com>, <beanhuo@micron.com>, <jaegeuk@kernel.org>,
	<jejb@linux.ibm.com>, <linux-scsi@vger.kernel.org>,
	<martin.petersen@oracle.com>, <quic_asutoshd@quicinc.com>,
	<quic_ziqichen@quicinc.com>, <santoshsy@gmail.com>,
	<stanley.chu@mediatek.com>, <cpgs@samsung.com>,
	<sc.suh@samsung.com>, <kwmad.kim@samsung.com>,
	<kwangwon.min@samsung.com>, <sh425.lee@samsung.com>
Subject: RE: [PATCH v3 2/4] scsi: ufs: Fix handling of lrbp->cmd
Date: Wed, 28 Jun 2023 16:44:06 +0900	[thread overview]
Message-ID: <1296674576.21687938782544.JavaMail.epsvc@epcpadp4> (raw)
In-Reply-To: <c8bc7bde-ebdc-aea1-b875-0966e48c29ee@acm.org>

> From: Bart Van Assche <bvanassche@acm.org>
> Sent: Wednesday, June 28, 2023 4:54 AM
> To: hoyoung seo <hy50.seo@samsung.com>
> Cc: Arthur.Simchaev@wdc.com; JBottomley@Parallels.com;
> adrian.hunter@intel.com; athierry@redhat.com; avri.altman@wdc.com;
> beanhuo@micron.com; jaegeuk@kernel.org; jejb@linux.ibm.com; linux-
> scsi@vger.kernel.org; martin.petersen@oracle.com;
> quic_asutoshd@quicinc.com; quic_ziqichen@quicinc.com; santoshsy@gmail.com;
> stanley.chu@mediatek.com; cpgs@samsung.com; sc.suh@samsung.com;
> kwmad.kim@samsung.com; kwangwon.min@samsung.com; sh425.lee@samsung.com
> Subject: Re: [PATCH v3 2/4] scsi: ufs: Fix handling of lrbp->cmd
> 
> On 6/26/23 18:26, hoyoung seo wrote:
> > @@ -5408,7 +5406,6 @@ static void ufshcd_release_scsi_cmd(struct ufs_hba
> *hba,
> >   	struct scsi_cmnd *cmd = lrbp->cmd;
> >
> >   	scsi_dma_unmap(cmd);
> > -	lrbp->cmd = NULL;	/* Mark the command as completed. */
> >   	ufshcd_release(hba);
> >   	ufshcd_clk_scaling_update_busy(hba);
> >   }
> >
> > Hi,
> > Is there any reason to delete "lrbp->cmd = NULL"?
> > As far as I know, clear to NULL to indicate that cmd is completed.
> >
> > When the UFS MCQ mode is activated, check that lrbp->cmd is NULL to
> check the completion of the command.
> > https://lore.kernel.org/linux-scsi/f0d923ee1f009f171a55c258d044e814ec0
> > 917ab.1685396241.git.quic_nguyenb@quicinc.com/
> >
> > If there is no special reason, why don't you add "lrb->cmd = NULL" again?
> 
> The lrbp->cmd = NULL assignment has been removed because if it would be
> kept the SCSI error handler would crash if it reuses a SCSI command. See
> also the
> scsi_eh_prep_cmnd() and scsi_eh_restore_cmnd() callers. The MCQ code
> should still work because it uses blk_mq_request_started() to check
> whether or not a request is still active.
> 
> Bart.

Hi,

Thank you for your kind reply.
Let me take a closer look at the code of the scsi layer

Seo.



  reply	other threads:[~2023-06-28  7:54 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20230627012659epcas2p1961cc5bf75bf1a324f6f4fdebd7f897c@epcas2p1.samsung.com>
2023-06-27  1:26 ` [PATCH v3 2/4] scsi: ufs: Fix handling of lrbp->cmd hoyoung seo
2023-06-27 19:53   ` Bart Van Assche
2023-06-28  7:44     ` hoyoung seo [this message]
     [not found] <CGME20260212105422epcas2p44c875c9f8d57d1b4f6d231b9aef833c9@epcas2p4.samsung.com>
2026-02-12 10:54 ` hoyoung seo
2026-02-12 17:05   ` Bart Van Assche
     [not found] <CGME20260212104911epcas2p1ada1bb6a8bcac1126bece2dccd3ed10f@epcas2p1.samsung.com>
2026-02-12 10:49 ` hoyoung seo
2023-05-24 20:36 [PATCH v3 0/4] UFS host controller driver patches Bart Van Assche
2023-05-24 20:36 ` [PATCH v3 2/4] scsi: ufs: Fix handling of lrbp->cmd Bart Van Assche
2023-05-25  4:47   ` Adrian Hunter

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=1296674576.21687938782544.JavaMail.epsvc@epcpadp4 \
    --to=hy50.seo@samsung.com \
    --cc=Arthur.Simchaev@wdc.com \
    --cc=JBottomley@Parallels.com \
    --cc=adrian.hunter@intel.com \
    --cc=athierry@redhat.com \
    --cc=avri.altman@wdc.com \
    --cc=beanhuo@micron.com \
    --cc=bvanassche@acm.org \
    --cc=cpgs@samsung.com \
    --cc=jaegeuk@kernel.org \
    --cc=jejb@linux.ibm.com \
    --cc=kwangwon.min@samsung.com \
    --cc=kwmad.kim@samsung.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=quic_asutoshd@quicinc.com \
    --cc=quic_ziqichen@quicinc.com \
    --cc=santoshsy@gmail.com \
    --cc=sc.suh@samsung.com \
    --cc=sh425.lee@samsung.com \
    --cc=stanley.chu@mediatek.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 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.