summaryrefslogtreecommitdiffstats
path: root/MdeModulePkg/Bus
diff options
context:
space:
mode:
Diffstat (limited to 'MdeModulePkg/Bus')
-rw-r--r--MdeModulePkg/Bus/Usb/UsbKbDxe/EfiKey.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/MdeModulePkg/Bus/Usb/UsbKbDxe/EfiKey.c b/MdeModulePkg/Bus/Usb/UsbKbDxe/EfiKey.c
index 27685995c2..ccb389067a 100644
--- a/MdeModulePkg/Bus/Usb/UsbKbDxe/EfiKey.c
+++ b/MdeModulePkg/Bus/Usb/UsbKbDxe/EfiKey.c
@@ -215,7 +215,7 @@ USBKeyboardDriverBindingStart (
EndpointNumber = UsbKeyboardDevice->InterfaceDescriptor.NumEndpoints;
//
- // Traverse endpoints to find interrupt endpoint
+ // Traverse endpoints to find interrupt endpoint IN
//
Found = FALSE;
for (Index = 0; Index < EndpointNumber; Index++) {
@@ -226,7 +226,8 @@ USBKeyboardDriverBindingStart (
&EndpointDescriptor
);
- if ((EndpointDescriptor.Attributes & (BIT0 | BIT1)) == USB_ENDPOINT_INTERRUPT) {
+ if (((EndpointDescriptor.Attributes & (BIT0 | BIT1)) == USB_ENDPOINT_INTERRUPT) &&
+ ((EndpointDescriptor.EndpointAddress & USB_ENDPOINT_DIR_IN) != 0)) {
//
// We only care interrupt endpoint here
//