summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Bus/Usb/UsbBusPei/PeiUsbLib.c
diff options
context:
space:
mode:
authorStar Zeng <star.zeng@intel.com>2014-07-02 03:20:49 +0000
committerlzeng14 <lzeng14@6f19259b-4bc3-4df7-8a09-765794883524>2014-07-02 03:20:49 +0000
commitd987459f8e0b78831c95188b5b0d712ed6a54c88 (patch)
tree7a64d52560565b17395737a92e1edf2576442a89 /MdeModulePkg/Bus/Usb/UsbBusPei/PeiUsbLib.c
parentef96ba3cbe6f9f3658f19407d4c2150dcd6eb457 (diff)
downloadedk2-platforms-d987459f8e0b78831c95188b5b0d712ed6a54c88.tar.xz
MdeModulePkg XhciPei/UsbBusPei: Add XHCI recovery support.
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15611 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Bus/Usb/UsbBusPei/PeiUsbLib.c')
-rw-r--r--MdeModulePkg/Bus/Usb/UsbBusPei/PeiUsbLib.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/MdeModulePkg/Bus/Usb/UsbBusPei/PeiUsbLib.c b/MdeModulePkg/Bus/Usb/UsbBusPei/PeiUsbLib.c
index 6fef61e565..42be13ac3b 100644
--- a/MdeModulePkg/Bus/Usb/UsbBusPei/PeiUsbLib.c
+++ b/MdeModulePkg/Bus/Usb/UsbBusPei/PeiUsbLib.c
@@ -221,26 +221,24 @@ IsPortConnect (
}
/**
- Judge if the port is connected with a low-speed usb device or not.
+ Get device speed according to port status.
- @param PortStatus The usb port status gotten.
+ @param PortStatus The usb port status gotten.
- @retval TRUE A low-speed usb device is connected with the port.
- @retval FALSE No low-speed usb device is connected with the port.
+ @return Device speed value.
**/
UINTN
-IsPortLowSpeedDeviceAttached (
- IN UINT16 PortStatus
+PeiUsbGetDeviceSpeed (
+ IN UINT16 PortStatus
)
{
- //
- // return the bit 9 value of PortStatus
- //
if ((PortStatus & USB_PORT_STAT_LOW_SPEED) != 0) {
return EFI_USB_SPEED_LOW;
} else if ((PortStatus & USB_PORT_STAT_HIGH_SPEED) != 0){
return EFI_USB_SPEED_HIGH;
+ } else if ((PortStatus & USB_PORT_STAT_SUPER_SPEED) != 0) {
+ return EFI_USB_SPEED_SUPER;
} else {
return EFI_USB_SPEED_FULL;
}