public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Bart Van Assche <bvanassche@acm.org>
To: alice.chao@mediatek.com, Alim Akhtar <alim.akhtar@samsung.com>,
	Avri Altman <avri.altman@wdc.com>,
	"James E.J. Bottomley" <jejb@linux.ibm.com>,
	"Martin K. Petersen" <martin.petersen@oracle.com>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	AngeloGioacchino Del Regno 
	<angelogioacchino.delregno@collabora.com>
Cc: wsd_upstream@mediatek.com, stanley.chu@mediatek.com,
	peter.wang@mediatek.com, powen.kao@mediatek.com,
	naomi.chu@mediatek.com, cc.chou@mediatek.com,
	tun-yu.yu@mediatek.com, chun-hung.wu@mediatek.com,
	casper.li@mediatek.com, linux-scsi@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-mediatek@lists.infradead.org
Subject: Re: [PATCH 1/1] core: ufs: fix racing issue between force complete and isr
Date: Tue, 24 Oct 2023 12:00:39 -0700	[thread overview]
Message-ID: <6a89fb45-b940-4db8-9025-944ccd2d4628@acm.org> (raw)
In-Reply-To: <20231024084324.12197-1-alice.chao@mediatek.com>

On 10/24/23 01:43, alice.chao@mediatek.com wrote:
> diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c
> index 8382e8cfa414..ef6bd146a767 100644
> --- a/drivers/ufs/core/ufshcd.c
> +++ b/drivers/ufs/core/ufshcd.c
> @@ -5518,13 +5518,13 @@ static void ufshcd_mcq_compl_pending_transfer(struct ufs_hba *hba,
>   			 * For those cmds of which the cqes are not present
>   			 * in the cq, complete them explicitly.
>   			 */
> +			spin_lock_irqsave(&hwq->cq_lock, flags);
>   			if (cmd && !test_bit(SCMD_STATE_COMPLETE, &cmd->state)) {
> -				spin_lock_irqsave(&hwq->cq_lock, flags);
>   				set_host_byte(cmd, DID_REQUEUE);
>   				ufshcd_release_scsi_cmd(hba, lrbp);
>   				scsi_done(cmd);
> -				spin_unlock_irqrestore(&hwq->cq_lock, flags);
>   			}
> +			spin_unlock_irqrestore(&hwq->cq_lock, flags);
>   		} else {
>   			ufshcd_mcq_poll_cqe_lock(hba, hwq);
>   		}

Reviewed-by: Bart Van Assche <bvanassche@acm.org>


  reply	other threads:[~2023-10-24 19:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-24  8:43 [PATCH 1/1] core: ufs: fix racing issue between force complete and isr alice.chao
2023-10-24 19:00 ` Bart Van Assche [this message]
2023-10-25  2:43 ` Martin K. Petersen
     [not found]   ` <dd57ef80bcf451e2daab2b08b8f6a6e11b4e4003.camel@mediatek.com>
2023-10-25  8:31     ` gregkh

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=6a89fb45-b940-4db8-9025-944ccd2d4628@acm.org \
    --to=bvanassche@acm.org \
    --cc=alice.chao@mediatek.com \
    --cc=alim.akhtar@samsung.com \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=avri.altman@wdc.com \
    --cc=casper.li@mediatek.com \
    --cc=cc.chou@mediatek.com \
    --cc=chun-hung.wu@mediatek.com \
    --cc=jejb@linux.ibm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=matthias.bgg@gmail.com \
    --cc=naomi.chu@mediatek.com \
    --cc=peter.wang@mediatek.com \
    --cc=powen.kao@mediatek.com \
    --cc=stanley.chu@mediatek.com \
    --cc=tun-yu.yu@mediatek.com \
    --cc=wsd_upstream@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox