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 <jbra...@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



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#84826): https://edk2.groups.io/g/devel/message/84826
Mute This Topic: https://groups.io/mt/87726872/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Reply via email to