public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Bart Van Assche <bvanassche@acm.org>
To: Adrian Hunter <adrian.hunter@intel.com>,
	Jaegeuk Kim <jaegeuk@kernel.org>,
	linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org,
	martin.petersen@oracle.com
Cc: Bart Van Assche <bvanassche@google.com>
Subject: Re: [PATCH 2/2] scsi: ufs: Stop clearing unit attentions
Date: Fri, 1 Oct 2021 09:59:45 -0700	[thread overview]
Message-ID: <5e087a0f-7ae0-41d1-c1f1-e5cc0ad2d38f@acm.org> (raw)
In-Reply-To: <f2436720-16d5-58da-abcc-20fa1ed01fb9@intel.com>

On 9/30/21 11:52 PM, Adrian Hunter wrote:
> Finally, there is another thing to change.  The reason
> ufshcd_suspend_prepare() does a runtime resume of sdev_rpmb is because the
> UAC clear would wait for an async runtime resume, which will never happen
> during system suspend because the PM workqueue gets frozen.  So with the
> removal of UAC clear, ufshcd_suspend_prepare() and ufshcd_resume_complete()
> should be updated also, to leave rpmb alone.

Is the following change what you have in mind?


diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
index 0a28cc4c09d8..0743f54e55f9 100644
--- a/drivers/scsi/ufs/ufshcd.c
+++ b/drivers/scsi/ufs/ufshcd.c
@@ -9648,10 +9648,6 @@ void ufshcd_resume_complete(struct device *dev)
  		ufshcd_rpm_put(hba);
  		hba->complete_put = false;
  	}
-	if (hba->rpmb_complete_put) {
-		ufshcd_rpmb_rpm_put(hba);
-		hba->rpmb_complete_put = false;
-	}
  }
  EXPORT_SYMBOL_GPL(ufshcd_resume_complete);

@@ -9674,10 +9670,6 @@ int ufshcd_suspend_prepare(struct device *dev)
  		}
  		hba->complete_put = true;
  	}
-	if (hba->sdev_rpmb) {
-		ufshcd_rpmb_rpm_get_sync(hba);
-		hba->rpmb_complete_put = true;
-	}
  	return 0;
  }
  EXPORT_SYMBOL_GPL(ufshcd_suspend_prepare);
diff --git a/drivers/scsi/ufs/ufshcd.h b/drivers/scsi/ufs/ufshcd.h
index 86b615023ecb..5ecfcd8cae0a 100644
--- a/drivers/scsi/ufs/ufshcd.h
+++ b/drivers/scsi/ufs/ufshcd.h
@@ -921,7 +921,6 @@ struct ufs_hba {
  #endif
  	u32 luns_avail;
  	bool complete_put;
-	bool rpmb_complete_put;
  };

  /* Returns true if clocks can be gated. Otherwise false */



Thanks,

Bart.

  reply	other threads:[~2021-10-01 16:59 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-30 19:52 [PATCH 1/2] scsi: ufs: retry START_STOP on UNIT_ATTENTION Jaegeuk Kim
2021-09-30 19:52 ` [PATCH 2/2] scsi: ufs: Stop clearing unit attentions Jaegeuk Kim
2021-10-01  4:58   ` Adrian Hunter
2021-10-01  6:52     ` Adrian Hunter
2021-10-01 16:59       ` Bart Van Assche [this message]
2021-10-01 17:21         ` Douglas Gilbert
2021-10-01 17:40           ` Bart Van Assche
2021-10-01 17:24         ` Adrian Hunter
2021-10-01 16:19     ` Bart Van Assche
2021-09-30 19:55 ` [PATCH 1/2] scsi: ufs: retry START_STOP on UNIT_ATTENTION Bart Van Assche
  -- strict thread matches above, loose matches on Subject: below --
2021-10-01 18:20 [PATCH 0/2 v2] kill clearing UA in UFS driver Jaegeuk Kim
2021-10-01 18:20 ` [PATCH 2/2] scsi: ufs: Stop clearing unit attentions Jaegeuk Kim

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=5e087a0f-7ae0-41d1-c1f1-e5cc0ad2d38f@acm.org \
    --to=bvanassche@acm.org \
    --cc=adrian.hunter@intel.com \
    --cc=bvanassche@google.com \
    --cc=jaegeuk@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --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