value of DefaultStopBits will use the device's default number of\r
stop bits.\r
\r
- @retval EFI_SUCCESS The device was reset.\r
- @retval EFI_DEVICE_ERROR The serial device is not functioning correctly.\r
+ @retval EFI_SUCCESS The device was reset.\r
+ @retval EFI_INVALID_PARAMETER One or more attributes has an unsupported value.\r
+ @retval EFI_DEVICE_ERROR The serial device is not functioning correctly.\r
\r
**/\r
EFI_STATUS\r
(EFI_STOP_BITS_TYPE) This->Mode->StopBits\r
);\r
\r
+ //\r
+ // The serial device may not support some of the attributes. To prevent\r
+ // later failure, always return EFI_SUCCESS when SetAttributes is returning\r
+ // EFI_INVALID_PARAMETER.\r
+ //\r
+ if (Status == EFI_INVALID_PARAMETER) {\r
+ return EFI_SUCCESS;\r
+ }\r
+\r
return Status;\r
}\r
\r
value of DefaultStopBits will use the device's default number of\r
stop bits.\r
\r
- @retval EFI_SUCCESS The device was reset.\r
- @retval EFI_DEVICE_ERROR The serial device is not functioning correctly.\r
+ @retval EFI_SUCCESS The device was reset.\r
+ @retval EFI_INVALID_PARAMETER One or more attributes has an unsupported value.\r
+ @retval EFI_DEVICE_ERROR The serial device is not functioning correctly.\r
\r
**/\r
EFI_STATUS\r
DataBits = OriginalDataBits;\r
StopBits = OriginalStopBits;\r
Status = EFI_SUCCESS;\r
+ } else if (Status == EFI_INVALID_PARAMETER || Status == EFI_UNSUPPORTED) {\r
+ return EFI_INVALID_PARAMETER;\r
} else {\r
- return Status;\r
+ return EFI_DEVICE_ERROR;\r
}\r
}\r
\r