/* This function is used to manage a USB device with an interrupt transfer pipe. */
EFI_STATUS EFIAPI UsbEthEcmInterrupt(IN EDKII_USB_ETHERNET_PROTOCOL *This, IN BOOLEAN IsNewTransfer, IN UINTN PollingInterval, IN EFI_USB_DEVICE_REQUEST *Request)
/* This function is used to manage a USB device with an interrupt transfer pipe. */
EFI_STATUS EFIAPI UsbEthEcmInterrupt(IN EDKII_USB_ETHERNET_PROTOCOL *This, IN BOOLEAN IsNewTransfer, IN UINTN PollingInterval, IN EFI_USB_DEVICE_REQUEST *Request)
{
  EFI_STATUS           Status;
  USB_ETHERNET_DRIVER  *UsbEthDriver;
  UINTN                DataLength;
  UsbEthDriver = USB_ETHERNET_DEV_FROM_THIS (This);
  DataLength   = 0;
  if (IsNewTransfer) {
    DataLength = sizeof (EFI_USB_DEVICE_REQUEST) + sizeof (USB_CONNECT_SPEED_CHANGE);
    Status     = UsbEthDriver->UsbIo->UsbAsyncInterruptTransfer (
                                        UsbEthDriver->UsbIo,
                                        UsbEthDriver->InterruptEndpoint,
                                        IsNewTransfer,
                                        PollingInterval,
                                        DataLength,
                                        (EFI_ASYNC_USB_TRANSFER_CALLBACK)InterruptCallback,
                                        Request
                                        );
  } else {
    Status = UsbEthDriver->UsbIo->UsbAsyncInterruptTransfer (
                                    UsbEthDriver->UsbIo,
                                    UsbEthDriver->InterruptEndpoint,
                                    IsNewTransfer,
                                    0,
                                    0,
                                    NULL,
                                    NULL
                                    );
  }
  return Status;
}