public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH 0/2] Adjust DEBUG prints level for SD/NVMe BlockIo services
@ 2018-06-12  3:36 Hao Wu
  2018-06-12  3:36 ` [PATCH 1/2] MdeModulePkg/NvmExpressDxe: Adjust R/W DEBUG prints to BLKIO level Hao Wu
  2018-06-12  3:36 ` [PATCH 2/2] MdeModulePkg/SdDxe: Demote DEBUG print to DEBUG_BLKIO Hao Wu
  0 siblings, 2 replies; 6+ messages in thread
From: Hao Wu @ 2018-06-12  3:36 UTC (permalink / raw)
  To: edk2-devel; +Cc: Hao Wu, Ard Biesheuvel, Star Zeng, Eric Dong

For the SdDxe and NvmExpressDxe drivers, adjust the level of I/O
information related DEBUG prints to DEBUG_BLKIO.

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Star Zeng <star.zeng@intel.com>
Cc: Eric Dong <eric.dong@intel.com>

Hao Wu (2):
  MdeModulePkg/NvmExpressDxe: Adjust R/W DEBUG prints to BLKIO level
  MdeModulePkg/SdDxe: Demote DEBUG print to DEBUG_BLKIO

 MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressBlockIo.c | 10 +++++-----
 MdeModulePkg/Bus/Sd/SdDxe/SdBlockIo.c                  |  4 ++--
 2 files changed, 7 insertions(+), 7 deletions(-)

-- 
2.12.0.windows.1



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

* [PATCH 1/2] MdeModulePkg/NvmExpressDxe: Adjust R/W DEBUG prints to BLKIO level
  2018-06-12  3:36 [PATCH 0/2] Adjust DEBUG prints level for SD/NVMe BlockIo services Hao Wu
@ 2018-06-12  3:36 ` Hao Wu
  2018-06-12  5:05   ` Zeng, Star
  2018-06-12  3:36 ` [PATCH 2/2] MdeModulePkg/SdDxe: Demote DEBUG print to DEBUG_BLKIO Hao Wu
  1 sibling, 1 reply; 6+ messages in thread
From: Hao Wu @ 2018-06-12  3:36 UTC (permalink / raw)
  To: edk2-devel; +Cc: Hao Wu, Ard Biesheuvel, Star Zeng, Eric Dong

REF:https://bugzilla.tianocore.org/show_bug.cgi?id=980

Adjust the DEBUG prints within function:
NvmeRead(), NvmeWrite(), AsyncNvmeRead() and AsyncNvmeWrite()

to DEBUG_BLKIO for the consistency with other storage device drivers
(e.g. ATA, USB and etc.).

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Star Zeng <star.zeng@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
---
 MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressBlockIo.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressBlockIo.c b/MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressBlockIo.c
index 734e1286c6..6c415109c1 100644
--- a/MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressBlockIo.c
+++ b/MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressBlockIo.c
@@ -2,7 +2,7 @@
   NvmExpressDxe driver is used to manage non-volatile memory subsystem which follows
   NVM Express specification.
 
-  Copyright (c) 2013 - 2016, Intel Corporation. All rights reserved.<BR>
+  Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR>
   This program and the accompanying materials
   are licensed and made available under the terms and conditions of the BSD License
   which accompanies this distribution.  The full text of the license may be found at
@@ -218,7 +218,7 @@ NvmeRead (
     }
   }
 
-  DEBUG ((EFI_D_VERBOSE, "%a: Lba = 0x%08Lx, Original = 0x%08Lx, "
+  DEBUG ((DEBUG_BLKIO, "%a: Lba = 0x%08Lx, Original = 0x%08Lx, "
     "Remaining = 0x%08Lx, BlockSize = 0x%x, Status = %r\n", __FUNCTION__, Lba,
     (UINT64)OrginalBlocks, (UINT64)Blocks, BlockSize, Status));
 
@@ -296,7 +296,7 @@ NvmeWrite (
     }
   }
 
-  DEBUG ((EFI_D_VERBOSE, "%a: Lba = 0x%08Lx, Original = 0x%08Lx, "
+  DEBUG ((DEBUG_BLKIO, "%a: Lba = 0x%08Lx, Original = 0x%08Lx, "
     "Remaining = 0x%08Lx, BlockSize = 0x%x, Status = %r\n", __FUNCTION__, Lba,
     (UINT64)OrginalBlocks, (UINT64)Blocks, BlockSize, Status));
 
@@ -802,7 +802,7 @@ NvmeAsyncRead (
     }
   }
 
-  DEBUG ((EFI_D_VERBOSE, "%a: Lba = 0x%08Lx, Original = 0x%08Lx, "
+  DEBUG ((DEBUG_BLKIO, "%a: Lba = 0x%08Lx, Original = 0x%08Lx, "
     "Remaining = 0x%08Lx, BlockSize = 0x%x, Status = %r\n", __FUNCTION__, Lba,
     (UINT64)OrginalBlocks, (UINT64)Blocks, BlockSize, Status));
 
@@ -922,7 +922,7 @@ NvmeAsyncWrite (
     }
   }
 
-  DEBUG ((EFI_D_VERBOSE, "%a: Lba = 0x%08Lx, Original = 0x%08Lx, "
+  DEBUG ((DEBUG_BLKIO, "%a: Lba = 0x%08Lx, Original = 0x%08Lx, "
     "Remaining = 0x%08Lx, BlockSize = 0x%x, Status = %r\n", __FUNCTION__, Lba,
     (UINT64)OrginalBlocks, (UINT64)Blocks, BlockSize, Status));
 
-- 
2.12.0.windows.1



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

* [PATCH 2/2] MdeModulePkg/SdDxe: Demote DEBUG print to DEBUG_BLKIO
  2018-06-12  3:36 [PATCH 0/2] Adjust DEBUG prints level for SD/NVMe BlockIo services Hao Wu
  2018-06-12  3:36 ` [PATCH 1/2] MdeModulePkg/NvmExpressDxe: Adjust R/W DEBUG prints to BLKIO level Hao Wu
@ 2018-06-12  3:36 ` Hao Wu
  2018-06-12  5:06   ` Zeng, Star
  1 sibling, 1 reply; 6+ messages in thread
From: Hao Wu @ 2018-06-12  3:36 UTC (permalink / raw)
  To: edk2-devel; +Cc: Hao Wu, Ard Biesheuvel, Star Zeng, Eric Dong

Similar to commit 9dca2105ad960c9946d7cc2ece40f65e1999dac7, lower the
priority of the DEBUG print in SDReadWrite() to DEBUG_INFO.

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Star Zeng <star.zeng@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
---
 MdeModulePkg/Bus/Sd/SdDxe/SdBlockIo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/MdeModulePkg/Bus/Sd/SdDxe/SdBlockIo.c b/MdeModulePkg/Bus/Sd/SdDxe/SdBlockIo.c
index 516c3e7042..b8d115abac 100644
--- a/MdeModulePkg/Bus/Sd/SdDxe/SdBlockIo.c
+++ b/MdeModulePkg/Bus/Sd/SdDxe/SdBlockIo.c
@@ -1,7 +1,7 @@
 /** @file
   The helper functions for BlockIo and BlockIo2 protocol.
 
-  Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.<BR>
+  Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>
   This program and the accompanying materials
   are licensed and made available under the terms and conditions of the BSD License
   which accompanies this distribution.  The full text of the license may be found at
@@ -670,7 +670,7 @@ SdReadWrite (
     if (EFI_ERROR (Status)) {
       return Status;
     }
-    DEBUG ((EFI_D_INFO, "Sd%a(): Lba 0x%x BlkNo 0x%x Event %p with %r\n", IsRead ? "Read" : "Write", Lba, BlockNum, Token->Event, Status));
+    DEBUG ((DEBUG_BLKIO, "Sd%a(): Lba 0x%x BlkNo 0x%x Event %p with %r\n", IsRead ? "Read" : "Write", Lba, BlockNum, Token->Event, Status));
 
     Lba   += BlockNum;
     Buffer = (UINT8*)Buffer + BufferSize;
-- 
2.12.0.windows.1



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

* Re: [PATCH 1/2] MdeModulePkg/NvmExpressDxe: Adjust R/W DEBUG prints to BLKIO level
  2018-06-12  3:36 ` [PATCH 1/2] MdeModulePkg/NvmExpressDxe: Adjust R/W DEBUG prints to BLKIO level Hao Wu
@ 2018-06-12  5:05   ` Zeng, Star
  0 siblings, 0 replies; 6+ messages in thread
From: Zeng, Star @ 2018-06-12  5:05 UTC (permalink / raw)
  To: Wu, Hao A, edk2-devel@lists.01.org; +Cc: Ard Biesheuvel, Dong, Eric, Zeng, Star

Reviewed-by: Star Zeng <star.zeng@intel.com>

-----Original Message-----
From: Wu, Hao A 
Sent: Tuesday, June 12, 2018 11:37 AM
To: edk2-devel@lists.01.org
Cc: Wu, Hao A <hao.a.wu@intel.com>; Ard Biesheuvel <ard.biesheuvel@linaro.org>; Zeng, Star <star.zeng@intel.com>; Dong, Eric <eric.dong@intel.com>
Subject: [PATCH 1/2] MdeModulePkg/NvmExpressDxe: Adjust R/W DEBUG prints to BLKIO level

REF:https://bugzilla.tianocore.org/show_bug.cgi?id=980

Adjust the DEBUG prints within function:
NvmeRead(), NvmeWrite(), AsyncNvmeRead() and AsyncNvmeWrite()

to DEBUG_BLKIO for the consistency with other storage device drivers (e.g. ATA, USB and etc.).

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Star Zeng <star.zeng@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
---
 MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressBlockIo.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressBlockIo.c b/MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressBlockIo.c
index 734e1286c6..6c415109c1 100644
--- a/MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressBlockIo.c
+++ b/MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressBlockIo.c
@@ -2,7 +2,7 @@
   NvmExpressDxe driver is used to manage non-volatile memory subsystem which follows
   NVM Express specification.
 
-  Copyright (c) 2013 - 2016, Intel Corporation. All rights reserved.<BR>
+  Copyright (c) 2013 - 2018, Intel Corporation. All rights 
+ reserved.<BR>
   This program and the accompanying materials
   are licensed and made available under the terms and conditions of the BSD License
   which accompanies this distribution.  The full text of the license may be found at @@ -218,7 +218,7 @@ NvmeRead (
     }
   }
 
-  DEBUG ((EFI_D_VERBOSE, "%a: Lba = 0x%08Lx, Original = 0x%08Lx, "
+  DEBUG ((DEBUG_BLKIO, "%a: Lba = 0x%08Lx, Original = 0x%08Lx, "
     "Remaining = 0x%08Lx, BlockSize = 0x%x, Status = %r\n", __FUNCTION__, Lba,
     (UINT64)OrginalBlocks, (UINT64)Blocks, BlockSize, Status));
 
@@ -296,7 +296,7 @@ NvmeWrite (
     }
   }
 
-  DEBUG ((EFI_D_VERBOSE, "%a: Lba = 0x%08Lx, Original = 0x%08Lx, "
+  DEBUG ((DEBUG_BLKIO, "%a: Lba = 0x%08Lx, Original = 0x%08Lx, "
     "Remaining = 0x%08Lx, BlockSize = 0x%x, Status = %r\n", __FUNCTION__, Lba,
     (UINT64)OrginalBlocks, (UINT64)Blocks, BlockSize, Status));
 
@@ -802,7 +802,7 @@ NvmeAsyncRead (
     }
   }
 
-  DEBUG ((EFI_D_VERBOSE, "%a: Lba = 0x%08Lx, Original = 0x%08Lx, "
+  DEBUG ((DEBUG_BLKIO, "%a: Lba = 0x%08Lx, Original = 0x%08Lx, "
     "Remaining = 0x%08Lx, BlockSize = 0x%x, Status = %r\n", __FUNCTION__, Lba,
     (UINT64)OrginalBlocks, (UINT64)Blocks, BlockSize, Status));
 
@@ -922,7 +922,7 @@ NvmeAsyncWrite (
     }
   }
 
-  DEBUG ((EFI_D_VERBOSE, "%a: Lba = 0x%08Lx, Original = 0x%08Lx, "
+  DEBUG ((DEBUG_BLKIO, "%a: Lba = 0x%08Lx, Original = 0x%08Lx, "
     "Remaining = 0x%08Lx, BlockSize = 0x%x, Status = %r\n", __FUNCTION__, Lba,
     (UINT64)OrginalBlocks, (UINT64)Blocks, BlockSize, Status));
 
--
2.12.0.windows.1



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

* Re: [PATCH 2/2] MdeModulePkg/SdDxe: Demote DEBUG print to DEBUG_BLKIO
  2018-06-12  3:36 ` [PATCH 2/2] MdeModulePkg/SdDxe: Demote DEBUG print to DEBUG_BLKIO Hao Wu
@ 2018-06-12  5:06   ` Zeng, Star
  2018-06-12  5:57     ` Wu, Hao A
  0 siblings, 1 reply; 6+ messages in thread
From: Zeng, Star @ 2018-06-12  5:06 UTC (permalink / raw)
  To: Wu, Hao A, edk2-devel@lists.01.org; +Cc: Ard Biesheuvel, Dong, Eric, Zeng, Star

"to DEBUG_INFO" should be "DEBUG_BLKIO".

With that updated, Reviewed-by: Star Zeng <star.zeng@intel.com>

-----Original Message-----
From: Wu, Hao A 
Sent: Tuesday, June 12, 2018 11:37 AM
To: edk2-devel@lists.01.org
Cc: Wu, Hao A <hao.a.wu@intel.com>; Ard Biesheuvel <ard.biesheuvel@linaro.org>; Zeng, Star <star.zeng@intel.com>; Dong, Eric <eric.dong@intel.com>
Subject: [PATCH 2/2] MdeModulePkg/SdDxe: Demote DEBUG print to DEBUG_BLKIO

Similar to commit 9dca2105ad960c9946d7cc2ece40f65e1999dac7, lower the priority of the DEBUG print in SDReadWrite() to DEBUG_INFO.

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Star Zeng <star.zeng@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
---
 MdeModulePkg/Bus/Sd/SdDxe/SdBlockIo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/MdeModulePkg/Bus/Sd/SdDxe/SdBlockIo.c b/MdeModulePkg/Bus/Sd/SdDxe/SdBlockIo.c
index 516c3e7042..b8d115abac 100644
--- a/MdeModulePkg/Bus/Sd/SdDxe/SdBlockIo.c
+++ b/MdeModulePkg/Bus/Sd/SdDxe/SdBlockIo.c
@@ -1,7 +1,7 @@
 /** @file
   The helper functions for BlockIo and BlockIo2 protocol.
 
-  Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.<BR>
+  Copyright (c) 2015 - 2018, Intel Corporation. All rights 
+ reserved.<BR>
   This program and the accompanying materials
   are licensed and made available under the terms and conditions of the BSD License
   which accompanies this distribution.  The full text of the license may be found at @@ -670,7 +670,7 @@ SdReadWrite (
     if (EFI_ERROR (Status)) {
       return Status;
     }
-    DEBUG ((EFI_D_INFO, "Sd%a(): Lba 0x%x BlkNo 0x%x Event %p with %r\n", IsRead ? "Read" : "Write", Lba, BlockNum, Token->Event, Status));
+    DEBUG ((DEBUG_BLKIO, "Sd%a(): Lba 0x%x BlkNo 0x%x Event %p with 
+ %r\n", IsRead ? "Read" : "Write", Lba, BlockNum, Token->Event, 
+ Status));
 
     Lba   += BlockNum;
     Buffer = (UINT8*)Buffer + BufferSize;
--
2.12.0.windows.1



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

* Re: [PATCH 2/2] MdeModulePkg/SdDxe: Demote DEBUG print to DEBUG_BLKIO
  2018-06-12  5:06   ` Zeng, Star
@ 2018-06-12  5:57     ` Wu, Hao A
  0 siblings, 0 replies; 6+ messages in thread
From: Wu, Hao A @ 2018-06-12  5:57 UTC (permalink / raw)
  To: Zeng, Star, edk2-devel@lists.01.org; +Cc: Ard Biesheuvel, Dong, Eric

Thanks for the catch. I will update the commit log when pushing this change.

Best Regards,
Hao Wu


> -----Original Message-----
> From: Zeng, Star
> Sent: Tuesday, June 12, 2018 1:07 PM
> To: Wu, Hao A; edk2-devel@lists.01.org
> Cc: Ard Biesheuvel; Dong, Eric; Zeng, Star
> Subject: RE: [PATCH 2/2] MdeModulePkg/SdDxe: Demote DEBUG print to
> DEBUG_BLKIO
> 
> "to DEBUG_INFO" should be "DEBUG_BLKIO".
> 
> With that updated, Reviewed-by: Star Zeng <star.zeng@intel.com>
> 
> -----Original Message-----
> From: Wu, Hao A
> Sent: Tuesday, June 12, 2018 11:37 AM
> To: edk2-devel@lists.01.org
> Cc: Wu, Hao A <hao.a.wu@intel.com>; Ard Biesheuvel
> <ard.biesheuvel@linaro.org>; Zeng, Star <star.zeng@intel.com>; Dong, Eric
> <eric.dong@intel.com>
> Subject: [PATCH 2/2] MdeModulePkg/SdDxe: Demote DEBUG print to
> DEBUG_BLKIO
> 
> Similar to commit 9dca2105ad960c9946d7cc2ece40f65e1999dac7, lower the
> priority of the DEBUG print in SDReadWrite() to DEBUG_INFO.
> 
> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> Cc: Star Zeng <star.zeng@intel.com>
> Cc: Eric Dong <eric.dong@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Hao Wu <hao.a.wu@intel.com>
> ---
>  MdeModulePkg/Bus/Sd/SdDxe/SdBlockIo.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/MdeModulePkg/Bus/Sd/SdDxe/SdBlockIo.c
> b/MdeModulePkg/Bus/Sd/SdDxe/SdBlockIo.c
> index 516c3e7042..b8d115abac 100644
> --- a/MdeModulePkg/Bus/Sd/SdDxe/SdBlockIo.c
> +++ b/MdeModulePkg/Bus/Sd/SdDxe/SdBlockIo.c
> @@ -1,7 +1,7 @@
>  /** @file
>    The helper functions for BlockIo and BlockIo2 protocol.
> 
> -  Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.<BR>
> +  Copyright (c) 2015 - 2018, Intel Corporation. All rights
> + reserved.<BR>
>    This program and the accompanying materials
>    are licensed and made available under the terms and conditions of the BSD
> License
>    which accompanies this distribution.  The full text of the license may be found
> at @@ -670,7 +670,7 @@ SdReadWrite (
>      if (EFI_ERROR (Status)) {
>        return Status;
>      }
> -    DEBUG ((EFI_D_INFO, "Sd%a(): Lba 0x%x BlkNo 0x%x Event %p with %r\n",
> IsRead ? "Read" : "Write", Lba, BlockNum, Token->Event, Status));
> +    DEBUG ((DEBUG_BLKIO, "Sd%a(): Lba 0x%x BlkNo 0x%x Event %p with
> + %r\n", IsRead ? "Read" : "Write", Lba, BlockNum, Token->Event,
> + Status));
> 
>      Lba   += BlockNum;
>      Buffer = (UINT8*)Buffer + BufferSize;
> --
> 2.12.0.windows.1



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

end of thread, other threads:[~2018-06-12  5:57 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-06-12  3:36 [PATCH 0/2] Adjust DEBUG prints level for SD/NVMe BlockIo services Hao Wu
2018-06-12  3:36 ` [PATCH 1/2] MdeModulePkg/NvmExpressDxe: Adjust R/W DEBUG prints to BLKIO level Hao Wu
2018-06-12  5:05   ` Zeng, Star
2018-06-12  3:36 ` [PATCH 2/2] MdeModulePkg/SdDxe: Demote DEBUG print to DEBUG_BLKIO Hao Wu
2018-06-12  5:06   ` Zeng, Star
2018-06-12  5:57     ` Wu, Hao A

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