public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] Three small UFS driver patches
@ 2026-04-01 20:24 Bart Van Assche
  2026-04-01 20:24 ` [PATCH 1/3] ufs: core: Add a comment block above ufshcd_mcq_compl_all_cqes_lock() Bart Van Assche
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: Bart Van Assche @ 2026-04-01 20:24 UTC (permalink / raw)
  To: Martin K . Petersen; +Cc: linux-scsi, Bart Van Assche

Hi Martin,

Please consider this series of three small patches for the next merge window.

Thanks,

Bart.

Bart Van Assche (3):
  ufs: core: Add a comment block above ufshcd_mcq_compl_all_cqes_lock()
  ufs: core: Remove an include directive from ufshcd-crypto.h
  ufs: core: Make the header files self-contained

 drivers/ufs/core/ufs-debugfs.h         | 3 +++
 drivers/ufs/core/ufs-fault-injection.h | 2 ++
 drivers/ufs/core/ufs-mcq.c             | 8 ++++++++
 drivers/ufs/core/ufshcd-crypto.h       | 1 -
 4 files changed, 13 insertions(+), 1 deletion(-)


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 1/3] ufs: core: Add a comment block above ufshcd_mcq_compl_all_cqes_lock()
  2026-04-01 20:24 [PATCH 0/3] Three small UFS driver patches Bart Van Assche
@ 2026-04-01 20:24 ` Bart Van Assche
  2026-04-02  7:29   ` Peter Wang (王信友)
  2026-04-01 20:25 ` [PATCH 2/3] ufs: core: Remove an include directive from ufshcd-crypto.h Bart Van Assche
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 7+ messages in thread
From: Bart Van Assche @ 2026-04-01 20:24 UTC (permalink / raw)
  To: Martin K . Petersen
  Cc: linux-scsi, Bart Van Assche, James E.J. Bottomley, Peter Wang,
	vamshi gajjela, ping.gao, Chenyuan Yang

Document the aspects of ufshcd_mcq_compl_all_cqes_lock() that are
nontrivial in a comment block above this function.

Signed-off-by: Bart Van Assche <bvanassche@acm.org>
---
 drivers/ufs/core/ufs-mcq.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/ufs/core/ufs-mcq.c b/drivers/ufs/core/ufs-mcq.c
index 1b3062577945..c1b1d67a1ddc 100644
--- a/drivers/ufs/core/ufs-mcq.c
+++ b/drivers/ufs/core/ufs-mcq.c
@@ -322,6 +322,14 @@ static void ufshcd_mcq_process_cqe(struct ufs_hba *hba,
 	}
 }
 
+/*
+ * This function is called from the UFS error handler with the UFS host
+ * controller disabled (HCE = 0). Reading host controller registers, e.g. the
+ * CQ tail pointer (CQTPy), may not be safe with the host controller disabled.
+ * Hence, iterate over all completion queue entries. This won't result in
+ * double completions because ufshcd_mcq_process_cqe() clears a CQE after it
+ * has been processed.
+ */
 void ufshcd_mcq_compl_all_cqes_lock(struct ufs_hba *hba,
 				    struct ufs_hw_queue *hwq)
 {

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 2/3] ufs: core: Remove an include directive from ufshcd-crypto.h
  2026-04-01 20:24 [PATCH 0/3] Three small UFS driver patches Bart Van Assche
  2026-04-01 20:24 ` [PATCH 1/3] ufs: core: Add a comment block above ufshcd_mcq_compl_all_cqes_lock() Bart Van Assche
@ 2026-04-01 20:25 ` Bart Van Assche
  2026-04-01 20:25 ` [PATCH 3/3] ufs: core: Make the header files self-contained Bart Van Assche
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 7+ messages in thread
From: Bart Van Assche @ 2026-04-01 20:25 UTC (permalink / raw)
  To: Martin K . Petersen; +Cc: linux-scsi, Bart Van Assche, James E.J. Bottomley

Nothing in the ufshcd-crypto.h header file depends on the ufshcd-priv.h
header file. Hence, stop including that header file. This include
directive was introduced by commit 4bc26113c603 ("scsi: ufs: Split the
ufshcd.h header file").

Signed-off-by: Bart Van Assche <bvanassche@acm.org>
---
 drivers/ufs/core/ufshcd-crypto.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/ufs/core/ufshcd-crypto.h b/drivers/ufs/core/ufshcd-crypto.h
index c148a5194378..8f66db94e179 100644
--- a/drivers/ufs/core/ufshcd-crypto.h
+++ b/drivers/ufs/core/ufshcd-crypto.h
@@ -8,7 +8,6 @@
 
 #include <scsi/scsi_cmnd.h>
 #include <ufs/ufshcd.h>
-#include "ufshcd-priv.h"
 #include <ufs/ufshci.h>
 
 #ifdef CONFIG_SCSI_UFS_CRYPTO

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 3/3] ufs: core: Make the header files self-contained
  2026-04-01 20:24 [PATCH 0/3] Three small UFS driver patches Bart Van Assche
  2026-04-01 20:24 ` [PATCH 1/3] ufs: core: Add a comment block above ufshcd_mcq_compl_all_cqes_lock() Bart Van Assche
  2026-04-01 20:25 ` [PATCH 2/3] ufs: core: Remove an include directive from ufshcd-crypto.h Bart Van Assche
@ 2026-04-01 20:25 ` Bart Van Assche
  2026-04-03  1:27 ` [PATCH 0/3] Three small UFS driver patches Martin K. Petersen
  2026-04-09  2:42 ` Martin K. Petersen
  4 siblings, 0 replies; 7+ messages in thread
From: Bart Van Assche @ 2026-04-01 20:25 UTC (permalink / raw)
  To: Martin K . Petersen; +Cc: linux-scsi, Bart Van Assche, James E.J. Bottomley

Add the include directives and forward declarations that are missing
from the UFS core header files. This prevents compilation failures if
include directives are reordered.

Signed-off-by: Bart Van Assche <bvanassche@acm.org>
---
 drivers/ufs/core/ufs-debugfs.h         | 3 +++
 drivers/ufs/core/ufs-fault-injection.h | 2 ++
 2 files changed, 5 insertions(+)

diff --git a/drivers/ufs/core/ufs-debugfs.h b/drivers/ufs/core/ufs-debugfs.h
index 97548a3f90eb..e5bba9671862 100644
--- a/drivers/ufs/core/ufs-debugfs.h
+++ b/drivers/ufs/core/ufs-debugfs.h
@@ -5,6 +5,9 @@
 #ifndef __UFS_DEBUGFS_H__
 #define __UFS_DEBUGFS_H__
 
+#include <linux/init.h>
+#include <linux/types.h>
+
 struct ufs_hba;
 
 #ifdef CONFIG_DEBUG_FS
diff --git a/drivers/ufs/core/ufs-fault-injection.h b/drivers/ufs/core/ufs-fault-injection.h
index 996a35769781..d0c870e19f0e 100644
--- a/drivers/ufs/core/ufs-fault-injection.h
+++ b/drivers/ufs/core/ufs-fault-injection.h
@@ -6,6 +6,8 @@
 #include <linux/kconfig.h>
 #include <linux/types.h>
 
+struct ufs_hba;
+
 #ifdef CONFIG_SCSI_UFS_FAULT_INJECTION
 void ufs_fault_inject_hba_init(struct ufs_hba *hba);
 bool ufs_trigger_eh(struct ufs_hba *hba);

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/3] ufs: core: Add a comment block above ufshcd_mcq_compl_all_cqes_lock()
  2026-04-01 20:24 ` [PATCH 1/3] ufs: core: Add a comment block above ufshcd_mcq_compl_all_cqes_lock() Bart Van Assche
@ 2026-04-02  7:29   ` Peter Wang (王信友)
  0 siblings, 0 replies; 7+ messages in thread
From: Peter Wang (王信友) @ 2026-04-02  7:29 UTC (permalink / raw)
  To: bvanassche@acm.org, martin.petersen@oracle.com
  Cc: linux-scsi@vger.kernel.org, vamshigajjela@google.com,
	James.Bottomley@HansenPartnership.com, chenyuan0y@gmail.com,
	ping.gao@samsung.com

On Wed, 2026-04-01 at 13:24 -0700, Bart Van Assche wrote:
> Document the aspects of ufshcd_mcq_compl_all_cqes_lock() that are
> nontrivial in a comment block above this function.
> 
> Signed-off-by: Bart Van Assche <bvanassche@acm.org>

Reviewed-by: Peter Wang <peter.wang@mediatek.com>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 0/3] Three small UFS driver patches
  2026-04-01 20:24 [PATCH 0/3] Three small UFS driver patches Bart Van Assche
                   ` (2 preceding siblings ...)
  2026-04-01 20:25 ` [PATCH 3/3] ufs: core: Make the header files self-contained Bart Van Assche
@ 2026-04-03  1:27 ` Martin K. Petersen
  2026-04-09  2:42 ` Martin K. Petersen
  4 siblings, 0 replies; 7+ messages in thread
From: Martin K. Petersen @ 2026-04-03  1:27 UTC (permalink / raw)
  To: Bart Van Assche; +Cc: Martin K . Petersen, linux-scsi


Bart,

> Please consider this series of three small patches for the next merge
> window.

Applied to 7.1/scsi-staging, thanks!

-- 
Martin K. Petersen

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 0/3] Three small UFS driver patches
  2026-04-01 20:24 [PATCH 0/3] Three small UFS driver patches Bart Van Assche
                   ` (3 preceding siblings ...)
  2026-04-03  1:27 ` [PATCH 0/3] Three small UFS driver patches Martin K. Petersen
@ 2026-04-09  2:42 ` Martin K. Petersen
  4 siblings, 0 replies; 7+ messages in thread
From: Martin K. Petersen @ 2026-04-09  2:42 UTC (permalink / raw)
  To: Bart Van Assche; +Cc: Martin K . Petersen, linux-scsi

On Wed, 01 Apr 2026 13:24:58 -0700, Bart Van Assche wrote:

> Please consider this series of three small patches for the next merge window.
> 
> Thanks,
> 
> Bart.
> 
> Bart Van Assche (3):
>   ufs: core: Add a comment block above ufshcd_mcq_compl_all_cqes_lock()
>   ufs: core: Remove an include directive from ufshcd-crypto.h
>   ufs: core: Make the header files self-contained
> 
> [...]

Applied to 7.1/scsi-queue, thanks!

[1/3] ufs: core: Add a comment block above ufshcd_mcq_compl_all_cqes_lock()
      https://git.kernel.org/mkp/scsi/c/1373df88d535
[2/3] ufs: core: Remove an include directive from ufshcd-crypto.h
      https://git.kernel.org/mkp/scsi/c/efa1f6a9d7ce
[3/3] ufs: core: Make the header files self-contained
      https://git.kernel.org/mkp/scsi/c/6daa8dd03745

-- 
Martin K. Petersen

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2026-04-09  2:43 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-01 20:24 [PATCH 0/3] Three small UFS driver patches Bart Van Assche
2026-04-01 20:24 ` [PATCH 1/3] ufs: core: Add a comment block above ufshcd_mcq_compl_all_cqes_lock() Bart Van Assche
2026-04-02  7:29   ` Peter Wang (王信友)
2026-04-01 20:25 ` [PATCH 2/3] ufs: core: Remove an include directive from ufshcd-crypto.h Bart Van Assche
2026-04-01 20:25 ` [PATCH 3/3] ufs: core: Make the header files self-contained Bart Van Assche
2026-04-03  1:27 ` [PATCH 0/3] Three small UFS driver patches Martin K. Petersen
2026-04-09  2:42 ` Martin K. Petersen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox