summaryrefslogtreecommitdiff
path: root/BaseTools/Source/Python/Workspace/MetaFileTable.py
diff options
context:
space:
mode:
authorMatt DeVillier <matt.devillier@gmail.com>2026-07-03 17:53:45 +0300
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2026-09-30 07:57:49 +0300
commit4b512d3707ca8315062b380defa469168b2510c4 (patch)
tree50ac4d31baaa9a41772715f999fb48f83233fc50 /BaseTools/Source/Python/Workspace/MetaFileTable.py
parent2ba17c54c653cb96ca1b95820775a069598d7182 (diff)
downloadedk2-4b512d3707ca8315062b380defa469168b2510c4.tar.xz
MdeModulePkg/ScsiDiskDxe: Don't fail media detection on FUA query error
Commit ee58614bbb ("MdeModulePkg/ScsiDiskDxe: Check Write Caching and FUA support") added a best-effort FUA-support query to ScsiDiskDetectMedia(). It issues a MODE SENSE(10) for the Caching mode page via ScsiDiskFuaMode() and assigns the result to the function's shared Status variable. When the device rejects that command, Status is left as EFI_DEVICE_ERROR and falls through to the function's return, even though the media was already detected successfully (capacity read, media present). Callers treat this as fatal: ScsiDiskDriverBindingStart() skips installing Block I/O, and ScsiDiskReadBlocks()/WriteBlocks() return EFI_DEVICE_ERROR. For non-fixed devices DetectMedia() re-runs on every access, so the disk is never usable. This is observed on UFS (google/yaviks): the LUN answers the MODE SENSE with a Target Failure ("UfsExecScsiCmds() fails with Target Failure"), so a drive that was detected with edk2-stable202602 is no longer detected with edk2-stable202605. The FUA query is only used to refine ScsiDiskDevice->FuaMode, which already defaults to TRUE (the prior always-set-FUA behavior). Its failure must not affect media detection, so stop assigning its result to Status and hoist the device-type check out of the retry loop. Fixes: ee58614bbb ("MdeModulePkg/ScsiDiskDxe: Check Write Caching and FUA support") TEST=build/boot google/yaviks Chromebook with UFS, drive is detected and bootable. Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
Diffstat (limited to 'BaseTools/Source/Python/Workspace/MetaFileTable.py')
0 files changed, 0 insertions, 0 deletions