]> git.proxmox.com Git - mirror_edk2.git/commit
OvmfPkg/VirtioScsiDxe: add helper to create a fake host adapter error
authorBrijesh Singh <brijesh.singh@amd.com>
Thu, 31 Aug 2017 14:25:27 +0000 (10:25 -0400)
committerLaszlo Ersek <lersek@redhat.com>
Thu, 31 Aug 2017 19:01:31 +0000 (21:01 +0200)
commit1b15eb06c7f2687ee92cf90f1581c7044691d71f
tree24f41ebf559b12e88ac3607cdfda532e62127775
parentfc2168feb24827b3691d85a00f23c35ac4eb2910
OvmfPkg/VirtioScsiDxe: add helper to create a fake host adapter error

When virtio request fails we return EFI_DEVICE_ERROR, as per the spec
EFI_EXT_SCSI_PASS_THRU_PROTOCOL.PassThru() member function is required
to implement elaborated error reporting.

The patch refactors out entire block of the code that creates the host
adapter error into a separate helper function (ReportHostAdapterError).

Suggested-by: Laszlo Ersek <lersek@redhat.com>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Tom Lendacky <thomas.lendacky@amd.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Brijesh Singh <brijesh.singh@amd.com>
[lersek@redhat.com: fix style & typo in ReportHostAdapterError() comment]
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Regression-tested-by: Laszlo Ersek <lersek@redhat.com>
Tested-by: Laszlo Ersek <lersek@redhat.com>
OvmfPkg/VirtioScsiDxe/VirtioScsi.c