MdeModulePkg/UsbBus: Fix various typos
Fix various typos in comments and documentation. Cc: Jian J Wang <jian.j.wang@intel.com> Cc: Hao A Wu <hao.a.wu@intel.com> Cc: Ray Ni <ray.ni@intel.com> Signed-off-by: Antoine Coeur <coeur@gmx.fr> Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com> Acked-by: Liming Gao <liming.gao@intel.com> Signed-off-by: Philippe Mathieu-Daude <philmd@redhat.com> Message-Id: <20200207010831.9046-22-philmd@redhat.com>
This commit is contained in:
parent
d22867471f
commit
13a623cf9c
|
@ -96,10 +96,10 @@ UsbIoControlTransfer (
|
||||||
UsbStatus
|
UsbStatus
|
||||||
);
|
);
|
||||||
//
|
//
|
||||||
// If the request completed sucessfully and the Direction of the request is
|
// If the request completed successfully and the Direction of the request is
|
||||||
// EfiUsbDataIn or EfiUsbDataOut, then make sure the actual number of bytes
|
// EfiUsbDataIn or EfiUsbDataOut, then make sure the actual number of bytes
|
||||||
// transfered is the same as the number of bytes requested. If a different
|
// transferred is the same as the number of bytes requested. If a different
|
||||||
// number of bytes were transfered, then return EFI_DEVICE_ERROR.
|
// number of bytes were transferred, then return EFI_DEVICE_ERROR.
|
||||||
//
|
//
|
||||||
if (!EFI_ERROR (Status)) {
|
if (!EFI_ERROR (Status)) {
|
||||||
if (Direction != EfiUsbNoData && DataLength != RequestedDataLength) {
|
if (Direction != EfiUsbNoData && DataLength != RequestedDataLength) {
|
||||||
|
@ -389,7 +389,7 @@ ON_EXIT:
|
||||||
the request.
|
the request.
|
||||||
@param PollInterval The interval to poll the transfer result, (in ms).
|
@param PollInterval The interval to poll the transfer result, (in ms).
|
||||||
@param DataLength The length of perodic data transfer.
|
@param DataLength The length of perodic data transfer.
|
||||||
@param Callback The function to call periodicaly when transfer is
|
@param Callback The function to call periodically when transfer is
|
||||||
ready.
|
ready.
|
||||||
@param Context The context to the callback.
|
@param Context The context to the callback.
|
||||||
|
|
||||||
|
@ -490,7 +490,7 @@ UsbIoIsochronousTransfer (
|
||||||
@param DeviceEndpoint The device endpoint.
|
@param DeviceEndpoint The device endpoint.
|
||||||
@param Data The data to transfer.
|
@param Data The data to transfer.
|
||||||
@param DataLength The length of perodic data transfer.
|
@param DataLength The length of perodic data transfer.
|
||||||
@param IsochronousCallBack The function to call periodicaly when transfer is
|
@param IsochronousCallBack The function to call periodically when transfer is
|
||||||
ready.
|
ready.
|
||||||
@param Context The context to the callback.
|
@param Context The context to the callback.
|
||||||
|
|
||||||
|
@ -1355,7 +1355,7 @@ UsbBusControllerDriverStart (
|
||||||
if (IsDevicePathEnd (RemainingDevicePath)) {
|
if (IsDevicePathEnd (RemainingDevicePath)) {
|
||||||
//
|
//
|
||||||
// If RemainingDevicePath is the End of Device Path Node,
|
// If RemainingDevicePath is the End of Device Path Node,
|
||||||
// skip enumerate any device and return EFI_SUCESSS
|
// skip enumerate any device and return EFI_SUCCESS
|
||||||
//
|
//
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
|
@ -159,7 +159,7 @@ typedef struct _EFI_USB_BUS_PROTOCOL {
|
||||||
|
|
||||||
//
|
//
|
||||||
// Stands for the real USB device. Each device may
|
// Stands for the real USB device. Each device may
|
||||||
// has several seperately working interfaces.
|
// has several separately working interfaces.
|
||||||
//
|
//
|
||||||
struct _USB_DEVICE {
|
struct _USB_DEVICE {
|
||||||
USB_BUS *Bus;
|
USB_BUS *Bus;
|
||||||
|
@ -265,8 +265,8 @@ struct _USB_BUS {
|
||||||
// USB Bus driver need to control the recursive connect policy of the bus, only those wanted
|
// USB Bus driver need to control the recursive connect policy of the bus, only those wanted
|
||||||
// usb child device will be recursively connected.
|
// usb child device will be recursively connected.
|
||||||
//
|
//
|
||||||
// WantedUsbIoDPList tracks the Usb child devices which user want to recursivly fully connecte,
|
// WantedUsbIoDPList tracks the Usb child devices which user want to recursively fully connecte,
|
||||||
// every wanted child device is stored in a item of the WantedUsbIoDPList, whose structrure is
|
// every wanted child device is stored in a item of the WantedUsbIoDPList, whose structure is
|
||||||
// DEVICE_PATH_LIST_ITEM
|
// DEVICE_PATH_LIST_ITEM
|
||||||
//
|
//
|
||||||
LIST_ENTRY WantedUsbIoDPList;
|
LIST_ENTRY WantedUsbIoDPList;
|
||||||
|
@ -337,7 +337,7 @@ UsbBusAddWantedUsbIoDP (
|
||||||
Check whether a usb child device is the wanted device in a bus.
|
Check whether a usb child device is the wanted device in a bus.
|
||||||
|
|
||||||
@param Bus The Usb bus's private data pointer.
|
@param Bus The Usb bus's private data pointer.
|
||||||
@param UsbIf The usb child device inferface.
|
@param UsbIf The usb child device interface.
|
||||||
|
|
||||||
@retval True If a usb child device is the wanted device in a bus.
|
@retval True If a usb child device is the wanted device in a bus.
|
||||||
@retval False If a usb child device is *NOT* the wanted device in a bus.
|
@retval False If a usb child device is *NOT* the wanted device in a bus.
|
||||||
|
@ -351,7 +351,7 @@ UsbBusIsWantedUsbIO (
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Recursively connnect every wanted usb child device to ensure they all fully connected.
|
Recursively connect every wanted usb child device to ensure they all fully connected.
|
||||||
Check all the child Usb IO handles in this bus, recursively connecte if it is wanted usb child device.
|
Check all the child Usb IO handles in this bus, recursively connecte if it is wanted usb child device.
|
||||||
|
|
||||||
@param UsbBusId Point to EFI_USB_BUS_PROTOCOL interface.
|
@param UsbBusId Point to EFI_USB_BUS_PROTOCOL interface.
|
||||||
|
@ -461,7 +461,7 @@ UsbIoSyncInterruptTransfer (
|
||||||
the request.
|
the request.
|
||||||
@param PollInterval The interval to poll the transfer result, (in ms).
|
@param PollInterval The interval to poll the transfer result, (in ms).
|
||||||
@param DataLength The length of perodic data transfer.
|
@param DataLength The length of perodic data transfer.
|
||||||
@param Callback The function to call periodicaly when transfer is
|
@param Callback The function to call periodically when transfer is
|
||||||
ready.
|
ready.
|
||||||
@param Context The context to the callback.
|
@param Context The context to the callback.
|
||||||
|
|
||||||
|
@ -512,7 +512,7 @@ UsbIoIsochronousTransfer (
|
||||||
@param DeviceEndpoint The device endpoint.
|
@param DeviceEndpoint The device endpoint.
|
||||||
@param Data The data to transfer.
|
@param Data The data to transfer.
|
||||||
@param DataLength The length of perodic data transfer.
|
@param DataLength The length of perodic data transfer.
|
||||||
@param IsochronousCallBack The function to call periodicaly when transfer is
|
@param IsochronousCallBack The function to call periodically when transfer is
|
||||||
ready.
|
ready.
|
||||||
@param Context The context to the callback.
|
@param Context The context to the callback.
|
||||||
|
|
||||||
|
|
|
@ -757,7 +757,7 @@ UsbEnumerateNewDev (
|
||||||
|
|
||||||
//
|
//
|
||||||
// After port is reset, hub establishes a signal path between
|
// After port is reset, hub establishes a signal path between
|
||||||
// the device and host (DEFALUT state). Device's registers are
|
// the device and host (DEFAULT state). Device's registers are
|
||||||
// reset, use default address 0 (host enumerates one device at
|
// reset, use default address 0 (host enumerates one device at
|
||||||
// a time) , and ready to respond to control transfer at EP 0.
|
// a time) , and ready to respond to control transfer at EP 0.
|
||||||
//
|
//
|
||||||
|
|
|
@ -545,7 +545,7 @@ UsbOnHubInterrupt (
|
||||||
// OK, actually something is changed, save the change map
|
// OK, actually something is changed, save the change map
|
||||||
// then signal the HUB to do enumeration. This is a good
|
// then signal the HUB to do enumeration. This is a good
|
||||||
// practise since UsbOnHubInterrupt is called in the context
|
// practise since UsbOnHubInterrupt is called in the context
|
||||||
// of host contrller's AsyncInterrupt monitor.
|
// of host controller's AsyncInterrupt monitor.
|
||||||
//
|
//
|
||||||
HubIf->ChangeMap = AllocateZeroPool (DataLength);
|
HubIf->ChangeMap = AllocateZeroPool (DataLength);
|
||||||
|
|
||||||
|
@ -630,7 +630,7 @@ UsbHubInit (
|
||||||
|
|
||||||
//
|
//
|
||||||
// OK, set IsHub to TRUE. Now usb bus can handle this device
|
// OK, set IsHub to TRUE. Now usb bus can handle this device
|
||||||
// as a working HUB. If failed eariler, bus driver will not
|
// as a working HUB. If failed earlier, bus driver will not
|
||||||
// recognize it as a hub. Other parts of the bus should be able
|
// recognize it as a hub. Other parts of the bus should be able
|
||||||
// to work.
|
// to work.
|
||||||
//
|
//
|
||||||
|
|
|
@ -97,7 +97,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||||
|
|
||||||
#pragma pack(1)
|
#pragma pack(1)
|
||||||
//
|
//
|
||||||
// Hub descriptor, the last two fields are of variable lenght.
|
// Hub descriptor, the last two fields are of variable length.
|
||||||
//
|
//
|
||||||
typedef struct {
|
typedef struct {
|
||||||
UINT8 Length;
|
UINT8 Length;
|
||||||
|
|
|
@ -784,7 +784,7 @@ MatchUsbClass (
|
||||||
// If connect class policy, determine whether to create device handle by the five fields
|
// If connect class policy, determine whether to create device handle by the five fields
|
||||||
// in class device path node.
|
// in class device path node.
|
||||||
//
|
//
|
||||||
// In addtion, hub interface is always matched for this policy.
|
// In addition, hub interface is always matched for this policy.
|
||||||
//
|
//
|
||||||
if ((ActIfDesc->InterfaceClass == USB_HUB_CLASS_CODE) &&
|
if ((ActIfDesc->InterfaceClass == USB_HUB_CLASS_CODE) &&
|
||||||
(ActIfDesc->InterfaceSubClass == USB_HUB_SUBCLASS_CODE)) {
|
(ActIfDesc->InterfaceSubClass == USB_HUB_SUBCLASS_CODE)) {
|
||||||
|
@ -1018,7 +1018,7 @@ UsbBusAddWantedUsbIoDP (
|
||||||
} else {
|
} else {
|
||||||
//
|
//
|
||||||
// If RemainingDevicePath is the End of Device Path Node,
|
// If RemainingDevicePath is the End of Device Path Node,
|
||||||
// skip enumerate any device and return EFI_SUCESSS
|
// skip enumerate any device and return EFI_SUCCESS
|
||||||
//
|
//
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
@ -1034,7 +1034,7 @@ UsbBusAddWantedUsbIoDP (
|
||||||
Check whether a usb child device is the wanted device in a bus.
|
Check whether a usb child device is the wanted device in a bus.
|
||||||
|
|
||||||
@param Bus The Usb bus's private data pointer.
|
@param Bus The Usb bus's private data pointer.
|
||||||
@param UsbIf The usb child device inferface.
|
@param UsbIf The usb child device interface.
|
||||||
|
|
||||||
@retval True If a usb child device is the wanted device in a bus.
|
@retval True If a usb child device is the wanted device in a bus.
|
||||||
@retval False If a usb child device is *NOT* the wanted device in a bus.
|
@retval False If a usb child device is *NOT* the wanted device in a bus.
|
||||||
|
@ -1136,7 +1136,7 @@ UsbBusIsWantedUsbIO (
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Recursively connnect every wanted usb child device to ensure they all fully connected.
|
Recursively connect every wanted usb child device to ensure they all fully connected.
|
||||||
Check all the child Usb IO handles in this bus, recursively connecte if it is wanted usb child device.
|
Check all the child Usb IO handles in this bus, recursively connecte if it is wanted usb child device.
|
||||||
|
|
||||||
@param UsbBusId Point to EFI_USB_BUS_PROTOCOL interface.
|
@param UsbBusId Point to EFI_USB_BUS_PROTOCOL interface.
|
||||||
|
|
|
@ -101,7 +101,7 @@ UsbHcClearRootHubPortFeature (
|
||||||
@param UsbResult The result of transfer.
|
@param UsbResult The result of transfer.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The control transfer finished without error.
|
@retval EFI_SUCCESS The control transfer finished without error.
|
||||||
@retval Others The control transfer failed, reason returned in UsbReslt.
|
@retval Others The control transfer failed, reason returned in UsbResult.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
|
|
|
@ -78,7 +78,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||||
#define MAXBYTES 8
|
#define MAXBYTES 8
|
||||||
#pragma pack(1)
|
#pragma pack(1)
|
||||||
//
|
//
|
||||||
// Hub descriptor, the last two fields are of variable lenght.
|
// Hub descriptor, the last two fields are of variable length.
|
||||||
//
|
//
|
||||||
typedef struct {
|
typedef struct {
|
||||||
UINT8 Length;
|
UINT8 Length;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/** @file
|
/** @file
|
||||||
Common Libarary for PEI USB
|
Common Library for PEI USB
|
||||||
|
|
||||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved. <BR>
|
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved. <BR>
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/** @file
|
/** @file
|
||||||
Common Libarary for PEI USB
|
Common Library for PEI USB
|
||||||
|
|
||||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved. <BR>
|
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved. <BR>
|
||||||
|
|
||||||
|
|
|
@ -131,7 +131,7 @@ PeiUsbControlTransfer (
|
||||||
@param DeviceEndpoint Endpoint number and its direction in bit 7.
|
@param DeviceEndpoint Endpoint number and its direction in bit 7.
|
||||||
@param Data A pointer to the buffer of data to transmit
|
@param Data A pointer to the buffer of data to transmit
|
||||||
from or receive into.
|
from or receive into.
|
||||||
@param DataLength The lenght of the data buffer.
|
@param DataLength The length of the data buffer.
|
||||||
@param Timeout Indicates the maximum time, in millisecond, which the
|
@param Timeout Indicates the maximum time, in millisecond, which the
|
||||||
transfer is allowed to complete. If Timeout is 0, then
|
transfer is allowed to complete. If Timeout is 0, then
|
||||||
the caller must wait for the function to be completed
|
the caller must wait for the function to be completed
|
||||||
|
|
|
@ -154,7 +154,7 @@ PeiUsbControlTransfer (
|
||||||
@param DeviceEndpoint Endpoint number and its direction in bit 7.
|
@param DeviceEndpoint Endpoint number and its direction in bit 7.
|
||||||
@param Data A pointer to the buffer of data to transmit
|
@param Data A pointer to the buffer of data to transmit
|
||||||
from or receive into.
|
from or receive into.
|
||||||
@param DataLength The lenght of the data buffer.
|
@param DataLength The length of the data buffer.
|
||||||
@param Timeout Indicates the maximum time, in millisecond, which the
|
@param Timeout Indicates the maximum time, in millisecond, which the
|
||||||
transfer is allowed to complete. If Timeout is 0, then
|
transfer is allowed to complete. If Timeout is 0, then
|
||||||
the caller must wait for the function to be completed
|
the caller must wait for the function to be completed
|
||||||
|
|
Loading…
Reference in New Issue