+ EndpointDescriptor = NULL;\r
+ EndpointIndex = 0;\r
+\r
+ if ((Request->Request == USB_REQ_CLEAR_FEATURE) &&\r
+ (Request->RequestType == USB_DEV_CLEAR_FEATURE_REQ_TYPE_E) &&\r
+ (Request->Value == USB_FEATURE_ENDPOINT_HALT)) {\r
+ //\r
+ // Request->Index is the Endpoint Address, use it to get the Endpoint Index.\r
+ //\r
+ while (EndpointIndex < MAX_ENDPOINT) {\r
+ Status = PeiUsbGetEndpointDescriptor (PeiServices, This, EndpointIndex, &EndpointDescriptor);\r
+ if (EFI_ERROR (Status)) {\r
+ return EFI_INVALID_PARAMETER;\r
+ }\r
+\r
+ if (EndpointDescriptor->EndpointAddress == Request->Index) {\r
+ break;\r
+ }\r
+\r
+ EndpointIndex++;\r
+ }\r
+\r
+ if (EndpointIndex == MAX_ENDPOINT) {\r
+ return EFI_INVALID_PARAMETER;\r
+ }\r
+ }\r
+\r