All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stanley Chu <stanley.chu@mediatek.com>
To: Bart Van Assche <bvanassche@acm.org>,
	"Martin K . Petersen" <martin.petersen@oracle.com>
Cc: Jaegeuk Kim <jaegeuk@kernel.org>,
	Adrian Hunter <adrian.hunter@intel.com>,
	<linux-scsi@vger.kernel.org>,
	"James E.J. Bottomley" <jejb@linux.ibm.com>,
	Can Guo <cang@codeaurora.org>, Bean Huo <beanhuo@micron.com>,
	Asutosh Das <asutoshd@codeaurora.org>,
	"James Bottomley" <James.Bottomley@HansenPartnership.com>,
	Vinayak Holikatti <vinholikatti@gmail.com>,
	Vishak G <vishak.g@samsung.com>,
	Girish K S <girish.shivananjappa@linaro.org>,
	Santosh Yaraganavi <santoshsy@gmail.com>
Subject: Re: [PATCH] scsi: ufs: Improve SCSI abort handling
Date: Sun, 7 Nov 2021 14:59:45 +0800	[thread overview]
Message-ID: <7d4f5762d3df2742ebb32d2feb586be2ccb46b20.camel@mediatek.com> (raw)
In-Reply-To: <20211104181059.4129537-1-bvanassche@acm.org>

Hi Bart,

On Thu, 2021-11-04 at 11:10 -0700, Bart Van Assche wrote:
> The following has been observed on a test setup:
> 
> WARNING: CPU: 4 PID: 250 at drivers/scsi/ufs/ufshcd.c:2737
> ufshcd_queuecommand+0x468/0x65c
> Call trace:
>  ufshcd_queuecommand+0x468/0x65c
>  scsi_send_eh_cmnd+0x224/0x6a0
>  scsi_eh_test_devices+0x248/0x418
>  scsi_eh_ready_devs+0xc34/0xe58
>  scsi_error_handler+0x204/0x80c
>  kthread+0x150/0x1b4
>  ret_from_fork+0x10/0x30
> 
> That warning is triggered by the following statement:
> 
> 	WARN_ON(lrbp->cmd);
> 
> Fix this warning by clearing lrbp->cmd from the abort handler.
> 
> Fixes: 7a3e97b0dc4b ("[SCSI] ufshcd: UFS Host controller driver")
> Signed-off-by: Bart Van Assche <bvanassche@acm.org>
> ---
>  drivers/scsi/ufs/ufshcd.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
> index 3b4a714e2f68..d8a59258b1dc 100644
> --- a/drivers/scsi/ufs/ufshcd.c
> +++ b/drivers/scsi/ufs/ufshcd.c
> @@ -7069,6 +7069,7 @@ static int ufshcd_abort(struct scsi_cmnd *cmd)
>  		goto release;
>  	}
>  
> +	lrbp->cmd = NULL;
>  	err = SUCCESS;
>  
>  release:

Thanks for this patch! We are looking at the same issue as well
recently.

Reviewed-by: Stanley Chu <stanley.chu@mediatek.com>




  parent reply	other threads:[~2021-11-07  6:59 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-04 18:10 [PATCH] scsi: ufs: Improve SCSI abort handling Bart Van Assche
2021-11-04 22:20 ` Bean Huo
     [not found] ` <CGME20211104181111epcas2p2965ba25c905be783c39f098210cc4c61@epcms2p2>
2021-11-04 22:39   ` Daejun Park
2021-11-04 23:14     ` Bart Van Assche
     [not found]     ` <CGME20211104181111epcas2p2965ba25c905be783c39f098210cc4c61@epcms2p1>
2021-11-04 23:39       ` Daejun Park
2021-11-04 23:54         ` Bart Van Assche
     [not found]         ` <CGME20211104181111epcas2p2965ba25c905be783c39f098210cc4c61@epcms2p4>
2021-11-05  1:53           ` Daejun Park
2021-11-07  6:59 ` Stanley Chu [this message]
2021-11-09  4:03 ` Martin K. Petersen
2021-11-19  4:16 ` Martin K. Petersen
2021-12-14 16:35   ` James Bottomley
2021-12-14 17:37     ` Bart Van Assche
2021-12-14 17:43       ` James Bottomley
2021-12-14 17:45         ` Bart Van Assche

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=7d4f5762d3df2742ebb32d2feb586be2ccb46b20.camel@mediatek.com \
    --to=stanley.chu@mediatek.com \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=adrian.hunter@intel.com \
    --cc=asutoshd@codeaurora.org \
    --cc=beanhuo@micron.com \
    --cc=bvanassche@acm.org \
    --cc=cang@codeaurora.org \
    --cc=girish.shivananjappa@linaro.org \
    --cc=jaegeuk@kernel.org \
    --cc=jejb@linux.ibm.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=santoshsy@gmail.com \
    --cc=vinholikatti@gmail.com \
    --cc=vishak.g@samsung.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.