audk/MdePkg/Include
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
..
AArch64 MdePkg/ProcessorBind: add defines for page allocation granularity 2017-03-06 11:27:00 +01:00
Arm MdePkg/ProcessorBind: add defines for page allocation granularity 2017-03-06 11:27:00 +01:00
Ebc MdePkg/ProcessorBind: add defines for page allocation granularity 2017-03-06 11:27:00 +01:00
Guid MdePkg/Btt.h: Add Block Translation Table definitions 2017-11-09 11:09:11 +08:00
Ia32 MdePkg: Disable VS warning 4701 & 4703 for VS2017 2017-11-29 16:03:10 +08:00
IndustryStandard MdePkg/PciExpress21.h: Fix typo in PCI_REG_PCIE_SLOT_CONTROL 2017-11-08 12:46:50 +08:00
Ipf MdePkg/ProcessorBind: add defines for page allocation granularity 2017-03-06 11:27:00 +01:00
Library MdePkg HobLib: Add BuildFv3Hob API 2017-10-10 20:54:32 +08:00
Pi MdePkg PiHob.h: Add FV3 HOB definitions 2017-10-10 20:54:27 +08:00
Ppi MdePkg: Add definition for SecHobData PPI 2017-08-04 08:56:05 +08:00
Protocol MdeModulePkg/SerialDxe: Fix return valued in SerialSetAttributes 2017-11-30 09:11:49 +08:00
Uefi MdePkg: Deprecate EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS 2017-11-01 22:25:18 +08:00
X64 MdePkg: Disable VS warning 4701 & 4703 for VS2017 2017-11-29 16:03:10 +08:00
Base.h MdePkg: Declare _ReturnAddress() in Base.h for MSFT tool chain 2017-07-11 21:36:45 +08:00
PiDxe.h Update the copyright notice format 2010-04-23 15:46:20 +00:00
PiMm.h MdePkg: Add new definitions for Management Mode. 2017-08-29 09:37:36 +08:00
PiPei.h Update the copyright notice format 2010-04-23 15:46:20 +00:00
PiSmm.h MdePkg: Follow UEFI 2.7 spec to deprecate SMM Communication ACPI Table 2017-07-27 14:08:09 +08:00
Uefi.h Update the copyright notice format 2010-04-23 15:46:20 +00:00