audk/MdeModulePkg
Julien Grall 13d378fc82 MdeModulePkg/SerialDxe: Fix return valued in SerialSetAttributes
SerialSetAttributes is meant to match the behavior of the function
EFI_SERIAL_IO_PROTOCOL.SetAttributes() in the UEFI spec (v2.7). This
means the function can only return:
    - EFI_SUCCESS
    - EFI_INVALID_PARAMETER
    - EFI_DEVICE_ERROR

However the function SerialPortSetAttributes may also validly return
EFI_UNSUPPORTED. For instance this is the case of the Xen Console
driver.

EFI_UNSUPPORTED could be also interpreted as "One or more of the attributes
has an unsupported value". So return EFI_INVALID_PARAMETER in that case.

Lastly, to prevent another return slipping in the future, all the errors
but EFI_INVALID_PARAMETER and EFI_UNSUPPORTED will return
EFI_DEVICE_ERROR.

Contributed-under: Tianocore Contribution Agreement 1.1
Signed-off-by: Julien Grall <julien.grall@linaro.org>
Reviewed-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
2017-11-30 09:11:49 +08:00
..
Application MdeModulePkg: Fix misuses of AllocateCopyPool 2017-11-08 17:13:03 +08:00
Bus MdeModulePkg/AtaAtapiPassThru: Revert patch to disable PCI attributes 2017-11-29 09:02:46 +08:00
Core MdeModulePkg/Core: Merge memory map after filtering paging capability 2017-11-28 09:25:32 +08:00
Include MdeModulePkg: Fix unix style of EOL 2017-11-21 20:24:37 +08:00
Library MdeModulePkg/DxeCorePerformanceLib: add lock protection 2017-11-29 20:34:10 +08:00
Logo MdeModulePkg/LogoDxe: Return error if HII Package not present 2017-05-22 16:30:11 -07:00
Universal MdeModulePkg/SerialDxe: Fix return valued in SerialSetAttributes 2017-11-30 09:11:49 +08:00
MdeModulePkg.dec MdeModulePkg: Fix unix style of EOL 2017-11-21 20:24:37 +08:00
MdeModulePkg.dsc MdeModulePkg: Add UdfDxe to the dsc file 2017-09-13 18:24:40 +08:00
MdeModulePkg.uni MdeModulePkg: Fix unix style of EOL 2017-11-21 20:24:37 +08:00
MdeModulePkgExtra.uni