TianoCore EDK2 master
|
#include "UsbCdcEcm.h"
Go to the source code of this file.
Functions | |
BOOLEAN | IsSupportedDevice (IN EFI_USB_IO_PROTOCOL *UsbIo) |
EFI_STATUS EFIAPI | UsbEcmDriverSupported (IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE ControllerHandle, IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath) |
EFI_STATUS | IsSameDevice (IN EFI_DEVICE_PATH_PROTOCOL *UsbEthPath, IN EFI_DEVICE_PATH_PROTOCOL *UsbCdcDataPath) |
BOOLEAN | IsUsbCdcData (IN EFI_DEVICE_PATH_PROTOCOL *UsbEthPath, IN OUT EFI_HANDLE *UsbCdcDataHandle) |
VOID EFIAPI | CallbackFunction (IN EFI_EVENT Event, IN VOID *Context) |
EFI_STATUS EFIAPI | UsbEcmDriverStart (IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE ControllerHandle, IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath) |
EFI_STATUS EFIAPI | UsbEcmDriverStop (IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE ControllerHandle, IN UINTN NumberOfChildren, IN EFI_HANDLE *ChildHandleBuffer) |
EFI_STATUS EFIAPI | UsbEcmEntry (IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable) |
Variables | |
EFI_DRIVER_BINDING_PROTOCOL | gUsbEcmDriverBinding |
This file contains code for USB Ethernet Control Model Driver
Copyright (c) 2023, American Megatrends International LLC. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file UsbCdcEcm.c.
Call Back Function.
[in] | Event | Event whose notification function is being invoked. |
[in] | Context | The pointer to the notification function's context, which is implementation-dependent. |
Definition at line 230 of file UsbCdcEcm.c.
EFI_STATUS IsSameDevice | ( | IN EFI_DEVICE_PATH_PROTOCOL * | UsbEthPath, |
IN EFI_DEVICE_PATH_PROTOCOL * | UsbCdcDataPath | ||
) |
Check if the USB ECM and USB CDC Data interfaces are from the same device.
[in] | UsbEthPath | A pointer to the EFI_DEVICE_PATH_PROTOCOL instance. |
[in] | UsbCdcDataPath | A pointer to the EFI_DEVICE_PATH_PROTOCOL instance. |
EFI_SUCCESS | Is the same device. |
EFI_NOT_FOUND | Is not the same device. |
Definition at line 109 of file UsbCdcEcm.c.
BOOLEAN IsSupportedDevice | ( | IN EFI_USB_IO_PROTOCOL * | UsbIo | ) |
Check if this interface is USB ECM SubType
[in] | UsbIo | A pointer to the EFI_USB_IO_PROTOCOL instance. |
TRUE | USB ECM SubType. |
FALSE | Not USB ECM SubType. |
Definition at line 29 of file UsbCdcEcm.c.
BOOLEAN IsUsbCdcData | ( | IN EFI_DEVICE_PATH_PROTOCOL * | UsbEthPath, |
IN OUT EFI_HANDLE * | UsbCdcDataHandle | ||
) |
Check if the USB CDC Data(UsbIo) installed and return USB CDC Data Handle.
[in] | UsbEthPath | A pointer to the EFI_DEVICE_PATH_PROTOCOL instance. |
[in,out] | UsbCdcDataHandle | A pointer to the EFI_HANDLE for USB CDC Data. |
TRUE | USB CDC Data(UsbIo) installed. |
FALSE | USB CDC Data(UsbIo) did not installed. |
Definition at line 159 of file UsbCdcEcm.c.
EFI_STATUS EFIAPI UsbEcmDriverStart | ( | IN EFI_DRIVER_BINDING_PROTOCOL * | This, |
IN EFI_HANDLE | ControllerHandle, | ||
IN EFI_DEVICE_PATH_PROTOCOL * | RemainingDevicePath | ||
) |
USB ECM Driver Binding Start.
[in] | This | Protocol instance pointer. |
[in] | ControllerHandle | Handle of device to bind driver to. |
[in] | RemainingDevicePath | Optional parameter use to pick a specific child device to start. |
EFI_SUCCESS | This driver is added to ControllerHandle |
EFI_DEVICE_ERROR | This driver could not be started due to a device error |
EFI_OUT_OF_RESOURCES | The driver could not install successfully due to a lack of resources. |
other | This driver does not support this device |
Definition at line 292 of file UsbCdcEcm.c.
EFI_STATUS EFIAPI UsbEcmDriverStop | ( | IN EFI_DRIVER_BINDING_PROTOCOL * | This, |
IN EFI_HANDLE | ControllerHandle, | ||
IN UINTN | NumberOfChildren, | ||
IN EFI_HANDLE * | ChildHandleBuffer | ||
) |
USB ECM Driver Binding Stop.
[in] | This | Protocol instance pointer. |
[in] | ControllerHandle | Handle of device to stop driver on |
[in] | NumberOfChildren | Number of Handles in ChildHandleBuffer. If number of children is zero stop the entire bus driver. |
[in] | ChildHandleBuffer | List of Child Handles to Stop. |
EFI_SUCCESS | This driver is removed ControllerHandle |
other | This driver was not removed from this device |
Definition at line 427 of file UsbCdcEcm.c.
EFI_STATUS EFIAPI UsbEcmDriverSupported | ( | IN EFI_DRIVER_BINDING_PROTOCOL * | This, |
IN EFI_HANDLE | ControllerHandle, | ||
IN EFI_DEVICE_PATH_PROTOCOL * | RemainingDevicePath | ||
) |
USB ECM Driver Binding Support.
[in] | This | Protocol instance pointer. |
[in] | ControllerHandle | Handle of device to test. |
[in] | RemainingDevicePath | Optional parameter use to pick a specific child device to start. |
EFI_SUCCESS | This driver supports this device. |
EFI_ALREADY_STARTED | This driver is already running on this device. |
other | This driver does not support this device. |
Definition at line 66 of file UsbCdcEcm.c.
EFI_STATUS EFIAPI UsbEcmEntry | ( | IN EFI_HANDLE | ImageHandle, |
IN EFI_SYSTEM_TABLE * | SystemTable | ||
) |
Entrypoint of ECM Driver.
This function is the entrypoint of ECM Driver. It installs Driver Binding Protocols together with Component Name Protocols.
[in] | ImageHandle | The firmware allocated handle for the EFI image. |
[in] | SystemTable | A pointer to the EFI System Table. |
EFI_SUCCESS | The entry point is executed successfully. |
Definition at line 486 of file UsbCdcEcm.c.
EFI_DRIVER_BINDING_PROTOCOL gUsbEcmDriverBinding |
Definition at line 10 of file UsbCdcEcm.c.