Thanks, I saw one comment given in the V1 patch is not addressed in V2.
Please refer to the inline comment below:


> -----Original Message-----
> From: Ke, VincentX <vincentx...@intel.com>
> Sent: Wednesday, December 15, 2021 9:57 AM
> To: devel@edk2.groups.io
> Cc: Ke, VincentX <vincentx...@intel.com>; Wu, Hao A
> <hao.a...@intel.com>; Ni, Ray <ray...@intel.com>; Chiu, Ian
> <ian.c...@intel.com>; Chu, Maggie <maggie....@intel.com>
> Subject: [PATCH v2] MdeModulePkg: Replace with UFS_UNIT_DESC to fix
> response timeout problem.
> 
> BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3714
> 
> Replace with UFS_UNIT_DESC to fix response timeout problem.
> 
> Cc: Hao A Wu <hao.a...@intel.com>
> Cc: Ray Ni <ray...@intel.com>
> Cc: Ian Chiu <ian.c...@intel.com>
> Cc: Maggie Chu <maggie....@intel.com>
> Signed-off-by: VincentX Ke <vincentx...@intel.com>
> ---
>  .../Bus/Ufs/UfsBlockIoPei/UfsBlockIoPei.c     | 20 +++++++++----------
>  1 file changed, 9 insertions(+), 11 deletions(-)
> 
> diff --git a/MdeModulePkg/Bus/Ufs/UfsBlockIoPei/UfsBlockIoPei.c
> b/MdeModulePkg/Bus/Ufs/UfsBlockIoPei/UfsBlockIoPei.c
> index b331c0f3e3..96a1f38727 100644
> --- a/MdeModulePkg/Bus/Ufs/UfsBlockIoPei/UfsBlockIoPei.c
> +++ b/MdeModulePkg/Bus/Ufs/UfsBlockIoPei/UfsBlockIoPei.c
> @@ -1037,9 +1037,9 @@ InitializeUfsBlockIoPeim (
>    UFS_PEIM_HC_PRIVATE_DATA       *Private;
>    EDKII_UFS_HOST_CONTROLLER_PPI  *UfsHcPpi;
>    UINT32                         Index;
> -  UFS_CONFIG_DESC                Config;
>    UINTN                          MmioBase;
>    UINT8                          Controller;
> +  UFS_UNIT_DESC                  UnitDescriptor;
> 
>    //
>    // Shadow this PEIM to run from memory @@ -1126,19 +1126,17 @@
> InitializeUfsBlockIoPeim (
>      }
> 
>      //
> -    // Get Ufs Device's Lun Info by reading Configuration Descriptor.
> +    // Check if 8 common luns are active and set corresponding bit mask.
>      //
> -    Status = UfsRwDeviceDesc (Private, TRUE, UfsConfigDesc, 0, 0, &Config,
> sizeof (UFS_CONFIG_DESC));
> -    if (EFI_ERROR (Status)) {
> -      DEBUG ((DEBUG_ERROR, "Ufs Get Configuration Descriptor Error, Status
> = %r\n", Status));
> -      Controller++;
> -      continue;
> -    }
> -
>      for (Index = 0; Index < UFS_PEIM_MAX_LUNS; Index++) {
> -      if (Config.UnitDescConfParams[Index].LunEn != 0) {
> +      Status = UfsRwDeviceDesc (Private, TRUE, UfsUnitDesc, (UINT8) Index, 0,
> &UnitDescriptor, sizeof (UFS_UNIT_DESC));
> +      if (EFI_ERROR (Status)) {
> +        DEBUG ((DEBUG_ERROR, "Fail to read UFS Unit Descriptor, Index = %X,
> Status = %r\n", Index, Status));
> +        continue;
> +      }
> +      if (UnitDescriptor.LunEn == 0x1) {
> +        DEBUG ((DEBUG_INFO, "UFS LUN %X is enabled\n", Index));
>          Private->Luns.BitMask |= (BIT0 << Index);
> -        DEBUG ((DEBUG_INFO, "Ufs %d Lun %d is enabled\n", Controller,
> Index));


For the above debug message, could you help to keep the origin format that will 
display the UFS controller index?
  DEBUG ((DEBUG_INFO, "Ufs %d Lun %d is enabled\n", Controller, Index));

Best Regards,
Hao Wu


>        }
>      }
> 
> --
> 2.18.0.windows.1



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


Reply via email to