linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Subhash Jadavani <subhashj@codeaurora.org>
To: Zang Leigang <zangleigang@hisilicon.com>
Cc: vinholikatti@gmail.com, jejb@linux.vnet.ibm.com,
	martin.petersen@oracle.com, linux-scsi@vger.kernel.org,
	linux-scsi-owner@vger.kernel.org
Subject: Re: [PATCH] scsi: ufs: introduce a new ufshcd_statea UFSHCD_STATE_EH_SCHEDULED
Date: Wed, 16 Nov 2016 10:48:35 -0800	[thread overview]
Message-ID: <a80d0b3c77a2d68c1a1d1aa82dc76139@codeaurora.org> (raw)
In-Reply-To: <20161116032937.117395-1-zangleigang@hisilicon.com>

On 2016-11-15 19:29, Zang Leigang wrote:
> Add a new ufshcd_state, indicats that an err handler may get to run
> immediately. Use UFSHCD_STATE_ERROR here looks not literaly correct.
> 
> Signed-off-by: Zang Leigang <zangleigang@hisilicon.com>
> 
> diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
> index 05c7456..59d4130 100644
> --- a/drivers/scsi/ufs/ufshcd.c
> +++ b/drivers/scsi/ufs/ufshcd.c
> @@ -123,6 +123,7 @@ enum {
>  	UFSHCD_STATE_RESET,
>  	UFSHCD_STATE_ERROR,
>  	UFSHCD_STATE_OPERATIONAL,
> +	UFSHCD_STATE_EH_SCHEDULED,
>  };
> 
>  /* UFSHCD error handling flags */
> @@ -1410,6 +1411,7 @@ static int ufshcd_queuecommand(struct Scsi_Host
> *host, struct scsi_cmnd *cmd)
>  	switch (hba->ufshcd_state) {
>  	case UFSHCD_STATE_OPERATIONAL:
>  		break;
> +	case UFSHCD_STATE_EH_SCHEDULED:
>  	case UFSHCD_STATE_RESET:
>  		err = SCSI_MLQUEUE_HOST_BUSY;
>  		goto out_unlock;
> @@ -4158,7 +4160,7 @@ static void ufshcd_check_errors(struct ufs_hba 
> *hba)
>  			/* block commands from scsi mid-layer */
>  			scsi_block_requests(hba->host);
> 
> -			hba->ufshcd_state = UFSHCD_STATE_ERROR;
> +			hba->ufshcd_state = UFSHCD_STATE_EH_SCHEDULED;
>  			schedule_work(&hba->eh_work);
>  		}
>  	}


LGTM.
Reviewed-by: Subhash Jadavani <subhashj@codeaurora.org>


-- 
The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project

  reply	other threads:[~2016-11-16 18:48 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-16  3:29 [PATCH] scsi: ufs: introduce a new ufshcd_statea UFSHCD_STATE_EH_SCHEDULED Zang Leigang
2016-11-16 18:48 ` Subhash Jadavani [this message]
2016-11-17  1:29 ` 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=a80d0b3c77a2d68c1a1d1aa82dc76139@codeaurora.org \
    --to=subhashj@codeaurora.org \
    --cc=jejb@linux.vnet.ibm.com \
    --cc=linux-scsi-owner@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=vinholikatti@gmail.com \
    --cc=zangleigang@hisilicon.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).