Skip to content

Commit

Permalink
Fix boot_dev->type check in virtual_media driver
Browse files Browse the repository at this point in the history
Currently boot_dev->type will be forced assigned to STORAGE_VIRTUAL
when virtual_media driver is enabled, causing nvme boot fail. Fix it
by replacing it with a simple check.

Tracked-On: OAM-113064
Signed-off-by: Jiaqing Zhao <[email protected]>
  • Loading branch information
jiaqingz-intel committed Nov 1, 2023
1 parent 01bd39f commit 3a3c9df
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/virtual_media/virtual_media.c
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,8 @@ static EFI_STATUS storage_virtual_media_init(EFI_SYSTEM_TABLE *st)
if (!boot_dev)
return EFI_INVALID_PARAMETER;

boot_dev->type = STORAGE_VIRTUAL;
if (boot_dev->type != STORAGE_VIRTUAL)
return EFI_SUCCESS;

storage_virtual_media.pci_device = (boot_dev->diskbus >> 8) & 0xff;
storage_virtual_media.pci_function = boot_dev->diskbus & 0xff;
Expand Down

0 comments on commit 3a3c9df

Please sign in to comment.