public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Jeff Brasen" <jbrasen@nvidia.com>
To: <devel@edk2.groups.io>
Cc: <hao.a.wu@intel.com>, <ray.ni@intel.com>,
	Jeff Brasen <jbrasen@nvidia.com>
Subject: [PATCH] MdeModulePkg/ScsiDisk: Change TPL to NOTIFY
Date: Tue, 14 Dec 2021 17:59:20 +0000	[thread overview]
Message-ID: <cabfee4150c1adc404c62e442301ca4b1b43b66f.1639504483.git.jbrasen@nvidia.com> (raw)

Increase TPL to TPL_NOTIFY to allow for use if caller is > TPL_CALLBACK.
This allows services like variable services that run at TPL_NOTIFY to
be hosted on ScsiDisks (i.e. UFS)

Aligns with the eMMC driver that also uses a higher TPL.
This change was made in 3b1d8241d0dac25c5e678c364fa2754ac1731060

Signed-off-by: Jeff Brasen <jbrasen@nvidia.com>
---
 MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDisk.c | 22 ++++++++++----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDisk.c b/MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDisk.c
index 98e84b4ea8..b6e5848e77 100644
--- a/MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDisk.c
+++ b/MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDisk.c
@@ -514,7 +514,7 @@ ScsiDiskReset (
   SCSI_DISK_DEV  *ScsiDiskDevice;
   EFI_STATUS     Status;
 
-  OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
+  OldTpl = gBS->RaiseTPL (TPL_NOTIFY);
 
   ScsiDiskDevice = SCSI_DISK_DEV_FROM_BLKIO (This);
 
@@ -581,7 +581,7 @@ ScsiDiskReadBlocks (
   EFI_TPL             OldTpl;
 
   MediaChange    = FALSE;
-  OldTpl         = gBS->RaiseTPL (TPL_CALLBACK);
+  OldTpl         = gBS->RaiseTPL (TPL_NOTIFY);
   ScsiDiskDevice = SCSI_DISK_DEV_FROM_BLKIO (This);
   Media          = ScsiDiskDevice->BlkIo.Media;
 
@@ -733,7 +733,7 @@ ScsiDiskWriteBlocks (
   EFI_TPL             OldTpl;
 
   MediaChange    = FALSE;
-  OldTpl         = gBS->RaiseTPL (TPL_CALLBACK);
+  OldTpl         = gBS->RaiseTPL (TPL_NOTIFY);
   ScsiDiskDevice = SCSI_DISK_DEV_FROM_BLKIO (This);
   Media          = ScsiDiskDevice->BlkIo.Media;
 
@@ -898,7 +898,7 @@ ScsiDiskResetEx (
   SCSI_DISK_DEV  *ScsiDiskDevice;
   EFI_STATUS     Status;
 
-  OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
+  OldTpl = gBS->RaiseTPL (TPL_NOTIFY);
 
   ScsiDiskDevice = SCSI_DISK_DEV_FROM_BLKIO2 (This);
 
@@ -975,7 +975,7 @@ ScsiDiskReadBlocksEx (
   EFI_TPL             OldTpl;
 
   MediaChange    = FALSE;
-  OldTpl         = gBS->RaiseTPL (TPL_CALLBACK);
+  OldTpl         = gBS->RaiseTPL (TPL_NOTIFY);
   ScsiDiskDevice = SCSI_DISK_DEV_FROM_BLKIO2 (This);
   Media          = ScsiDiskDevice->BlkIo.Media;
 
@@ -1154,7 +1154,7 @@ ScsiDiskWriteBlocksEx (
   EFI_TPL             OldTpl;
 
   MediaChange    = FALSE;
-  OldTpl         = gBS->RaiseTPL (TPL_CALLBACK);
+  OldTpl         = gBS->RaiseTPL (TPL_NOTIFY);
   ScsiDiskDevice = SCSI_DISK_DEV_FROM_BLKIO2 (This);
   Media          = ScsiDiskDevice->BlkIo.Media;
 
@@ -1323,7 +1323,7 @@ ScsiDiskFlushBlocksEx (
   EFI_TPL             OldTpl;
 
   MediaChange    = FALSE;
-  OldTpl         = gBS->RaiseTPL (TPL_CALLBACK);
+  OldTpl         = gBS->RaiseTPL (TPL_NOTIFY);
   ScsiDiskDevice = SCSI_DISK_DEV_FROM_BLKIO2 (This);
   Media          = ScsiDiskDevice->BlkIo.Media;
 
@@ -1717,7 +1717,7 @@ ScsiDiskEraseBlocks (
   EFI_TPL             OldTpl;
 
   MediaChange    = FALSE;
-  OldTpl         = gBS->RaiseTPL (TPL_CALLBACK);
+  OldTpl         = gBS->RaiseTPL (TPL_NOTIFY);
   ScsiDiskDevice = SCSI_DISK_DEV_FROM_ERASEBLK (This);
 
   if (!IS_DEVICE_FIXED (ScsiDiskDevice)) {
@@ -1907,7 +1907,7 @@ ScsiDiskReceiveData (
   AlignedBuffer          = NULL;
   MediaChange            = FALSE;
   AlignedBufferAllocated = FALSE;
-  OldTpl                 = gBS->RaiseTPL (TPL_CALLBACK);
+  OldTpl                 = gBS->RaiseTPL (TPL_NOTIFY);
   ScsiDiskDevice         = SCSI_DISK_DEV_FROM_STORSEC (This);
   Media                  = ScsiDiskDevice->BlkIo.Media;
 
@@ -2122,7 +2122,7 @@ ScsiDiskSendData (
   AlignedBuffer          = NULL;
   MediaChange            = FALSE;
   AlignedBufferAllocated = FALSE;
-  OldTpl                 = gBS->RaiseTPL (TPL_CALLBACK);
+  OldTpl                 = gBS->RaiseTPL (TPL_NOTIFY);
   ScsiDiskDevice         = SCSI_DISK_DEV_FROM_STORSEC (This);
   Media                  = ScsiDiskDevice->BlkIo.Media;
 
@@ -2294,7 +2294,7 @@ ScsiDiskDetectMedia (
 
   Status = gBS->CreateEvent (
                   EVT_TIMER,
-                  TPL_CALLBACK,
+                  TPL_NOTIFY,
                   NULL,
                   NULL,
                   &TimeoutEvt
-- 
2.17.1


             reply	other threads:[~2021-12-14 17:59 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-14 17:59 Jeff Brasen [this message]
2021-12-15  2:59 ` [PATCH] MdeModulePkg/ScsiDisk: Change TPL to NOTIFY Wu, Hao A
2021-12-15  4:48   ` Jeff Brasen
2021-12-15  5:43     ` Wu, Hao A
2021-12-17  4:07       ` Zeng, Star
2022-03-10 16:38         ` [edk2-devel] " Jeff Brasen
2022-06-17 15:37     ` Jeff Brasen
2022-06-23  2:46       ` [edk2-devel] " Wu, Hao A
2022-06-23  2:53         ` Wu, Hao A

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-list 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=cabfee4150c1adc404c62e442301ca4b1b43b66f.1639504483.git.jbrasen@nvidia.com \
    --to=devel@edk2.groups.io \
    /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