diff options
author | vanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524> | 2007-06-25 08:54:54 +0000 |
---|---|---|
committer | vanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524> | 2007-06-25 08:54:54 +0000 |
commit | 93b0fbc8a1731a3c4ae789bebac4b1d8966719c3 (patch) | |
tree | 800e8a6512892d5de738f0c86bf8f5bc3ab9063b /EdkModulePkg/Bus | |
parent | a197b1ad17703a117e5b67c50c311325a2b3bdcb (diff) | |
download | edk2-93b0fbc8a1731a3c4ae789bebac4b1d8966719c3.zip edk2-93b0fbc8a1731a3c4ae789bebac4b1d8966719c3.tar.gz edk2-93b0fbc8a1731a3c4ae789bebac4b1d8966719c3.tar.bz2 |
Add some definitions for efi event in Uefi/UefiSpec.h to follow spec.
Changed old event definitions reference to these new event definitions.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2729 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'EdkModulePkg/Bus')
-rw-r--r-- | EdkModulePkg/Bus/Pci/CirrusLogic/Dxe/CirrusLogic5430UgaDraw.c | 2 | ||||
-rw-r--r-- | EdkModulePkg/Bus/Pci/Ehci/Dxe/Ehci.c | 2 | ||||
-rw-r--r-- | EdkModulePkg/Bus/Pci/Ehci/Dxe/EhciMem.c | 8 | ||||
-rw-r--r-- | EdkModulePkg/Bus/Pci/Ehci/Dxe/EhciSched.c | 10 | ||||
-rw-r--r-- | EdkModulePkg/Bus/Pci/IdeBus/Dxe/idebus.c | 54 | ||||
-rw-r--r-- | EdkModulePkg/Bus/Pci/PciBus/Dxe/PciEnumeratorSupport.c | 6 | ||||
-rw-r--r-- | EdkModulePkg/Bus/Pci/PciBus/Dxe/PciHotPlugSupport.c | 24 | ||||
-rw-r--r-- | EdkModulePkg/Bus/Pci/Uhci/Dxe/uhci.c | 1288 | ||||
-rw-r--r-- | EdkModulePkg/Bus/Pci/Undi/RuntimeDxe/Init.c | 68 | ||||
-rw-r--r-- | EdkModulePkg/Bus/Scsi/ScsiDisk/Dxe/ScsiDisk.c | 6 | ||||
-rw-r--r-- | EdkModulePkg/Bus/Usb/UsbBus/Dxe/usbbus.c | 638 | ||||
-rw-r--r-- | EdkModulePkg/Bus/Usb/UsbKb/Dxe/efikey.c | 98 | ||||
-rw-r--r-- | EdkModulePkg/Bus/Usb/UsbKb/Dxe/keyboard.c | 188 | ||||
-rw-r--r-- | EdkModulePkg/Bus/Usb/UsbMassStorage/Dxe/UsbMassStorage.c | 6 | ||||
-rw-r--r-- | EdkModulePkg/Bus/Usb/UsbMouse/Dxe/usbmouse.c | 48 |
15 files changed, 1223 insertions, 1223 deletions
diff --git a/EdkModulePkg/Bus/Pci/CirrusLogic/Dxe/CirrusLogic5430UgaDraw.c b/EdkModulePkg/Bus/Pci/CirrusLogic/Dxe/CirrusLogic5430UgaDraw.c index e71ec8e..056d115 100644 --- a/EdkModulePkg/Bus/Pci/CirrusLogic/Dxe/CirrusLogic5430UgaDraw.c +++ b/EdkModulePkg/Bus/Pci/CirrusLogic/Dxe/CirrusLogic5430UgaDraw.c @@ -321,7 +321,7 @@ CirrusLogic5430UgaDrawBlt ( // We would not want a timer based event (Cursor, ...) to come in while we are
// doing this operation.
//
- OriginalTPL = gBS->RaiseTPL (EFI_TPL_NOTIFY);
+ OriginalTPL = gBS->RaiseTPL (TPL_NOTIFY);
switch (BltOperation) {
case EfiUgaVideoToBltBuffer:
diff --git a/EdkModulePkg/Bus/Pci/Ehci/Dxe/Ehci.c b/EdkModulePkg/Bus/Pci/Ehci/Dxe/Ehci.c index cb89e17..9065a2a 100644 --- a/EdkModulePkg/Bus/Pci/Ehci/Dxe/Ehci.c +++ b/EdkModulePkg/Bus/Pci/Ehci/Dxe/Ehci.c @@ -2138,7 +2138,7 @@ EhciAsyncInterruptTransfer ( //
if (!IsNewTransfer) {
- OldTpl = gBS->RaiseTPL (EFI_TPL_NOTIFY);
+ OldTpl = gBS->RaiseTPL (TPL_NOTIFY);
Status = DeleteAsyncRequestTransfer (
HcDev,
diff --git a/EdkModulePkg/Bus/Pci/Ehci/Dxe/EhciMem.c b/EdkModulePkg/Bus/Pci/Ehci/Dxe/EhciMem.c index 24a4616..db7412b 100644 --- a/EdkModulePkg/Bus/Pci/Ehci/Dxe/EhciMem.c +++ b/EdkModulePkg/Bus/Pci/Ehci/Dxe/EhciMem.c @@ -239,7 +239,7 @@ Returns: MemoryHeader = HcDev->MemoryHeader;
ASSERT (MemoryHeader != NULL);
- OldTpl = gBS->RaiseTPL (EFI_TPL_NOTIFY + 1);
+ OldTpl = gBS->RaiseTPL (TPL_NOTIFY + 1);
//
// allocate unit is 32 bytes (align on 32 byte)
@@ -297,7 +297,7 @@ Returns: return Status;
}
- OldTpl = gBS->RaiseTPL (EFI_TPL_NOTIFY + 1);
+ OldTpl = gBS->RaiseTPL (TPL_NOTIFY + 1);
//
// Link the new Memory Block to the Memory Header list
@@ -353,7 +353,7 @@ Returns: UINTN RealAllocSize;
EFI_TPL OldTpl;
- OldTpl = gBS->RaiseTPL (EFI_TPL_NOTIFY + 1);
+ OldTpl = gBS->RaiseTPL (TPL_NOTIFY + 1);
MemoryHeader = HcDev->MemoryHeader;
@@ -419,7 +419,7 @@ Returns: //
gBS->RestoreTPL (OldTpl);
FreeMemoryHeader (HcDev, TempHeaderPtr);
- OldTpl = gBS->RaiseTPL (EFI_TPL_NOTIFY + 1);
+ OldTpl = gBS->RaiseTPL (TPL_NOTIFY + 1);
//
// reset the TempHeaderPtr, continue search for
// another empty memory block.
diff --git a/EdkModulePkg/Bus/Pci/Ehci/Dxe/EhciSched.c b/EdkModulePkg/Bus/Pci/Ehci/Dxe/EhciSched.c index 448fe20..4e4a54c 100644 --- a/EdkModulePkg/Bus/Pci/Ehci/Dxe/EhciSched.c +++ b/EdkModulePkg/Bus/Pci/Ehci/Dxe/EhciSched.c @@ -253,7 +253,7 @@ Returns: //
if (HcDev->Is64BitCapable != 0) {
HcDev->High32BitAddr = (UINT32) GET_32B_TO_63B (FrameBuffer);
-
+
Status = SetCtrlDataStructSeg (HcDev);
if (EFI_ERROR (Status)) {
DEBUG ((gEHCErrorLevel, "EHCI: SetCtrlDataStructSeg Failed\n"));
@@ -347,8 +347,8 @@ Returns: --*/
{
return gBS->CreateEvent (
- EFI_EVENT_TIMER | EFI_EVENT_NOTIFY_SIGNAL,
- EFI_TPL_NOTIFY,
+ EVT_TIMER | EVT_NOTIFY_SIGNAL,
+ TPL_NOTIFY,
NotifyFunction,
HcDev,
&HcDev->AsyncRequestEvent
@@ -1868,7 +1868,7 @@ Returns: QhPtr->Qh.HeadReclamationFlag = FALSE;
if (QhPtr->TransferType == ASYNC_INTERRUPT_TRANSFER) {
-
+
//
// AsyncInterruptTransfer Qh
//
@@ -2596,7 +2596,7 @@ Returns: break;
default:
-
+
Status = EFI_INVALID_PARAMETER;
}
diff --git a/EdkModulePkg/Bus/Pci/IdeBus/Dxe/idebus.c b/EdkModulePkg/Bus/Pci/IdeBus/Dxe/idebus.c index c1c1405..c45238c 100644 --- a/EdkModulePkg/Bus/Pci/IdeBus/Dxe/idebus.c +++ b/EdkModulePkg/Bus/Pci/IdeBus/Dxe/idebus.c @@ -1,12 +1,12 @@ /** @file
Copyright (c) 2006 - 2007 Intel Corporation. <BR>
- All rights reserved. This program and the accompanying materials
- are licensed and made available under the terms and conditions of the BSD License
- which accompanies this distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php
+ All rights reserved. This program and the accompanying materials
+ are licensed and made available under the terms and conditions of the BSD License
+ which accompanies this distribution. The full text of the license may be found at
+ http://opensource.org/licenses/bsd-license.php
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
@par Revision Reference:
This module is modified from DXE\IDE module for Ide Contriller Init support
@@ -89,7 +89,7 @@ IDEBusDriverBindingSupported ( if (EFI_ERROR (Status)) {
return Status;
}
-
+
//
// Close protocol, don't use device path protocol in the .Support() function
//
@@ -140,7 +140,7 @@ IDEBusDriverBindingSupported ( // ***********************************************************************************
//
/**
- Start this driver on Controller by detecting all disks and installing
+ Start this driver on Controller by detecting all disks and installing
BlockIo protocol on them.
@param This Protocol instance pointer.
@@ -210,7 +210,7 @@ IDEBusDriverBindingStart ( if ((EFI_ERROR (Status)) && (Status != EFI_ALREADY_STARTED)) {
return Status;
}
-
+
//
// Now open the IDE_CONTROLLER_INIT protocol. Step7.1
//
@@ -429,7 +429,7 @@ IDEBusDriverBindingStart ( if (!(ConfigurationOptions & (1 << (IdeChannel * 2 + IdeDevice)))) {
continue;
}
-
+
//
// The device has been scanned in another Start(), No need to scan it again
// for perf optimization.
@@ -437,7 +437,7 @@ IDEBusDriverBindingStart ( if (IdeBusDriverPrivateData->HaveScannedDevice[IdeChannel * 2 + IdeDevice]) {
continue;
}
-
+
//
// create child handle for the detected device.
//
@@ -664,7 +664,7 @@ IDEBusDriverBindingStart ( if ((IdeBlkIoDevicePtr->Type == IdeHardDisk) || (IdeBlkIoDevicePtr->Type == Ide48bitAddressingHardDisk)) {
Status = SetDriveParameters (IdeBlkIoDevicePtr, &DriveParameters);
}
-
+
//
// Record PIO mode used in private data
//
@@ -715,13 +715,13 @@ IDEBusDriverBindingStart ( (EFI_IO_BUS_ATA_ATAPI | EFI_P_PC_ENABLE),
IdeBlkIoDevicePtr->DevicePath
);
-
+
//
// Create event to clear pending IDE interrupt
//
Status = gBS->CreateEvent (
- EFI_EVENT_SIGNAL_EXIT_BOOT_SERVICES,
- EFI_TPL_NOTIFY,
+ EVT_SIGNAL_EXIT_BOOT_SERVICES,
+ TPL_NOTIFY,
ClearInterrupt,
IdeBlkIoDevicePtr,
&IdeBlkIoDevicePtr->ExitBootServiceEvent
@@ -735,7 +735,7 @@ IDEBusDriverBindingStart ( // end of 2nd outer loop ==========
//
}
-
+
//
// All configurations done! Notify IdeController to do post initialization
// work such as saving IDE controller PCI settings for S3 resume
@@ -808,7 +808,7 @@ ErrorExit: // ***********************************************************************************
//
/**
- Stop this driver on Controller Handle.
+ Stop this driver on Controller Handle.
@param This Protocol instance pointer.
@param DeviceHandle Handle of device to stop driver on
@@ -1003,7 +1003,7 @@ DeRegisterIdeDevice ( );
return Status;
}
-
+
//
// Release allocated resources
//
@@ -1037,7 +1037,7 @@ IDEBlkIoReset ( EFI_STATUS Status;
EFI_TPL OldTpl;
- OldTpl = gBS->RaiseTPL (EFI_TPL_CALLBACK);
+ OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
IdeBlkIoDevice = IDE_BLOCK_IO_DEV_FROM_THIS (This);
//
@@ -1058,7 +1058,7 @@ IDEBlkIoReset ( Status = EFI_DEVICE_ERROR;
goto Done;
}
-
+
//
// for ATAPI device, using ATAPI reset method
//
@@ -1099,7 +1099,7 @@ IDEBlkIoReadBlocks ( EFI_STATUS Status;
EFI_TPL OldTpl;
- OldTpl = gBS->RaiseTPL (EFI_TPL_CALLBACK);
+ OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
IdeBlkIoDevice = IDE_BLOCK_IO_DEV_FROM_THIS (This);
@@ -1127,7 +1127,7 @@ IDEBlkIoReadBlocks ( Status = EFI_DEVICE_ERROR;
goto Done;
}
-
+
//
// for ATAPI device, using ATAPI read block's mechanism
//
@@ -1172,8 +1172,8 @@ IDEBlkIoWriteBlocks ( EFI_STATUS Status;
EFI_TPL OldTpl;
- OldTpl = gBS->RaiseTPL (EFI_TPL_CALLBACK);
-
+ OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
+
IdeBlkIoDevice = IDE_BLOCK_IO_DEV_FROM_THIS (This);
//
// Requery IDE IO resources in case of the switch of native and legacy modes
@@ -1184,7 +1184,7 @@ IDEBlkIoWriteBlocks ( // for ATA device, using ATA write block's mechanism
//
if (IdeBlkIoDevice->Type == IdeHardDisk ||
- IdeBlkIoDevice->Type == Ide48bitAddressingHardDisk) {
+ IdeBlkIoDevice->Type == Ide48bitAddressingHardDisk) {
Status = AtaBlkIoWriteBlocks (
IdeBlkIoDevice,
@@ -1200,7 +1200,7 @@ IDEBlkIoWriteBlocks ( Status = EFI_DEVICE_ERROR;
goto Done;
}
-
+
//
// for ATAPI device, using ATAPI write block's mechanism
//
@@ -1211,7 +1211,7 @@ IDEBlkIoWriteBlocks ( BufferSize,
Buffer
);
-
+
Done:
gBS->RestoreTPL (OldTpl);
return Status;
diff --git a/EdkModulePkg/Bus/Pci/PciBus/Dxe/PciEnumeratorSupport.c b/EdkModulePkg/Bus/Pci/PciBus/Dxe/PciEnumeratorSupport.c index 52a3a7b..8020ab1 100644 --- a/EdkModulePkg/Bus/Pci/PciBus/Dxe/PciEnumeratorSupport.c +++ b/EdkModulePkg/Bus/Pci/PciBus/Dxe/PciEnumeratorSupport.c @@ -693,7 +693,7 @@ Returns: //
// Raise TPL to high level to disable timer interrupt while the BAR is probed
//
- OldTpl = gBS->RaiseTPL (EFI_TPL_HIGH_LEVEL);
+ OldTpl = gBS->RaiseTPL (TPL_HIGH_LEVEL);
PciIoWrite (PciIo, EfiPciIoWidthUint32, (UINT8) Offset, 1, &gAllOne);
PciIoRead (PciIo, EfiPciIoWidthUint32, (UINT8) Offset, 1, &Value);
@@ -759,7 +759,7 @@ Returns: //
// Raise TPL to high level to disable timer interrupt while the BAR is probed
//
- OldTpl = gBS->RaiseTPL (EFI_TPL_HIGH_LEVEL);
+ OldTpl = gBS->RaiseTPL (TPL_HIGH_LEVEL);
PciSetCommandRegister (PciIoDevice, *Command);
PciReadCommandRegister (PciIoDevice, Command);
@@ -784,7 +784,7 @@ Returns: //
// Raise TPL to high level to disable timer interrupt while the BAR is probed
//
- OldTpl = gBS->RaiseTPL (EFI_TPL_HIGH_LEVEL);
+ OldTpl = gBS->RaiseTPL (TPL_HIGH_LEVEL);
PciSetBridgeControlRegister (PciIoDevice, *BridgeControl);
PciReadBridgeControlRegister (PciIoDevice, BridgeControl);
diff --git a/EdkModulePkg/Bus/Pci/PciBus/Dxe/PciHotPlugSupport.c b/EdkModulePkg/Bus/Pci/PciBus/Dxe/PciHotPlugSupport.c index 7fba047..3ef1daf 100644 --- a/EdkModulePkg/Bus/Pci/PciBus/Dxe/PciHotPlugSupport.c +++ b/EdkModulePkg/Bus/Pci/PciBus/Dxe/PciHotPlugSupport.c @@ -1,21 +1,21 @@ /*++
-Copyright (c) 2006 - 2007, Intel Corporation
-All rights reserved. This program and the accompanying materials
-are licensed and made available under the terms and conditions of the BSD License
-which accompanies this distribution. The full text of the license may be found at
-http://opensource.org/licenses/bsd-license.php
-
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+Copyright (c) 2006 - 2007, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
Module Name:
PciHotPlugSupport.c
-
+
Abstract:
-
+
Revision History
@@ -254,8 +254,8 @@ Returns: EFI_STATUS Status;
Status = gBS->CreateEvent (
- EFI_EVENT_NOTIFY_SIGNAL,
- EFI_TPL_CALLBACK,
+ EVT_NOTIFY_SIGNAL,
+ TPL_CALLBACK,
PciHPCInitialized,
gPciRootHpcData + HpIndex,
&((gPciRootHpcData + HpIndex)->Event)
diff --git a/EdkModulePkg/Bus/Pci/Uhci/Dxe/uhci.c b/EdkModulePkg/Bus/Pci/Uhci/Dxe/uhci.c index b3cb1f5..7cb9605 100644 --- a/EdkModulePkg/Bus/Pci/Uhci/Dxe/uhci.c +++ b/EdkModulePkg/Bus/Pci/Uhci/Dxe/uhci.c @@ -1,20 +1,20 @@ /*++
-Copyright (c) 2006, Intel Corporation
-All rights reserved. This program and the accompanying materials
-are licensed and made available under the terms and conditions of the BSD License
-which accompanies this distribution. The full text of the license may be found at
-http://opensource.org/licenses/bsd-license.php
-
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+Copyright (c) 2006, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
Module Name:
Uhci.c
-
-Abstract:
-
+
+Abstract:
+
Revision History
--*/
@@ -144,13 +144,13 @@ UHCIDriverBindingStart ( EFI_OUT_OF_RESOURCES
--*/
-{
- EFI_STATUS Status;
- UINTN FlBaseAddrReg;
- EFI_PCI_IO_PROTOCOL *PciIo;
+{
+ EFI_STATUS Status;
+ UINTN FlBaseAddrReg;
+ EFI_PCI_IO_PROTOCOL *PciIo;
USB_HC_DEV *HcDev;
UINT64 Supports;
-
+
HcDev = NULL;
Status = gBS->OpenProtocol (
@@ -249,10 +249,10 @@ UHCIDriverBindingStart ( HcDev->Usb2Hc.GetRootHubPortStatus = UHCI2GetRootHubPortStatus;
HcDev->Usb2Hc.SetRootHubPortFeature = UHCI2SetRootHubPortFeature;
HcDev->Usb2Hc.ClearRootHubPortFeature = UHCI2ClearRootHubPortFeature;
-
+
HcDev->Usb2Hc.MajorRevision = 0x1;
HcDev->Usb2Hc.MinorRevision = 0x1;
-
+
//
// Init UHCI private data structures
//
@@ -289,8 +289,8 @@ UHCIDriverBindingStart ( // Create timer for interrupt transfer result polling
//
Status = gBS->CreateEvent (
- EFI_EVENT_TIMER | EFI_EVENT_NOTIFY_SIGNAL,
- EFI_TPL_NOTIFY,
+ EVT_TIMER | EVT_NOTIFY_SIGNAL,
+ TPL_NOTIFY,
MonitorInterruptTrans,
HcDev,
&HcDev->InterruptTransTimer
@@ -337,7 +337,7 @@ UHCIDriverBindingStart ( );
return EFI_UNSUPPORTED;
}
-
+
//
// QH,TD structures must in common buffer that will be
// accessed by both cpu and usb bus master at the same time.
@@ -345,9 +345,9 @@ UHCIDriverBindingStart ( //
Status = InitializeMemoryManagement (HcDev);
if (EFI_ERROR (Status)) {
-
+
gBS->CloseEvent (HcDev->InterruptTransTimer);
-
+
FreeFrameListEntry (HcDev);
if (HcDev != NULL) {
@@ -355,9 +355,9 @@ UHCIDriverBindingStart ( }
gBS->CloseProtocol (
- Controller,
- &gEfiPciIoProtocolGuid,
- This->DriverBindingHandle,
+ Controller,
+ &gEfiPciIoProtocolGuid,
+ This->DriverBindingHandle,
Controller
);
return Status;
@@ -417,7 +417,7 @@ UHCIDriverBindingStart ( return Status;
}
-
+
//
// component name protocol.
//
@@ -461,13 +461,13 @@ UnInstallUHCInterface ( &gEfiUsbHcProtocolGuid,
&HcDev->UsbHc
);
-
+
gBS->UninstallProtocolInterface (
Controller,
&gEfiUsb2HcProtocolGuid,
&HcDev->Usb2Hc
);
- //
+ //
// first stop USB Host Controller
//
This->SetState (This, EfiUsbHcStateHalt);
@@ -610,35 +610,35 @@ UHCIReset ( IN UINT16 Attributes
)
/*++
-
+
Routine Description:
Provides software reset for the USB host controller.
-
+
Arguments:
-
- This A pointer to the EFI_USB_HC_PROTOCOL instance.
-
- Attributes A bit mask of the reset operation to perform.
+
+ This A pointer to the EFI_USB_HC_PROTOCOL instance.
+
+ Attributes A bit mask of the reset operation to perform.
See below for a list of the supported bit mask values.
-
+
#define EFI_USB_HC_RESET_GLOBAL 0x0001
#define EFI_USB_HC_RESET_HOST_CONTROLLER 0x0002
- EFI_USB_HC_RESET_GLOBAL
+ EFI_USB_HC_RESET_GLOBAL
If this bit is set, a global reset signal will be sent to the USB bus.
- This resets all of the USB bus logic, including the USB host
+ This resets all of the USB bus logic, including the USB host
controller hardware and all the devices attached on the USB bus.
- EFI_USB_HC_RESET_HOST_CONTROLLER
- If this bit is set, the USB host controller hardware will be reset.
+ EFI_USB_HC_RESET_HOST_CONTROLLER
+ If this bit is set, the USB host controller hardware will be reset.
No reset signal will be sent to the USB bus.
-
+
Returns:
- EFI_SUCCESS
+ EFI_SUCCESS
The reset operation succeeded.
- EFI_INVALID_PARAMETER
+ EFI_INVALID_PARAMETER
Attributes is not valid.
- EFI_DEVICE_ERROR
- An error was encountered while attempting to perform
+ EFI_DEVICE_ERROR
+ An error was encountered while attempting to perform
the reset operation.
--*/
{
@@ -736,7 +736,7 @@ UHCIReset ( if (!Match) {
return EFI_INVALID_PARAMETER;
}
-
+
//
// Delete all old transactions on the USB bus
//
@@ -767,33 +767,33 @@ UHCIGetState ( OUT EFI_USB_HC_STATE *State
)
/*++
-
+
Routine Description:
Retrieves current state of the USB host controller.
-
+
Arguments:
-
+
This A pointer to the EFI_USB_HC_PROTOCOL instance.
-
- State A pointer to the EFI_USB_HC_STATE data structure that
- indicates current state of the USB host controller.
+
+ State A pointer to the EFI_USB_HC_STATE data structure that
+ indicates current state of the USB host controller.
Type EFI_USB_HC_STATE is defined below.
-
+
typedef enum {
EfiUsbHcStateHalt,
EfiUsbHcStateOperational,
EfiUsbHcStateSuspend,
EfiUsbHcStateMaximum
} EFI_USB_HC_STATE;
-
+
Returns:
- EFI_SUCCESS
+ EFI_SUCCESS
The state information of the host controller was returned in State.
- EFI_INVALID_PARAMETER
+ EFI_INVALID_PARAMETER
State is NULL.
- EFI_DEVICE_ERROR
- An error was encountered while attempting to retrieve the
- host controller's current state.
+ EFI_DEVICE_ERROR
+ An error was encountered while attempting to retrieve the
+ host controller's current state.
--*/
{
USB_HC_DEV *HcDev;
@@ -853,24 +853,24 @@ UHCISetState ( IN EFI_USB_HC_STATE State
)
/*++
-
+
Routine Description:
Sets the USB host controller to a specific state.
-
+
Arguments:
-
+
This A pointer to the EFI_USB_HC_PROTOCOL instance.
State Indicates the state of the host controller that will be set.
-
+
Returns:
- EFI_SUCCESS
- The USB host controller was successfully placed in the state
+ EFI_SUCCESS
+ The USB host controller was successfully placed in the state
specified by State.
- EFI_INVALID_PARAMETER
+ EFI_INVALID_PARAMETER
State is invalid.
- EFI_DEVICE_ERROR
- Failed to set the state specified by State due to device error.
+ EFI_DEVICE_ERROR
+ Failed to set the state specified by State due to device error.
--*/
{
USB_HC_DEV *HcDev;
@@ -970,7 +970,7 @@ UHCISetState ( if (EFI_ERROR (Status)) {
return EFI_DEVICE_ERROR;
}
-
+
//
// FGR(Force Global Resume) bit is 0
//
@@ -985,7 +985,7 @@ UHCISetState ( Command
);
}
-
+
//
// wait 20ms to let resume complete
// (20ms is specified by UHCI spec)
@@ -1056,24 +1056,24 @@ UHCIGetRootHubPortNumber ( OUT UINT8 *PortNumber
)
/*++
-
+
Routine Description:
Retrieves the number of root hub ports.
-
+
Arguments:
-
+
This A pointer to the EFI_USB_HC_PROTOCOL instance.
-
+
PortNumber A pointer to the number of the root hub ports.
-
+
Returns:
- EFI_SUCCESS
+ EFI_SUCCESS
The port number was retrieved successfully.
- EFI_INVALID_PARAMETER
+ EFI_INVALID_PARAMETER
PortNumber is NULL.
- EFI_DEVICE_ERROR
- An error was encountered while attempting to
- retrieve the port number.
+ EFI_DEVICE_ERROR
+ An error was encountered while attempting to
+ retrieve the port number.
--*/
{
USB_HC_DEV *HcDev;
@@ -1119,29 +1119,29 @@ UHCIGetRootHubPortStatus ( OUT EFI_USB_PORT_STATUS *PortStatus
)
/*++
-
+
Routine Description:
Retrieves the current status of a USB root hub port.
-
+
Arguments:
-
+
This A pointer to the EFI_USB_HC_PROTOCOL.
-
- PortNumber Specifies the root hub port from which the status
- is to be retrieved. This value is zero-based. For example,
+
+ PortNumber Specifies the root hub port from which the status
+ is to be retrieved. This value is zero-based. For example,
if a root hub has two ports, then the first port is numbered 0,
and the second port is numbered 1.
-
- PortStatus A pointer to the current port status bits and
- port status change bits.
-
+
+ PortStatus A pointer to the current port status bits and
+ port status change bits.
+
Returns:
- EFI_SUCCESS
- The status of the USB root hub port specified by PortNumber
+ EFI_SUCCESS
+ The status of the USB root hub port specified by PortNumber
was returned in PortStatus.
- EFI_INVALID_PARAMETER
- PortNumber is invalid.
- EFI_DEVICE_ERROR - Can't read register
+ EFI_INVALID_PARAMETER
+ PortNumber is invalid.
+ EFI_DEVICE_ERROR - Can't read register
--*/
{
USB_HC_DEV *HcDev;
@@ -1180,7 +1180,7 @@ UHCIGetRootHubPortStatus ( //
// Fill Port Status bits
//
-
+
//
// Current Connect Status
//
@@ -1193,21 +1193,21 @@ UHCIGetRootHubPortStatus ( if (RHPortStatus & USBPORTSC_PED) {
PortStatus->PortStatus |= USB_PORT_STAT_ENABLE;
}
-
+
//
// Port Suspend
//
if (RHPortStatus & USBPORTSC_SUSP) {
PortStatus->PortStatus |= USB_PORT_STAT_SUSPEND;
}
-
+
//
// Port Reset
//
if (RHPortStatus & USBPORTSC_PR) {
PortStatus->PortStatus |= USB_PORT_STAT_RESET;
}
-
+
//
// Low Speed Device Attached
//
@@ -1221,14 +1221,14 @@ UHCIGetRootHubPortStatus ( //
// Fill Port Status Change bits
//
-
+
//
// Connect Status Change
//
if (RHPortStatus & USBPORTSC_CSC) {
PortStatus->PortChangeStatus |= USB_PORT_STAT_C_CONNECTION;
}
-
+
//
// Port Enabled/Disabled Change
//
@@ -1247,25 +1247,25 @@ UHCISetRootHubPortFeature ( IN EFI_USB_PORT_FEATURE PortFeature
)
/*++
-
+
Routine Description:
Sets a feature for the specified root hub port.
-
+
Arguments:
-
+
This A pointer to the EFI_USB_HC_PROTOCOL.
-
- PortNumber Specifies the root hub port whose feature
+
+ PortNumber Specifies the root hub port whose feature
is requested to be set.
-
- PortFeature Indicates the feature selector associated
- with the feature set request.
-
+
+ PortFeature Indicates the feature selector associated
+ with the feature set request.
+
Returns:
- EFI_SUCCESS
- The feature specified by PortFeature was set for the
+ EFI_SUCCESS
+ The feature specified by PortFeature was set for the
USB root hub port specified by PortNumber.
- EFI_INVALID_PARAMETER
+ EFI_INVALID_PARAMETER
PortNumber is invalid or PortFeature is invalid.
EFI_DEVICE_ERROR
Can't read register
@@ -1359,25 +1359,25 @@ UHCIClearRootHubPortFeature ( IN EFI_USB_PORT_FEATURE PortFeature
)
/*++
-
+
Routine Description:
Clears a feature for the specified root hub port.
-
+
Arguments:
-
+
This A pointer to the EFI_USB_HC_PROTOCOL instance.
-
- PortNumber Specifies the root hub port whose feature
+
+ PortNumber Specifies the root hub port whose feature
is requested to be cleared.
-
- PortFeature Indicates the feature selector associated with the
+
+ PortFeature Indicates the feature selector associated with the
feature clear request.
-
+
Returns:
- EFI_SUCCESS
- The feature specified by PortFeature was cleared for the
+ EFI_SUCCESS
+ The feature specified by PortFeature was cleared for the
USB root hub port specified by PortNumber.
- EFI_INVALID_PARAMETER
+ EFI_INVALID_PARAMETER
PortNumber is invalid or PortFeature is invalid.
EFI_DEVICE_ERROR
Can't read register
@@ -1501,54 +1501,54 @@ UHCIControlTransfer ( OUT UINT32 *TransferResult
)
/*++
-
+
Routine Description:
Submits control transfer to a target USB device.
-
+
Arguments:
-
+
This A pointer to the EFI_USB_HC_PROTOCOL instance.
DeviceAddress Represents the address of the target device on the USB,
which is assigned during USB enumeration.
- IsSlowDevice Indicates whether the target device is slow device
+ IsSlowDevice Indicates whether the target device is slow device
or full-speed device.
-
- MaximumPacketLength Indicates the maximum packet size that the
- default control transfer endpoint is capable of
+
+ MaximumPacketLength Indicates the maximum packet size that the
+ default control transfer endpoint is capable of
sending or receiving.
-
- Request A pointer to the USB device request that will be sent
- to the USB device.
-
+
+ Request A pointer to the USB device request that will be sent
+ to the USB device.
+
TransferDirection Specifies the data direction for the transfer.
- There are three values available, DataIn, DataOut
+ There are three values available, DataIn, DataOut
and NoData.
-
- Data A pointer to the buffer of data that will be transmitted
+
+ Data A pointer to the buffer of data that will be transmitted
to USB device or received from USB device.
-
- DataLength Indicates the size, in bytes, of the data buffer
+
+ DataLength Indicates the size, in bytes, of the data buffer
specified by Data.
-
- TimeOut Indicates the maximum time, in microseconds,
+
+ TimeOut Indicates the maximum time, in microseconds,
which the transfer is allowed to complete.
-
- TransferResult A pointer to the detailed result information generated
+
+ TransferResult A pointer to the detailed result information generated
by this control transfer.
-
+
Returns:
- EFI_SUCCESS
+ EFI_SUCCESS
The control transfer was completed successfully.
- EFI_OUT_OF_RESOURCES
+ EFI_OUT_OF_RESOURCES
The control transfer could not be completed due to a lack of resources.
- EFI_INVALID_PARAMETER
+ EFI_INVALID_PARAMETER
Some parameters are invalid.
- EFI_TIMEOUT
+ EFI_TIMEOUT
The control transfer failed due to timeout.
- EFI_DEVICE_ERROR
- The control transfer failed due to host controller or device error.
+ EFI_DEVICE_ERROR
+ The control transfer failed due to host controller or device error.
Caller should check TranferResult for detailed error information.
--*/
@@ -1602,7 +1602,7 @@ UHCIControlTransfer ( if (Request == NULL || TransferResult == NULL) {
return EFI_INVALID_PARAMETER;
}
-
+
//
// if errors exist that cause host controller halt,
// then return EFI_DEVICE_ERROR.
@@ -1613,7 +1613,7 @@ UHCIControlTransfer ( *TransferResult = EFI_USB_ERR_SYSTEM;
return EFI_DEVICE_ERROR;
}
-
+
//
// low speed usb devices are limited to only an eight-byte
// maximum data payload size
@@ -1622,7 +1622,7 @@ UHCIControlTransfer ( return EFI_INVALID_PARAMETER;
}
- if (MaximumPacketLength != 8 &&
+ if (MaximumPacketLength != 8 &&
MaximumPacketLength != 16 &&
MaximumPacketLength != 32 &&
MaximumPacketLength != 64) {
@@ -1714,7 +1714,7 @@ UHCIControlTransfer ( HcDev->PciIo->Unmap (HcDev->PciIo, Mapping);
return Status;
}
-
+
//
// map the Request for bus master access.
// BusMasterRead means cpu write
@@ -1756,7 +1756,7 @@ UHCIControlTransfer ( HcDev->PciIo->Unmap (HcDev->PciIo, RequestMapping);
return Status;
}
-
+
//
// Data Stage of Control Transfer
//
@@ -1766,7 +1766,7 @@ UHCIControlTransfer ( //
// create TD structures and link together
//
-
+
//
// PktSize is the data load size that each TD carries.
//
@@ -1798,7 +1798,7 @@ UHCIControlTransfer ( DeleteQueuedTDs (HcDev, PtrFirstDataTD);
return Status;
}
-
+
//
// Link two TDs in vertical depth
//
@@ -1827,7 +1827,7 @@ UHCIControlTransfer ( } else {
PktID = OUTPUT_PACKET_ID;
}
-
+
//
// create Status Stage TD structure
//
@@ -2101,54 +2101,54 @@ UHCIBulkTransfer ( OUT UINT32 *TransferResult
)
/*++
-
+
Routine Description:
Submits bulk transfer to a bulk endpoint of a USB device.
-
+
Arguments:
-
+
This A pointer to the EFI_USB_HC_PROTOCOL instance.
-
+
DeviceAddress Represents the address of the target device on the USB,
which is assigned during USB enumeration.
- EndPointAddress The combination of an endpoint number and an
- endpoint direction of the target USB device.
- Each endpoint address supports data transfer in
- one direction except the control endpoint
- (whose default endpoint address is 0).
- It is the caller's responsibility to make sure that
- the EndPointAddress represents a bulk endpoint.
-
+ EndPointAddress The combination of an endpoint number and an
+ endpoint direction of the target USB device.
+ Each endpoint address supports data transfer in
+ one direction except the control endpoint
+ (whose default endpoint address is 0).
+ It is the caller's responsibility to make sure that
+ the EndPointAddress represents a bulk endpoint.
+
MaximumPacketLength Indicates the maximum packet size the target endpoint
is capable of sending or receiving.
-
- Data A pointer to the buffer of data that will be transmitted
+
+ Data A pointer to the buffer of data that will be transmitted
to USB device or received from USB device.
DataLength When input, indicates the size, in bytes, of the data buffer
- specified by Data. When output, indicates the actually
+ specified by Data. When output, indicates the actually
transferred data size.
-
- DataToggle A pointer to the data toggle value. On input, it indicates
+
+ DataToggle A pointer to the data toggle value. On input, it indicates
the initial data toggle value the bulk transfer should adopt;
- on output, it is updated to indicate the data toggle value
- of the subsequent bulk transfer.
-
- TimeOut Indicates the maximum time, in microseconds, which the
+ on output, it is updated to indicate the data toggle value
+ of the subsequent bulk transfer.
+
+ TimeOut Indicates the maximum time, in microseconds, which the
transfer is allowed to complete.
-
- TransferResult A pointer to the detailed result information of the
+
+ TransferResult A pointer to the detailed result information of the
bulk transfer.
Returns:
- EFI_SUCCESS
+ EFI_SUCCESS
The bulk transfer was completed successfully.
- EFI_OUT_OF_RESOURCES
+ EFI_OUT_OF_RESOURCES
The bulk transfer could not be submitted due to lack of resource.
- EFI_INVALID_PARAMETER
+ EFI_INVALID_PARAMETER
Some parameters are invalid.
- EFI_TIMEOUT
+ EFI_TIMEOUT
The bulk transfer failed due to timeout.
- EFI_DEVICE_ERROR
+ EFI_DEVICE_ERROR
The bulk transfer failed due to host controller or device error.
Caller should check TranferResult for detailed error information.
@@ -2199,13 +2199,13 @@ UHCIBulkTransfer ( //
// Parameters Checking
//
-
+
if ((DataLength == NULL) ||
(Data == NULL) ||
(TransferResult == NULL)) {
return EFI_INVALID_PARAMETER;
}
-
+
//
// if has errors that cause host controller halt,
// then return EFI_DEVICE_ERROR directly.
@@ -2231,7 +2231,7 @@ UHCIBulkTransfer ( MaximumPacketLength != 64) {
return EFI_INVALID_PARAMETER;
}
-
+
//
// Enable the maximum packet size (64bytes)
// that can be used for full speed bandwidth reclamation
@@ -2243,7 +2243,7 @@ UHCIBulkTransfer ( if (EFI_ERROR (Status)) {
return EFI_DEVICE_ERROR;
}
-
+
//
// construct QH and TD data structures,
// and link them together
@@ -2306,7 +2306,7 @@ UHCIBulkTransfer ( default:
return EFI_INVALID_PARAMETER;
}
-
+
//
// create QH structure and init
//
@@ -2315,7 +2315,7 @@ UHCIBulkTransfer ( HcDev->PciIo->Unmap (HcDev->PciIo, Mapping);
return Status;
}
-
+
//
// i is used to calculate the total number of TDs.
//
@@ -2323,11 +2323,11 @@ UHCIBulkTransfer ( IsFirstTD = TRUE;
while (DataLen > 0) {
-
+
//
// create TD structures and link together
//
-
+
PktSize = (UINT8) DataLen;
if (DataLen > MaximumPacketLength) {
PktSize = MaximumPacketLength;
@@ -2351,7 +2351,7 @@ UHCIBulkTransfer ( DeleteQueuedTDs (HcDev, PtrFirstTD);
return Status;
}
-
+
//
// Enable short packet detection.
// (default action is disabling short packet detection)
@@ -2379,7 +2379,7 @@ UHCIBulkTransfer ( Ptr += PktSize;
DataLen -= PktSize;
}
-
+
//
// link TD structures to QH structure
//
@@ -2416,7 +2416,7 @@ UHCIBulkTransfer ( SavedFrameListIndex = LoadFrameListIndex;
for (Index = 0; Index <= LinkTimes; Index++) {
-
+
//
// put the QH-TD directly or indirectly into the proper place
// in the Frame List
@@ -2473,7 +2473,7 @@ UHCIBulkTransfer ( if (Mapping != NULL) {
HcDev->PciIo->Unmap (HcDev->PciIo, Mapping);
}
-
+
//
// if has errors that cause host controller halt,
// then return EFI_DEVICE_ERROR directly.
@@ -2508,68 +2508,68 @@ UHCIAsyncInterruptTransfer ( IN VOID *Context OPTIONAL
)
/*++
-
+
Routine Description:
- Submits an asynchronous interrupt transfer to an
+ Submits an asynchronous interrupt transfer to an
interrupt endpoint of a USB device.
-
+
Arguments:
-
+
This A pointer to the EFI_USB_HC_PROTOCOL instance.
-
+
DeviceAddress Represents the address of the target device on the USB,
which is assigned during USB enumeration.
-
- EndPointAddress The combination of an endpoint number and an endpoint
- direction of the target USB device. Each endpoint address
- supports data transfer in one direction except the
- control endpoint (whose default endpoint address is 0).
- It is the caller's responsibility to make sure that
+
+ EndPointAddress The combination of an endpoint number and an endpoint
+ direction of the target USB device. Each endpoint address
+ supports data transfer in one direction except the
+ control endpoint (whose default endpoint address is 0).
+ It is the caller's responsibility to make sure that
the EndPointAddress represents an interrupt endpoint.
-
- IsSlowDevice Indicates whether the target device is slow device
+
+ IsSlowDevice Indicates whether the target device is slow device
or full-speed device.
-
+
MaximumPacketLength Indicates the maximum packet size the target endpoint
is capable of sending or receiving.
-
+
IsNewTransfer If TRUE, an asynchronous interrupt pipe is built between
- the host and the target interrupt endpoint.
- If FALSE, the specified asynchronous interrupt pipe
+ the host and the target interrupt endpoint.
+ If FALSE, the specified asynchronous interrupt pipe
is canceled.
-
- DataToggle A pointer to the data toggle value. On input, it is valid
- when IsNewTransfer is TRUE, and it indicates the initial
- data toggle value the asynchronous interrupt transfer
- should adopt.
- On output, it is valid when IsNewTransfer is FALSE,
- and it is updated to indicate the data toggle value of
+
+ DataToggle A pointer to the data toggle value. On input, it is valid
+ when IsNewTransfer is TRUE, and it indicates the initial
+ data toggle value the asynchronous interrupt transfer
+ should adopt.
+ On output, it is valid when IsNewTransfer is FALSE,
+ and it is updated to indicate the data toggle value of
the subsequent asynchronous interrupt transfer.
-
- PollingInterval Indicates the interval, in milliseconds, that the
- asynchronous interrupt transfer is polled.
+
+ PollingInterval Indicates the interval, in milliseconds, that the
+ asynchronous interrupt transfer is polled.
This parameter is required when IsNewTransfer is TRUE.
-
- DataLength Indicates the length of data to be received at the
- rate specified by PollingInterval from the target
- asynchronous interrupt endpoint. This parameter
+
+ DataLength Indicates the length of data to be received at the
+ rate specified by PollingInterval from the target
+ asynchronous interrupt endpoint. This parameter
is only required when IsNewTransfer is TRUE.
-
- CallBackFunction The Callback function.This function is called at the
- rate specified by PollingInterval.This parameter is
+
+ CallBackFunction The Callback function.This function is called at the
+ rate specified by PollingInterval.This parameter is
only required when IsNewTransfer is TRUE.
-
+
Context The context that is passed to the CallBackFunction.
This is an optional parameter and may be NULL.
-
+
Returns:
- EFI_SUCCESS
- The asynchronous interrupt transfer request has been successfully
+ EFI_SUCCESS
+ The asynchronous interrupt transfer request has been successfully
submitted or canceled.
- EFI_INVALID_PARAMETER
+ EFI_INVALID_PARAMETER
Some parameters are invalid.
- EFI_OUT_OF_RESOURCES
- The request could not be completed due to a lack of resources.
+ EFI_OUT_OF_RESOURCES
+ The request could not be completed due to a lack of resources.
EFI_DEVICE_ERROR
Can't read register
--*/
@@ -2618,13 +2618,13 @@ UHCIAsyncInterruptTransfer ( if ((EndPointAddress & 0x80) == 0) {
return EFI_INVALID_PARAMETER;
}
-
+
//
// delete Async interrupt transfer request
//
if (!IsNewTransfer) {
- OldTpl = gBS->RaiseTPL (EFI_TPL_NOTIFY);
+ OldTpl = gBS->RaiseTPL (TPL_NOTIFY);
Status = DeleteAsyncINTQHTDs (
HcDev,
@@ -2698,7 +2698,7 @@ UHCIAsyncInterruptTransfer ( //
// create TD structures and link together
//
-
+
PktSize = (UINT8) DataLen;
if (DataLen > MaximumPacketLength) {
PktSize = MaximumPacketLength;
@@ -2745,7 +2745,7 @@ UHCIAsyncInterruptTransfer ( MappedPtr += PktSize;
DataLen -= PktSize;
}
-
+
//
// roll one value back
//
@@ -2774,7 +2774,7 @@ UHCIAsyncInterruptTransfer ( return Status;
}
-
+
//
// link TD structures to QH structure
//
@@ -2827,7 +2827,7 @@ UHCIAsyncInterruptTransfer ( PtrQH = ptrFirstQH;
for (Index = LoadFrameListIndex; Index < (1024 + LoadFrameListIndex);) {
-
+
//
// put the QH-TD directly or indirectly into the proper place
// in the Frame List
@@ -2859,64 +2859,64 @@ UHCISyncInterruptTransfer ( OUT UINT32 *TransferResult
)
/*++
-
+
Routine Description:
- Submits synchronous interrupt transfer to an interrupt endpoint
+ Submits synchronous interrupt transfer to an interrupt endpoint
of a USB device.
-
+
Arguments:
-
+
This A pointer to the EFI_USB_HC_PROTOCOL instance.
-
- DeviceAddress Represents the address of the target device on the USB,
+
+ DeviceAddress Represents the address of the target device on the USB,
which is assigned during USB enumeration.
-
- EndPointAddress The combination of an endpoint number and an endpoint
- direction of the target USB device. Each endpoint
- address supports data transfer in one direction
- except the control endpoint (whose default
+
+ EndPointAddress The combination of an endpoint number and an endpoint
+ direction of the target USB device. Each endpoint
+ address supports data transfer in one direction
+ except the control endpoint (whose default
endpoint address is 0). It is the caller's responsibility
- to make sure that the EndPointAddress represents
- an interrupt endpoint.
-
- IsSlowDevice Indicates whether the target device is slow device
+ to make sure that the EndPointAddress represents
+ an interrupt endpoint.
+
+ IsSlowDevice Indicates whether the target device is slow device
or full-speed device.
-
- MaximumPacketLength Indicates the maximum packet size the target endpoint
+
+ MaximumPacketLength Indicates the maximum packet size the target endpoint
is capable of sending or receiving.
-
- Data A pointer to the buffer of data that will be transmitted
+
+ Data A pointer to the buffer of data that will be transmitted
to USB device or received from USB device.
-
- DataLength On input, the size, in bytes, of the data buffer specified
+
+ DataLength On input, the size, in bytes, of the data buffer specified
by Data. On output, the number of bytes transferred.
-
+
DataToggle A pointer to the data toggle value. On input, it indicates
- the initial data toggle value the synchronous interrupt
- transfer should adopt;
- on output, it is updated to indicate the data toggle value
- of the subsequent synchronous interrupt transfer.
-
- TimeOut Indicates the maximum time, in microseconds, which the
+ the initial data toggle value the synchronous interrupt
+ transfer should adopt;
+ on output, it is updated to indicate the data toggle value
+ of the subsequent synchronous interrupt transfer.
+
+ TimeOut Indicates the maximum time, in microseconds, which the
transfer is allowed to complete.
-
- TransferResult A pointer to the detailed result information from
- the synchronous interrupt transfer.
+
+ TransferResult A pointer to the detailed result information from
+ the synchronous interrupt transfer.
Returns:
- EFI_SUCCESS
+ EFI_SUCCESS
The synchronous interrupt transfer was completed successfully.
- EFI_OUT_OF_RESOURCES
- The synchronous interrupt transfer could not be submitted due
+ EFI_OUT_OF_RESOURCES
+ The synchronous interrupt transfer could not be submitted due
to lack of resource.
- EFI_INVALID_PARAMETER
+ EFI_INVALID_PARAMETER
Some parameters are invalid.
- EFI_TIMEOUT
+ EFI_TIMEOUT
The synchronous interrupt transfer failed due to timeout.
- EFI_DEVICE_ERROR
- The synchronous interrupt transfer failed due to host controller
- or device error. Caller should check TranferResult for detailed
- error information.
+ EFI_DEVICE_ERROR
+ The synchronous interrupt transfer failed due to host controller
+ or device error. Caller should check TranferResult for detailed
+ error information.
--*/
{
USB_HC_DEV *HcDev;
@@ -2958,13 +2958,13 @@ UHCISyncInterruptTransfer ( //
// Parameters Checking
//
-
+
if ((DataLength == NULL) ||
(Data == NULL) ||
(TransferResult == NULL)) {
return EFI_INVALID_PARAMETER;
}
-
+
//
// if has errors that cause host controller halt,
// then return EFI_DEVICE_ERROR directly.
@@ -3017,7 +3017,7 @@ UHCISyncInterruptTransfer ( if (EFI_ERROR (Status)) {
return Status;
}
-
+
//
// BusMasterWrite means cpu read
//
@@ -3089,7 +3089,7 @@ UHCISyncInterruptTransfer ( Ptr += PktSize;
DataLen -= PktSize;
}
-
+
//
// link TD structures to QH structure
//
@@ -3119,7 +3119,7 @@ UHCISyncInterruptTransfer ( SavedFrameListIndex = LoadFrameListIndex;
for (Index = 0; Index < LinkTimes; Index++) {
-
+
//
// put the QH-TD directly or indirectly into the proper place
// in the Frame List
@@ -3200,27 +3200,27 @@ UHCIIsochronousTransfer ( OUT UINT32 *TransferResult
)
/*++
-
+
Routine Description:
Submits isochronous transfer to a target USB device.
-
+
Arguments:
-
+
This - A pointer to the EFI_USB_HC_PROTOCOL instance.
DeviceAddress - Represents the address of the target device on the USB,
which is assigned during USB enumeration.
EndPointAddress - End point address
- MaximumPacketLength - Indicates the maximum packet size that the
- default control transfer endpoint is capable of
+ MaximumPacketLength - Indicates the maximum packet size that the
+ default control transfer endpoint is capable of
sending or receiving.
- Data - A pointer to the buffer of data that will be transmitted
+ Data - A pointer to the buffer of data that will be transmitted
to USB device or received from USB device.
- DataLength - Indicates the size, in bytes, of the data buffer
+ DataLength - Indicates the size, in bytes, of the data buffer
specified by Data.
- TransferResult - A pointer to the detailed result information generated
- by this control transfer.
+ TransferResult - A pointer to the detailed result information generated
+ by this control transfer.
Returns:
- EFI_UNSUPPORTED
+ EFI_UNSUPPORTED
--*/
{
@@ -3241,32 +3241,32 @@ UHCIAsyncIsochronousTransfer ( IN VOID *Context OPTIONAL
)
/*++
-
+
Routine Description:
Submits Async isochronous transfer to a target USB device.
-
+
Arguments:
-
+
This - A pointer to the EFI_USB_HC_PROTOCOL instance.
-
+
DeviceAddress - Represents the address of the target device on the USB,
which is assigned during USB enumeration.
EndPointAddress - End point address
-
- MaximumPacketLength - Indicates the maximum packet size that the
- default control transfer endpoint is capable of
+
+ MaximumPacketLength - Indicates the maximum packet size that the
+ default control transfer endpoint is capable of
sending or receiving.
-
- Data - A pointer to the buffer of data that will be transmitted
+
+ Data - A pointer to the buffer of data that will be transmitted
to USB device or received from USB device.
-
+
IsochronousCallBack - When the transfer complete, the call back function will be called
-
+
Context - Pass to the call back function as parameter
-
+
Returns:
- EFI_UNSUPPORTED
+ EFI_UNSUPPORTED
--*/
{
@@ -3291,34 +3291,34 @@ UHCI2GetCapability( Arguments:
This - A pointer to the EFI_USB2_HC_PROTOCOL instance.
-
+
MaxSpeed - A pointer to the max speed USB host controller supports.
-
+
PortNumber - A pointer to the number of root hub ports.
-
+
Is64BitCapable - A pointer to an integer to show whether USB host controller
supports 64-bit memory addressing.
Returns:
- EFI_SUCCESS
+ EFI_SUCCESS
The host controller capabilities were retrieved successfully.
- EFI_INVALID_PARAMETER
+ EFI_INVALID_PARAMETER
MaxSpeed or PortNumber or Is64BitCapable is NULL.
- EFI_DEVICE_ERROR
+ EFI_DEVICE_ERROR
An error was encountered while attempting to retrieve the capabilities.
-
---*/
+
+--*/
{
USB_HC_DEV *HcDev;
HcDev = USB2_HC_DEV_FROM_THIS (This);
-
- if ((NULL == MaxSpeed)
+
+ if ((NULL == MaxSpeed)
||(NULL == PortNumber)
|| (NULL == Is64BitCapable))
{
return EFI_INVALID_PARAMETER;
}
-
+
*MaxSpeed = EFI_USB_SPEED_FULL;
*Is64BitCapable = (UINT8)FALSE;
return UHCIGetRootHubPortNumber(&HcDev->UsbHc, PortNumber);
@@ -3337,46 +3337,46 @@ UHCI2Reset ( Arguments:
This - A pointer to the EFI_USB2_HC_PROTOCOL instance.
-
- Attributes - A bit mask of the reset operation to perform.
+
+ Attributes - A bit mask of the reset operation to perform.
See below for a list of the supported bit mask values.
-
+
#define EFI_USB_HC_RESET_GLOBAL 0x0001
#define EFI_USB_HC_RESET_HOST_CONTROLLER 0x0002
#define EFI_USB_HC_RESET_GLOBAL _WITH_DEBUG 0x0004
#define EFI_USB_HC_RESET_HOST_WITH_DEBUG 0x0008
- EFI_USB_HC_RESET_GLOBAL
+ EFI_USB_HC_RESET_GLOBAL
If this bit is set, a global reset signal will be sent to the USB bus.
- This resets all of the USB bus logic, including the USB host
+ This resets all of the USB bus logic, including the USB host
controller hardware and all the devices attached on the USB bus.
- EFI_USB_HC_RESET_HOST_CONTROLLER
- If this bit is set, the USB host controller hardware will be reset.
+ EFI_USB_HC_RESET_HOST_CONTROLLER
+ If this bit is set, the USB host controller hardware will be reset.
No reset signal will be sent to the USB bus.
-
+
Returns:
- EFI_SUCCESS
+ EFI_SUCCESS
The reset operation succeeded.
- EFI_INVALID_PARAMETER
+ EFI_INVALID_PARAMETER
Attributes is not valid.
EFI_UNSUPPORTED
The type of reset specified by Attributes is not currently supported by the host controller hardware.
EFI_ACCESS_DENIED
Reset operation is rejected due to the debug port being configured and active.
- EFI_DEVICE_ERROR
- An error was encountered while attempting to perform
+ EFI_DEVICE_ERROR
+ An error was encountered while attempting to perform
the reset operation.
--*/
{
USB_HC_DEV *HcDev;
HcDev = USB2_HC_DEV_FROM_THIS (This);
-
+
if (Attributes==EFI_USB_HC_RESET_GLOBAL_WITH_DEBUG || Attributes==EFI_USB_HC_RESET_HOST_WITH_DEBUG)
return EFI_UNSUPPORTED;
-
+
return UHCIReset(
- &HcDev->UsbHc,
+ &HcDev->UsbHc,
Attributes
);
}
@@ -3388,40 +3388,40 @@ UHCI2GetState ( OUT EFI_USB_HC_STATE * State
)
/*++
-
+
Routine Description:
Retrieves current state of the USB host controller according to UEFI 2.0 spec.
-
+
Arguments:
-
+
This - A pointer to the EFI_USB_HC_PROTOCOL instance.
-
- State - A pointer to the EFI_USB_HC_STATE data structure that
- indicates current state of the USB host controller.
+
+ State - A pointer to the EFI_USB_HC_STATE data structure that
+ indicates current state of the USB host controller.
Type EFI_USB_HC_STATE is defined below.
-
+
typedef enum {
EfiUsbHcStateHalt,
EfiUsbHcStateOperational,
EfiUsbHcStateSuspend,
EfiUsbHcStateMaximum
} EFI_USB_HC_STATE;
-
+
Returns:
- EFI_SUCCESS
+ EFI_SUCCESS
The state information of the host controller was returned in State.
- EFI_INVALID_PARAMETER
+ EFI_INVALID_PARAMETER
State is NULL.
- EFI_DEVICE_ERROR
- An error was encountered while attempting to retrieve the
- host controller's current state.
---*/
+ EFI_DEVICE_ERROR
+ An error was encountered while attempting to retrieve the
+ host controller's current state.
+--*/
{
USB_HC_DEV *HcDev;
HcDev = USB2_HC_DEV_FROM_THIS (This);
return UHCIGetState(
- &HcDev->UsbHc,
+ &HcDev->UsbHc,
State
);
}
@@ -3433,31 +3433,31 @@ UHCI2SetState ( IN EFI_USB_HC_STATE State
)
/*++
-
+
Routine Description:
Sets the USB host controller to a specific state according to UEFI 2.0 spec.
-
+
Arguments:
-
+
This - A pointer to the EFI_USB_HC_PROTOCOL instance.
State - Indicates the state of the host controller that will be set.
-
+
Returns:
- EFI_SUCCESS
- The USB host controller was successfully placed in the state
+ EFI_SUCCESS
+ The USB host controller was successfully placed in the state
specified by State.
- EFI_INVALID_PARAMETER
+ EFI_INVALID_PARAMETER
State is invalid.
- EFI_DEVICE_ERROR
- Failed to set the state specified by State due to device error.
+ EFI_DEVICE_ERROR
+ Failed to set the state specified by State due to device error.
--*/
{
USB_HC_DEV *HcDev;
HcDev = USB2_HC_DEV_FROM_THIS (This);
return UHCISetState(
- &HcDev->UsbHc,
+ &HcDev->UsbHc,
State
);
}
@@ -3478,53 +3478,53 @@ UHCI2ControlTransfer ( OUT UINT32 *TransferResult
)
/*++
-
+
Routine Description:
Submits control transfer to a target USB device accroding to UEFI 2.0 spec..
-
+
Arguments:
-
+
This - A pointer to the EFI_USB_HC_PROTOCOL instance.
DeviceAddress -Represents the address of the target device on the USB,
which is assigned during USB enumeration.
DeviceSpeed - Indicates transfer speed of device.
-
- MaximumPacketLength - Indicates the maximum packet size that the
- default control transfer endpoint is capable of
+
+ MaximumPacketLength - Indicates the maximum packet size that the
+ default control transfer endpoint is capable of
sending or receiving.
-
- Request - A pointer to the USB device request that will be sent
- to the USB device.
-
+
+ Request - A pointer to the USB device request that will be sent
+ to the USB device.
+
TransferDirection - Specifies the data direction for the transfer.
- There are three values available, DataIn, DataOut
+ There are three values available, DataIn, DataOut
and NoData.
-
- Data -A pointer to the buffer of data that will be transmitted
+
+ Data -A pointer to the buffer of data that will be transmitted
to USB device or received from USB device.
-
- DataLength - Indicates the size, in bytes, of the data buffer
+
+ DataLength - Indicates the size, in bytes, of the data buffer
specified by Data.
-
- TimeOut - Indicates the maximum time, in microseconds,
+
+ TimeOut - Indicates the maximum time, in microseconds,
which the transfer is allowed to complete.
-
- TransferResult - A pointer to the detailed result information generated
+
+ TransferResult - A pointer to the detailed result information generated
by this control transfer.
-
+
Returns:
- EFI_SUCCESS
+ EFI_SUCCESS
The control transfer was completed successfully.
- EFI_OUT_OF_RESOURCES
+ EFI_OUT_OF_RESOURCES
The control transfer could not be completed due to a lack of resources.
- EFI_INVALID_PARAMETER
+ EFI_INVALID_PARAMETER
Some parameters are invalid.
- EFI_TIMEOUT
+ EFI_TIMEOUT
The control transfer failed due to timeout.
- EFI_DEVICE_ERROR
- The control transfer failed due to host controller or device error.
+ EFI_DEVICE_ERROR
+ The control transfer failed due to host controller or device error.
Caller should check TranferResult for detailed error information.
--*/
@@ -3533,19 +3533,19 @@ UHCI2ControlTransfer ( BOOLEAN IsSlowDevice = (BOOLEAN) ((EFI_USB_SPEED_LOW == DeviceSpeed) ? TRUE : FALSE);
HcDev = USB2_HC_DEV_FROM_THIS (This);
-
+
return UHCIControlTransfer(
- &HcDev->UsbHc,
- DeviceAddress,
- IsSlowDevice,
- (UINT8) MaximumPacketLength,
- Request,
- TransferDirection,
- Data,
+ &HcDev->UsbHc,
+ DeviceAddress,
+ IsSlowDevice,
+ (UINT8) MaximumPacketLength,
+ Request,
+ TransferDirection,
+ Data,
DataLength,
TimeOut,
TransferResult
- );
+ );
}
EFI_STATUS
@@ -3563,91 +3563,91 @@ UHCI2BulkTransfer ( IN UINTN TimeOut,
IN EFI_USB2_HC_TRANSACTION_TRANSLATOR *Translator,
OUT UINT32 *TransferResult
- )
+ )
/*++
-
+
Routine Description:
Submits bulk transfer to a bulk endpoint of a USB device according to UEFI 2.0 spec.
-
+
Arguments:
-
+
This A pointer to the EFI_USB2_HC_PROTOCOL instance.
-
+
DeviceAddress Represents the address of the target device on the USB,
which is assigned during USB enumeration.
-
- EndPointAddress The combination of an endpoint number and an
- endpoint direction of the target USB device.
- Each endpoint address supports data transfer in
- one direction except the control endpoint
- (whose default endpoint address is 0).
- It is the caller's responsibility to make sure that
- the EndPointAddress represents a bulk endpoint.
-
+
+ EndPointAddress The combination of an endpoint number and an
+ endpoint direction of the target USB device.
+ Each endpoint address supports data transfer in
+ one direction except the control endpoint
+ (whose default endpoint address is 0).
+ It is the caller's responsibility to make sure that
+ the EndPointAddress represents a bulk endpoint.
+
DeviceSpeed Indicates device speed. The supported values are EFI_USB_SPEED_FULL
and EFI_USB_SPEED_HIGH.
-
+
MaximumPacketLength Indicates the maximum packet size the target endpoint
is capable of sending or receiving.
-
+
DataBuffersNumber Number of data buffers prepared for the transfer.
-
- Data Array of pointers to the buffers of data that will be transmitted
+
+ Data Array of pointers to the buffers of data that will be transmitted
to USB device or received from USB device.
-
+
DataLength When input, indicates the size, in bytes, of the data buffer
- specified by Data. When output, indicates the actually
+ specified by Data. When output, indicates the actually
transferred data size.
-
- DataToggle A pointer to the data toggle value. On input, it indicates
+
+ DataToggle A pointer to the data toggle value. On input, it indicates
the initial data toggle value the bulk transfer should adopt;
- on output, it is updated to indicate the data toggle value
- of the subsequent bulk transfer.
-
+ on output, it is updated to indicate the data toggle value
+ of the subsequent bulk transfer.
+
Translator A pointr to the transaction translator data.
-
- TimeOut Indicates the maximum time, in microseconds, which the
+
+ TimeOut Indicates the maximum time, in microseconds, which the
transfer is allowed to complete.
-
- TransferResult A pointer to the detailed result information of the
+
+ TransferResult A pointer to the detailed result information of the
bulk transfer.
Returns:
- EFI_SUCCESS
+ EFI_SUCCESS
The bulk transfer was completed successfully.
-
- EFI_OUT_OF_RESOURCES
+
+ EFI_OUT_OF_RESOURCES
The bulk transfer could not be submitted due to lack of resource.
-
- EFI_INVALID_PARAMETER
+
+ EFI_INVALID_PARAMETER
Some parameters are invalid.
-
- EFI_TIMEOUT
+
+ EFI_TIMEOUT
The bulk transfer failed due to timeout.
-
- EFI_DEVICE_ERROR
+
+ EFI_DEVICE_ERROR
The bulk transfer failed due to host controller or device error.
Caller should check TranferResult for detailed error information.
---*/
+--*/
{
USB_HC_DEV *HcDev;
HcDev = USB2_HC_DEV_FROM_THIS (This);
-
+
if( Data == NULL || DeviceSpeed==EFI_USB_SPEED_LOW)
return EFI_INVALID_PARAMETER;
/* For full-speed bulk transfers only the data pointed by Data[0] shall be used */
return UHCIBulkTransfer (
- &HcDev->UsbHc,
- DeviceAddress,
- EndPointAddress,
- (UINT8) MaximumPacketLength,
- *Data,
- DataLength,
- DataToggle,
- TimeOut,
+ &HcDev->UsbHc,
+ DeviceAddress,
+ EndPointAddress,
+ (UINT8) MaximumPacketLength,
+ *Data,
+ DataLength,
+ DataToggle,
+ TimeOut,
TransferResult
);
}
@@ -3669,91 +3669,91 @@ UHCI2AsyncInterruptTransfer ( IN VOID *Context
)
/*++
-
+
Routine Description:
- Submits an asynchronous interrupt transfer to an
+ Submits an asynchronous interrupt transfer to an
interrupt endpoint of a USB device according to UEFI 2.0 spec.
-
+
Arguments:
-
+
This A pointer to the EFI_USB2_HC_PROTOCOL instance.
-
+
DeviceAddress Represents the address of the target device on the USB,
which is assigned during USB enumeration.
-
- EndPointAddress The combination of an endpoint number and an endpoint
- direction of the target USB device. Each endpoint address
- supports data transfer in one direction except the
- control endpoint (whose default endpoint address is 0).
- It is the caller's responsibility to make sure that
+
+ EndPointAddress The combination of an endpoint number and an endpoint
+ direction of the target USB device. Each endpoint address
+ supports data transfer in one direction except the
+ control endpoint (whose default endpoint address is 0).
+ It is the caller's responsibility to make sure that
the EndPointAddress represents an interrupt endpoint.
-
+
DeviceSpeed Indicates device speed.
-
+
MaximumPacketLength Indicates the maximum packet size the target endpoint
is capable of sending or receiving.
-
+
IsNewTransfer If TRUE, an asynchronous interrupt pipe is built between
- the host and the target interrupt endpoint.
- If FALSE, the specified asynchronous interrupt pipe
+ the host and the target interrupt endpoint.
+ If FALSE, the specified asynchronous interrupt pipe
is canceled.
-
- DataToggle A pointer to the data toggle value. On input, it is valid
- when IsNewTransfer is TRUE, and it indicates the initial
- data toggle value the asynchronous interrupt transfer
- should adopt.
- On output, it is valid when IsNewTransfer is FALSE,
- and it is updated to indicate the data toggle value of
+
+ DataToggle A pointer to the data toggle value. On input, it is valid
+ when IsNewTransfer is TRUE, and it indicates the initial
+ data toggle value the asynchronous interrupt transfer
+ should adopt.
+ On output, it is valid when IsNewTransfer is FALSE,
+ and it is updated to indicate the data toggle value of
the subsequent asynchronous interrupt transfer.
-
- PollingInterval Indicates the interval, in milliseconds, that the
- asynchronous interrupt transfer is polled.
+
+ PollingInterval Indicates the interval, in milliseconds, that the
+ asynchronous interrupt transfer is polled.
This parameter is required when IsNewTransfer is TRUE.
-
- DataLength Indicates the length of data to be received at the
- rate specified by PollingInterval from the target
- asynchronous interrupt endpoint. This parameter
+
+ DataLength Indicates the length of data to be received at the
+ rate specified by PollingInterval from the target
+ asynchronous interrupt endpoint. This parameter
is only required when IsNewTransfer is TRUE.
-
+
Translator A pointr to the transaction translator data.
-
- CallBackFunction The Callback function.This function is called at the
- rate specified by PollingInterval.This parameter is
+
+ CallBackFunction The Callback function.This function is called at the
+ rate specified by PollingInterval.This parameter is
only required when IsNewTransfer is TRUE.
-
+
Context The context that is passed to the CallBackFunction.
This is an optional parameter and may be NULL.
-
+
Returns:
-
- EFI_SUCCESS
- The asynchronous interrupt transfer request has been successfully
+
+ EFI_SUCCESS
+ The asynchronous interrupt transfer request has been successfully
submitted or canceled.
-
- EFI_INVALID_PARAMETER
+
+ EFI_INVALID_PARAMETER
Some parameters are invalid.
-
- EFI_OUT_OF_RESOURCES
- The request could not be completed due to a lack of resources.
-
+
+ EFI_OUT_OF_RESOURCES
+ The request could not be completed due to a lack of resources.
+
EFI_DEVICE_ERROR
Can't read register
---*/
+--*/
{
USB_HC_DEV *HcDev;
BOOLEAN IsSlowDevice = (BOOLEAN) ((EFI_USB_SPEED_LOW == DeviceSpeed) ? TRUE : FALSE);
-
+
HcDev = USB2_HC_DEV_FROM_THIS (This);
return UHCIAsyncInterruptTransfer(
- &HcDev->UsbHc,
- DeviceAddress,
- EndPointAddress,
- IsSlowDevice,
- (UINT8) MaximumPacketLength,
- IsNewTransfer,
- DataToggle,
+ &HcDev->UsbHc,
+ DeviceAddress,
+ EndPointAddress,
+ IsSlowDevice,
+ (UINT8) MaximumPacketLength,
+ IsNewTransfer,
+ DataToggle,
PollingInterval,
- DataLength,
+ DataLength,
CallBackFunction,
Context
);
@@ -3775,82 +3775,82 @@ UHCI2SyncInterruptTransfer ( OUT UINT32 *TransferResult
)
/*++
-
+
Routine Description:
- Submits synchronous interrupt transfer to an interrupt endpoint
+ Submits synchronous interrupt transfer to an interrupt endpoint
of a USB device according to UEFI 2.0 spec.
-
+
Arguments:
-
+
This A pointer to the EFI_USB2_HC_PROTOCOL instance.
-
- DeviceAddress Represents the address of the target device on the USB,
+
+ DeviceAddress Represents the address of the target device on the USB,
which is assigned during USB enumeration.
-
- EndPointAddress The combination of an endpoint number and an endpoint
- direction of the target USB device. Each endpoint
- address supports data transfer in one direction
- except the control endpoint (whose default
+
+ EndPointAddress The combination of an endpoint number and an endpoint
+ direction of the target USB device. Each endpoint
+ address supports data transfer in one direction
+ except the control endpoint (whose default
endpoint address is 0). It is the caller's responsibility
- to make sure that the EndPointAddress represents
- an interrupt endpoint.
-
+ to make sure that the EndPointAddress represents
+ an interrupt endpoint.
+
DeviceSpeed Indicates device speed.
-
- MaximumPacketLength Indicates the maximum packet size the target endpoint
+
+ MaximumPacketLength Indicates the maximum packet size the target endpoint
is capable of sending or receiving.
-
- Data A pointer to the buffer of data that will be transmitted
+
+ Data A pointer to the buffer of data that will be transmitted
to USB device or received from USB device.
-
- DataLength On input, the size, in bytes, of the data buffer specified
+
+ DataLength On input, the size, in bytes, of the data buffer specified
by Data. On output, the number of bytes transferred.
-
+
DataToggle A pointer to the data toggle value. On input, it indicates
- the initial data toggle value the synchronous interrupt
- transfer should adopt;
- on output, it is updated to indicate the data toggle value
- of the subsequent synchronous interrupt transfer.
-
- TimeOut Indicates the maximum time, in microseconds, which the
+ the initial data toggle value the synchronous interrupt
+ transfer should adopt;
+ on output, it is updated to indicate the data toggle value
+ of the subsequent synchronous interrupt transfer.
+
+ TimeOut Indicates the maximum time, in microseconds, which the
transfer is allowed to complete.
Translator A pointr to the transaction translator data.
- TransferResult A pointer to the detailed result information from
- the synchronous interrupt transfer.
+ TransferResult A pointer to the detailed result information from
+ the synchronous interrupt transfer.
Returns:
- EFI_SUCCESS
+ EFI_SUCCESS
The synchronous interrupt transfer was completed successfully.
- EFI_OUT_OF_RESOURCES
- The synchronous interrupt transfer could not be submitted due
+ EFI_OUT_OF_RESOURCES
+ The synchronous interrupt transfer could not be submitted due
to lack of resource.
- EFI_INVALID_PARAMETER
+ EFI_INVALID_PARAMETER
Some parameters are invalid.
- EFI_TIMEOUT
+ EFI_TIMEOUT
The synchronous interrupt transfer failed due to timeout.
- EFI_DEVICE_ERROR
- The synchronous interrupt transfer failed due to host controller
- or device error. Caller should check TranferResult for detailed
- error information.
---*/
+ EFI_DEVICE_ERROR
+ The synchronous interrupt transfer failed due to host controller
+ or device error. Caller should check TranferResult for detailed
+ error information.
+--*/
{
USB_HC_DEV *HcDev;
BOOLEAN IsSlowDevice;
-
+
if(DeviceSpeed==EFI_USB_SPEED_HIGH)
return EFI_INVALID_PARAMETER;
-
- IsSlowDevice = (BOOLEAN) ((EFI_USB_SPEED_LOW == DeviceSpeed) ? TRUE : FALSE);
+
+ IsSlowDevice = (BOOLEAN) ((EFI_USB_SPEED_LOW == DeviceSpeed) ? TRUE : FALSE);
HcDev = USB2_HC_DEV_FROM_THIS (This);
-
+
return UHCISyncInterruptTransfer(
- &HcDev->UsbHc,
- DeviceAddress,
- EndPointAddress,
- IsSlowDevice,
- (UINT8) MaximumPacketLength,
- Data,
- DataLength,
+ &HcDev->UsbHc,
+ DeviceAddress,
+ EndPointAddress,
+ IsSlowDevice,
+ (UINT8) MaximumPacketLength,
+ Data,
+ DataLength,
DataToggle,
TimeOut,
TransferResult
@@ -3872,43 +3872,43 @@ UHCI2IsochronousTransfer ( OUT UINT32 *TransferResult
)
/*++
-
+
Routine Description:
-
+
Submits isochronous transfer to a target USB device according to UEFI 2.0 spec.
-
+
Arguments:
-
+
This A pointer to the EFI_USB2_HC_PROTOCOL instance.
-
+
DeviceAddress Represents the address of the target device on the USB,
which is assigned during USB enumeration.
-
+
EndPointAddress End point address
-
+
DeviceSpeed Indicates device speed.
-
- MaximumPacketLength Indicates the maximum packet size that the
- default control transfer endpoint is capable of
+
+ MaximumPacketLength Indicates the maximum packet size that the
+ default control transfer endpoint is capable of
sending or receiving.
-
+
DataBuffersNumber Number of data buffers prepared for the transfer.
-
- Data Array of pointers to the buffers of data that will be
+
+ Data Array of pointers to the buffers of data that will be
transmitted to USB device or received from USB device.
-
- DataLength Indicates the size, in bytes, of the data buffer
+
+ DataLength Indicates the size, in bytes, of the data buffer
specified by Data.
-
+
Translator A pointr to the transaction translator data.
-
- TransferResult A pointer to the detailed result information generated
- by this control transfer.
+
+ TransferResult A pointer to the detailed result information generated
+ by this control transfer.
Returns:
-
- EFI_UNSUPPORTED
---*/
+ EFI_UNSUPPORTED
+
+--*/
{
return EFI_UNSUPPORTED;
}
@@ -3929,42 +3929,42 @@ UHCI2AsyncIsochronousTransfer ( IN VOID *Context
)
/*++
-
+
Routine Description:
-
+
Submits Async isochronous transfer to a target USB device according to UEFI 2.0 spec.
-
+
Arguments:
-
+
This A pointer to the EFI_USB2_HC_PROTOCOL instance.
-
+
DeviceAddress Represents the address of the target device on the USB,
which is assigned during USB enumeration.
EndPointAddress End point address
-
+
DeviceSpeed Indicates device speed.
-
- MaximumPacketLength Indicates the maximum packet size that the
- default control transfer endpoint is capable of
+
+ MaximumPacketLength Indicates the maximum packet size that the
+ default control transfer endpoint is capable of
sending or receiving.
-
+
DataBuffersNumber Number of data buffers prepared for the transfer.
-
- Data Array of pointers to the buffers of data that will be transmitted
+
+ Data Array of pointers to the buffers of data that will be transmitted
to USB device or received from USB device.
-
+
Translator A pointr to the transaction translator data.
-
+
IsochronousCallBack When the transfer complete, the call back function will be called
-
+
Context Pass to the call back function as parameter
-
+
Returns:
-
- EFI_UNSUPPORTED
---*/
+ EFI_UNSUPPORTED
+
+--*/
{
return EFI_UNSUPPORTED;
}
@@ -3977,38 +3977,38 @@ UHCI2GetRootHubPortStatus ( OUT EFI_USB_PORT_STATUS * PortStatus
)
/*++
-
+
Routine Description:
Retrieves the current status of a USB root hub port according to UEFI 2.0 spec.
-
+
Arguments:
-
+
This A pointer to the EFI_USB2_HC_PROTOCOL.
-
- PortNumber Specifies the root hub port from which the status
- is to be retrieved. This value is zero-based. For example,
+
+ PortNumber Specifies the root hub port from which the status
+ is to be retrieved. This value is zero-based. For example,
if a root hub has two ports, then the first port is numbered 0,
and the second port is numbered 1.
-
- PortStatus A pointer to the current port status bits and
- port status change bits.
-
+
+ PortStatus A pointer to the current port status bits and
+ port status change bits.
+
Returns:
- EFI_SUCCESS
- The status of the USB root hub port specified by PortNumber
+ EFI_SUCCESS
+ The status of the USB root hub port specified by PortNumber
was returned in PortStatus.
- EFI_INVALID_PARAMETER
- PortNumber is invalid.
- EFI_DEVICE_ERROR - Can't read register
---*/
+ EFI_INVALID_PARAMETER
+ PortNumber is invalid.
+ EFI_DEVICE_ERROR - Can't read register
+--*/
{
USB_HC_DEV *HcDev;
HcDev = USB2_HC_DEV_FROM_THIS (This);
-
+
return UHCIGetRootHubPortStatus(
- &HcDev->UsbHc,
- PortNumber,
+ &HcDev->UsbHc,
+ PortNumber,
PortStatus
);
}
@@ -4021,36 +4021,36 @@ UHCI2SetRootHubPortFeature ( IN EFI_USB_PORT_FEATURE PortFeature
)
/*++
-
+
Routine Description:
Sets a feature for the specified root hub port according to UEFI 2.0 spec.
-
+
Arguments:
-
+
This A pointer to the EFI_USB2_HC_PROTOCOL.
-
- PortNumber Specifies the root hub port whose feature
+
+ PortNumber Specifies the root hub port whose feature
is requested to be set.
-
- PortFeature Indicates the feature selector associated
- with the feature set request.
-
+
+ PortFeature Indicates the feature selector associated
+ with the feature set request.
+
Returns:
- EFI_SUCCESS
- The feature specified by PortFeature was set for the
+ EFI_SUCCESS
+ The feature specified by PortFeature was set for the
USB root hub port specified by PortNumber.
- EFI_INVALID_PARAMETER
+ EFI_INVALID_PARAMETER
PortNumber is invalid or PortFeature is invalid.
EFI_DEVICE_ERROR
Can't read register
---*/
+--*/
{
USB_HC_DEV *HcDev;
HcDev = USB2_HC_DEV_FROM_THIS (This);
return UHCISetRootHubPortFeature(
- &HcDev->UsbHc,
- PortNumber,
+ &HcDev->UsbHc,
+ PortNumber,
PortFeature
);
}
@@ -4063,36 +4063,36 @@ UHCI2ClearRootHubPortFeature ( IN EFI_USB_PORT_FEATURE PortFeature
)
/*++
-
+
Routine Description:
Clears a feature for the specified root hub port according to Uefi 2.0 spec.
-
+
Arguments:
-
+
This A pointer to the EFI_USB2_HC_PROTOCOL instance.
-
- PortNumber Specifies the root hub port whose feature
+
+ PortNumber Specifies the root hub port whose feature
is requested to be cleared.
-
- PortFeature Indicates the feature selector associated with the
+
+ PortFeature Indicates the feature selector associated with the
feature clear request.
-
+
Returns:
- EFI_SUCCESS
- The feature specified by PortFeature was cleared for the
+ EFI_SUCCESS
+ The feature specified by PortFeature was cleared for the
USB root hub port specified by PortNumber.
- EFI_INVALID_PARAMETER
+ EFI_INVALID_PARAMETER
PortNumber is invalid or PortFeature is invalid.
EFI_DEVICE_ERROR
Can't read register
---*/
+--*/
{
USB_HC_DEV *HcDev;
HcDev = USB2_HC_DEV_FROM_THIS (This);
return UHCIClearRootHubPortFeature(
- &HcDev->UsbHc,
- PortNumber,
+ &HcDev->UsbHc,
+ PortNumber,
PortFeature
);
}
@@ -4111,7 +4111,7 @@ MonitorInterruptTrans ( Contex - Pointer to USB_HC_DEV
Returns:
None
---*/
+--*/
{
USB_HC_DEV *HcDev;
@@ -4199,7 +4199,7 @@ MonitorInterruptTrans ( if (DataBuffer) {
gBS->FreePool (DataBuffer);
}
-
+
//
// update should done after data buffer got.
//
diff --git a/EdkModulePkg/Bus/Pci/Undi/RuntimeDxe/Init.c b/EdkModulePkg/Bus/Pci/Undi/RuntimeDxe/Init.c index 89d7a1f..a32c62a 100644 --- a/EdkModulePkg/Bus/Pci/Undi/RuntimeDxe/Init.c +++ b/EdkModulePkg/Bus/Pci/Undi/RuntimeDxe/Init.c @@ -1,13 +1,13 @@ /*++
-Copyright (c) 2006 - 2007, Intel Corporation
-All rights reserved. This program and the accompanying materials
-are licensed and made available under the terms and conditions of the BSD License
-which accompanies this distribution. The full text of the license may be found at
-http://opensource.org/licenses/bsd-license.php
-
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+Copyright (c) 2006 - 2007, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
Module Name:
@@ -30,7 +30,7 @@ PXE_SW_UNDI *pxe = 0; // 3.0 entry point PXE_SW_UNDI *pxe_31 = 0; // 3.1 entry
UNDI32_DEV *UNDI32DeviceList[MAX_NIC_INTERFACES];
-NII_TABLE *UnidiDataPointer=NULL;
+NII_TABLE *UnidiDataPointer=NULL;
VOID
EFIAPI
@@ -103,7 +103,7 @@ UndiNotifyExitBs ( Routine Description:
- When EFI is shuting down the boot services, we need to install a
+ When EFI is shuting down the boot services, we need to install a
configuration table for UNDI to work at runtime!
Arguments:
@@ -161,8 +161,8 @@ Returns: EFI_EVENT Event;
Status = gBS->CreateEvent (
- EFI_EVENT_SIGNAL_EXIT_BOOT_SERVICES,
- EFI_TPL_NOTIFY,
+ EVT_SIGNAL_EXIT_BOOT_SERVICES,
+ TPL_NOTIFY,
UndiNotifyExitBs,
NULL,
&Event
@@ -191,15 +191,15 @@ Routine Description: Arguments:
This - Protocol instance pointer.
-
+
Controller - Handle of device to test.
-
+
RemainingDevicePath - Not used.
Returns:
EFI_SUCCESS - This driver supports this device.
-
+
other - This driver does not support this device.
--*/
@@ -305,15 +305,15 @@ Routine Description: Arguments:
This - Protocol instance pointer.
-
+
Controller - Handle of device to work with.
-
+
RemainingDevicePath - Not used, always produce all possible children.
Returns:
EFI_SUCCESS - This driver is added to Controller.
-
+
other - This driver does not support this device.
--*/
@@ -325,7 +325,7 @@ Returns: UINT16 NewCommand;
UINT8 *TmpPxePointer;
EFI_PCI_IO_PROTOCOL *PciIoFncs;
- UINTN Len;
+ UINTN Len;
Status = gBS->OpenProtocol (
Controller,
@@ -538,7 +538,7 @@ Returns: }
//
- // if the table exists, free it and alloc again, or alloc it directly
+ // if the table exists, free it and alloc again, or alloc it directly
//
if (UnidiDataPointer != NULL) {
Status = gBS->FreePool(UnidiDataPointer);
@@ -553,7 +553,7 @@ Returns: if (EFI_ERROR (Status)) {
goto UndiErrorAllocDataPointer;
}
-
+
//
// Open For Child Device
//
@@ -750,7 +750,7 @@ Routine Description: Arguments:
UnqId - Runtime O/S routine might use this, this temp routine does not use it
-
+
MicroSeconds - Determines the length of pause.
Returns:
@@ -780,13 +780,13 @@ Routine Description: Arguments:
UnqId - Runtime O/S routine may use this field, this temp routine does not.
-
+
ReadWrite - Determine if it is an I/O or Memory Read/Write Operation.
-
+
Len - Determines the width of the data operation.
-
+
Port - What port to Read/Write from.
-
+
BuffAddr - Address to read to or write from.
Returns:
@@ -880,15 +880,15 @@ Routine Description: Arguments:
DevPtr - Pointer which will point to the newly created device path with the MAC node attached.
-
+
BaseDevPtr - Pointer to the device path which the UNDI device driver is latching on to.
-
+
AdapterInfo - Pointer to the NIC data structure information which the UNDI driver is layering on..
Returns:
EFI_SUCCESS - A MAC address was successfully appended to the Base Device Path.
-
+
other - Not enough resources available to create new Device Path node.
--*/
@@ -1020,7 +1020,7 @@ Arguments: Returns:
EFI_SUCCESS - Install a GUID/Pointer pair into the system's configuration table.
-
+
other - Did not successfully install the GUID/Pointer pair into the configuration table.
--*/
@@ -1036,12 +1036,12 @@ Returns: return EFI_SUCCESS;
}
- if(UnidiDataPointer == NULL) {
+ if(UnidiDataPointer == NULL) {
return EFI_SUCCESS;
}
-
- UndiData = (NII_TABLE *)UnidiDataPointer;
-
+
+ UndiData = (NII_TABLE *)UnidiDataPointer;
+
UndiData->NumEntries = pxe_31->IFcnt;
UndiData->NextLink = NULL;
diff --git a/EdkModulePkg/Bus/Scsi/ScsiDisk/Dxe/ScsiDisk.c b/EdkModulePkg/Bus/Scsi/ScsiDisk/Dxe/ScsiDisk.c index 9eac2c4..9b3c01f 100644 --- a/EdkModulePkg/Bus/Scsi/ScsiDisk/Dxe/ScsiDisk.c +++ b/EdkModulePkg/Bus/Scsi/ScsiDisk/Dxe/ScsiDisk.c @@ -334,7 +334,7 @@ Returns: EFI_STATUS Status;
EFI_TPL OldTpl;
- OldTpl = gBS->RaiseTPL (EFI_TPL_CALLBACK);
+ OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
ScsiDiskDevice = SCSI_DISK_DEV_FROM_THIS (This);
@@ -405,7 +405,7 @@ Returns: return EFI_SUCCESS;
}
- OldTpl = gBS->RaiseTPL (EFI_TPL_CALLBACK);
+ OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
ScsiDiskDevice = SCSI_DISK_DEV_FROM_THIS (This);
@@ -529,7 +529,7 @@ Returns: return EFI_SUCCESS;
}
- OldTpl = gBS->RaiseTPL (EFI_TPL_CALLBACK);
+ OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
ScsiDiskDevice = SCSI_DISK_DEV_FROM_THIS (This);
diff --git a/EdkModulePkg/Bus/Usb/UsbBus/Dxe/usbbus.c b/EdkModulePkg/Bus/Usb/UsbBus/Dxe/usbbus.c index e1fdce7..97c9f5e 100644 --- a/EdkModulePkg/Bus/Usb/UsbBus/Dxe/usbbus.c +++ b/EdkModulePkg/Bus/Usb/UsbBus/Dxe/usbbus.c @@ -1,13 +1,13 @@ /*++
-Copyright (c) 2006, Intel Corporation
-All rights reserved. This program and the accompanying materials
-are licensed and made available under the terms and conditions of the BSD License
-which accompanies this distribution. The full text of the license may be found at
-http://opensource.org/licenses/bsd-license.php
-
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+Copyright (c) 2006, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
Module Name:
@@ -201,7 +201,7 @@ UsbFreeAddress ( Arguments:
DevAddress - Usb device address
AddressPool - Pool of usb device address
-
+
Returns:
VOID
@@ -259,7 +259,7 @@ UsbBusControllerDriverSupported ( return EFI_UNSUPPORTED;
}
}
-
+
//
// Open the IO Abstraction(s) needed to perform the supported test
//
@@ -285,7 +285,7 @@ UsbBusControllerDriverSupported ( This->DriverBindingHandle,
Controller
);
-
+
//
// Check whether USB Host Controller Protocol is already
// installed on this handle. If it is installed, we can start
@@ -302,7 +302,7 @@ UsbBusControllerDriverSupported ( if (Status == EFI_ALREADY_STARTED) {
return EFI_SUCCESS;
}
-
+
if (EFI_ERROR (Status)) {
Status = gBS->OpenProtocol (
Controller,
@@ -328,7 +328,7 @@ UsbBusControllerDriverSupported ( );
return EFI_SUCCESS;
}
-
+
gBS->CloseProtocol (
Controller,
&gEfiUsb2HcProtocolGuid,
@@ -622,8 +622,8 @@ UsbBusControllerDriverStart ( // Create a timer to query root ports periodically
//
Status = gBS->CreateEvent (
- EFI_EVENT_TIMER | EFI_EVENT_NOTIFY_SIGNAL,
- EFI_TPL_CALLBACK,
+ EVT_TIMER | EVT_NOTIFY_SIGNAL,
+ TPL_CALLBACK,
RootHubEnumeration,
RootHubController,
&RootHubController->HubNotify
@@ -670,7 +670,7 @@ UsbBusControllerDriverStart ( // there will be an interval between bus start and devices start.
//
gBS->SignalEvent (RootHubController->HubNotify);
-
+
Status = gBS->SetTimer (
RootHubController->HubNotify,
TimerPeriodic,
@@ -1229,7 +1229,7 @@ UsbDeviceDeConfiguration ( Arguments:
UsbIoDevice - The device to be deconfigured.
- Returns:
+ Returns:
EFI_SUCCESS
EFI_DEVICE_ERROR
@@ -1307,7 +1307,7 @@ UsbDeviceDeConfiguration ( NULL
);
}
-
+
//
// remove child handle reference to the USB_HC_PROTOCOL
//
@@ -1422,7 +1422,7 @@ OnHubInterruptComplete ( &UsbResult
);
}
-
+
//
// Delete & Submit this interrupt again
//
@@ -1467,7 +1467,7 @@ OnHubInterruptComplete ( if (DataLength == 0 || Data == NULL) {
return EFI_SUCCESS;
}
-
+
//
// Scan which port has status change
// Bit 0 stands for hub itself, other bit stands for
@@ -1500,18 +1500,18 @@ RootHubEnumeration ( /*++
Routine Description:
-
+
This is USB RootHub enumerator
Arguments:
-
+
Event - Indicating which event is signaled
Context - actually it is a USB_IO_DEVICE
Returns:
-
+
VOID
-
+
--*/
{
USB_IO_CONTROLLER_DEVICE *HubController;
@@ -1565,7 +1565,7 @@ RootHubEnumeration ( );
if (IsPortConnect (HubPortStatus.PortStatus)) {
-
+
//
// There is something connected to this port
//
@@ -1602,8 +1602,8 @@ RootHubEnumeration ( // Process of identify device speed
//
Status = IdentifyDeviceSpeed (
- UsbBusDev,
- NewDevice,
+ UsbBusDev,
+ NewDevice,
Index
);
if (EFI_ERROR (Status)) {
@@ -1667,8 +1667,8 @@ RootHubEnumeration ( // Create an event to do hub enumeration
//
gBS->CreateEvent (
- EFI_EVENT_NOTIFY_SIGNAL,
- EFI_TPL_CALLBACK,
+ EVT_NOTIFY_SIGNAL,
+ TPL_CALLBACK,
HubEnumeration,
NewController,
&NewController->HubNotify
@@ -1727,11 +1727,11 @@ HubEnumeration ( /*++
Routine Description:
-
+
This is Usb Hub enumerator
Arguments:
-
+
Event - Indicating which event is signaled
Context - actually it is a USB_IO_DEVICE
@@ -2040,8 +2040,8 @@ HubEnumeration ( // Create an event to do hub enumeration
//
gBS->CreateEvent (
- EFI_EVENT_NOTIFY_SIGNAL,
- EFI_TPL_CALLBACK,
+ EVT_NOTIFY_SIGNAL,
+ TPL_CALLBACK,
HubEnumeration,
NewController,
&NewController->HubNotify
@@ -2213,7 +2213,7 @@ ParentPortReset ( UsbIoController - Indicating the Usb Controller Device.
ReConfigure - Do we need to reconfigure it.
RetryTimes - Retry Times when failed
-
+
Returns:
EFI_SUCCESS
EFI_DEVICE_ERROR
@@ -2305,7 +2305,7 @@ UsbPortReset ( if (IsHub (UsbIoController)) {
return EFI_INVALID_PARAMETER;
}
-
+
//
// Since at this time, this device has already been configured,
// it needs to be re-configured.
@@ -2329,7 +2329,7 @@ ResetRootPort ( UsbBusDev - Bus controller of the device.
PortNum - The given port to be reset.
RetryTimes - RetryTimes when failed
-
+
Returns:
EFI_SUCCESS
EFI_DEVICE_ERROR
@@ -2594,22 +2594,22 @@ UsbSetTransactionTranslator ( IN OUT USB_IO_DEVICE *Device
)
/*++
-
+
Routine Description:
-
+
Set Transaction Translator parameter
-
+
Arguments:
-
+
ParentHubController - Controller structure of the parent Hub device
ParentPort - Number of parent port
Device - Structure of the device
-
+
Returns:
-
+
EFI_SUCCESS Success
EFI_OUT_OF_RESOURCES Cannot allocate resources
-
+
--*/
{
USB_IO_CONTROLLER_DEVICE *AncestorHubController;
@@ -2650,19 +2650,19 @@ UsbUnsetTransactionTranslator ( USB_IO_DEVICE *Device
)
/*++
-
+
Routine Description:
-
+
Unset Transaction Translator parameter
-
+
Arguments:
-
+
Device - Structure of the device
-
+
Returns:
-
+
EFI_SUCCESS Success
-
+
--*/
{
if (Device->Translator) {
@@ -2681,22 +2681,22 @@ IdentifyDeviceSpeed ( UINT8 Index
)
/*++
-
+
Routine Description:
-
+
Identify speed of USB device
-
+
Arguments:
-
+
UsbBusDev - UsbBus controller structure of the device
NewDevice - Devcie controller structure
Index - Number of the port
-
+
Returns:
-
+
EFI_SUCCESS Success
EFI_NOT_FOUND Device release to CHC or can't be found
-
+
--*/
{
EFI_STATUS Status;
@@ -2707,7 +2707,7 @@ IdentifyDeviceSpeed ( Index,
(EFI_USB_PORT_STATUS *) &HubPortStatus
);
-
+
//
// Check device device
//
@@ -2717,7 +2717,7 @@ IdentifyDeviceSpeed ( //
if (HubPortStatus.PortStatus & USB_PORT_STAT_HIGH_SPEED) {
DEBUG ((gUSBDebugLevel, "High Speed Device attached to EHC\n"));
- NewDevice->DeviceSpeed = EFI_USB_SPEED_HIGH;
+ NewDevice->DeviceSpeed = EFI_USB_SPEED_HIGH;
} else {
Status = ReleasePortToCHC (UsbBusDev, Index);
if (EFI_ERROR (Status)) {
@@ -2733,13 +2733,13 @@ IdentifyDeviceSpeed ( //
if (HubPortStatus.PortStatus & USB_PORT_STAT_LOW_SPEED) {
DEBUG ((gUSBDebugLevel, "Low Speed Device attached to CHC\n"));
- NewDevice->DeviceSpeed = EFI_USB_SPEED_LOW;
+ NewDevice->DeviceSpeed = EFI_USB_SPEED_LOW;
} else {
DEBUG ((gUSBDebugLevel, "FULL Speed Device attached to CHC\n"));
- NewDevice->DeviceSpeed = EFI_USB_SPEED_FULL;
+ NewDevice->DeviceSpeed = EFI_USB_SPEED_FULL;
}
}
-
+
return EFI_SUCCESS;
}
@@ -2750,21 +2750,21 @@ ReleasePortToCHC ( UINT8 PortNum
)
/*++
-
+
Routine Description:
-
+
Set bit to release the port owner to CHC
-
+
Arguments:
-
+
UsbBusDev - UsbBus controller structure of the device
PortNum - Number of the port
-
+
Returns:
-
+
EFI_SUCCESS Success
EFI_DEVICE_ERROR Fail
-
+
--*/
{
EFI_STATUS Status;
@@ -2789,29 +2789,29 @@ UsbVirtualHcGetCapability ( OUT UINT8 *Is64BitCapable
)
/*++
-
+
Routine Description:
-
- Virtual interface to Retrieves the capablility of root hub ports
+
+ Virtual interface to Retrieves the capablility of root hub ports
for both Hc2 and Hc protocol.
-
+
Arguments:
-
+
UsbBusDev - A pointer to bus controller of the device.
MaxSpeed - A pointer to the number of the host controller.
PortNumber - A pointer to the number of the root hub ports.
- Is64BitCapable - A pointer to the flag for whether controller supports
+ Is64BitCapable - A pointer to the flag for whether controller supports
64-bit memory addressing.
-
+
Returns:
-
- EFI_SUCCESS
+
+ EFI_SUCCESS
The host controller capability were retrieved successfully.
- EFI_INVALID_PARAMETER
+ EFI_INVALID_PARAMETER
MaxSpeed or PortNumber or Is64BitCapable is NULL.
- EFI_DEVICE_ERROR
- An error was encountered while attempting to retrieve the capabilities.
-
+ EFI_DEVICE_ERROR
+ An error was encountered while attempting to retrieve the capabilities.
+
--*/
{
EFI_STATUS Status;
@@ -2844,59 +2844,59 @@ UsbVirtualHcReset ( IN UINT16 Attributes
)
/*++
-
+
Routine Description:
-
+
Virtual interface to provides software reset for the USB host controller
for both Hc2 and Hc protocol.
-
+
Arguments:
-
+
UsbBusDev - A pointer to bus controller of the device.
- Attributes - A bit mask of the reset operation to perform.
+ Attributes - A bit mask of the reset operation to perform.
See below for a list of the supported bit mask values.
-
+
#define EFI_USB_HC_RESET_GLOBAL 0x0001 // Hc2 and Hc
#define EFI_USB_HC_RESET_HOST_CONTROLLER 0x0002 // Hc2 and Hc
#define EFI_USB_HC_RESET_GLOBAL_WITH_DEBUG 0x0004 // Hc2
#define EFI_USB_HC_RESET_HOST_WITH_DEBUG 0x0008 // Hc2
- EFI_USB_HC_RESET_GLOBAL
+ EFI_USB_HC_RESET_GLOBAL
If this bit is set, a global reset signal will be sent to the USB bus.
- This resets all of the USB bus logic, including the USB host
+ This resets all of the USB bus logic, including the USB host
controller hardware and all the devices attached on the USB bus.
- EFI_USB_HC_RESET_HOST_CONTROLLER
- If this bit is set, the USB host controller hardware will be reset.
+ EFI_USB_HC_RESET_HOST_CONTROLLER
+ If this bit is set, the USB host controller hardware will be reset.
No reset signal will be sent to the USB bus.
EFI_USB_HC_RESET_GLOBAL_WITH_DEBUG
If this bit is set, a global reset signal will be sent to the USB bus.
- This resets all of the USB bus logic, including the USB host
- controller hardware and all the devices attached on the USB bus.
- If this is an EHCI controller and the debug port has configured, then
+ This resets all of the USB bus logic, including the USB host
+ controller hardware and all the devices attached on the USB bus.
+ If this is an EHCI controller and the debug port has configured, then
this is will still reset the host controller.
EFI_USB_HC_RESET_HOST_WITH_DEBUG
- If this bit is set, the USB host controller hardware will be reset.
+ If this bit is set, the USB host controller hardware will be reset.
If this is an EHCI controller and the debug port has been configured,
then this will still reset the host controller.
-
+
Returns:
-
- EFI_SUCCESS
+
+ EFI_SUCCESS
The reset operation succeeded.
- EFI_INVALID_PARAMETER
+ EFI_INVALID_PARAMETER
Attributes is not valid.
EFI_UNSUPPOURTED
The type of reset specified by Attributes is not currently supported by
the host controller hardware.
EFI_ACCESS_DENIED
- Reset operation is rejected due to the debug port being configured and
- active; only EFI_USB_HC_RESET_GLOBAL_WITH_DEBUG or
+ Reset operation is rejected due to the debug port being configured and
+ active; only EFI_USB_HC_RESET_GLOBAL_WITH_DEBUG or
EFI_USB_HC_RESET_HOST_WITH_DEBUG reset Atrributes can be used to
perform reset operation for this host controller.
- EFI_DEVICE_ERROR
- An error was encountered while attempting to perform
+ EFI_DEVICE_ERROR
+ An error was encountered while attempting to perform
the reset operation.
-
+
--*/
{
EFI_STATUS Status;
@@ -2925,36 +2925,36 @@ UsbVirtualHcGetState ( OUT EFI_USB_HC_STATE *State
)
/*++
-
+
Routine Description:
-
+
Virtual interface to retrieves current state of the USB host controller
for both Hc2 and Hc protocol.
-
+
Arguments:
-
+
UsbBusDev - A pointer to bus controller of the device.
- State - A pointer to the EFI_USB_HC_STATE data structure that
- indicates current state of the USB host controller.
+ State - A pointer to the EFI_USB_HC_STATE data structure that
+ indicates current state of the USB host controller.
Type EFI_USB_HC_STATE is defined below.
-
+
typedef enum {
EfiUsbHcStateHalt,
EfiUsbHcStateOperational,
EfiUsbHcStateSuspend,
EfiUsbHcStateMaximum
} EFI_USB_HC_STATE;
-
+
Returns:
-
- EFI_SUCCESS
+
+ EFI_SUCCESS
The state information of the host controller was returned in State.
- EFI_INVALID_PARAMETER
+ EFI_INVALID_PARAMETER
State is NULL.
- EFI_DEVICE_ERROR
- An error was encountered while attempting to retrieve the
- host controller's current state.
-
+ EFI_DEVICE_ERROR
+ An error was encountered while attempting to retrieve the
+ host controller's current state.
+
--*/
{
EFI_STATUS Status;
@@ -2983,27 +2983,27 @@ UsbVirtualHcSetState ( IN EFI_USB_HC_STATE State
)
/*++
-
+
Routine Description:
-
+
Virtual interface to sets the USB host controller to a specific state
for both Hc2 and Hc protocol.
-
+
Arguments:
-
+
UsbBusDev - A pointer to bus controller of the device.
State - Indicates the state of the host controller that will be set.
-
+
Returns:
-
- EFI_SUCCESS
- The USB host controller was successfully placed in the state
+
+ EFI_SUCCESS
+ The USB host controller was successfully placed in the state
specified by State.
- EFI_INVALID_PARAMETER
+ EFI_INVALID_PARAMETER
State is invalid.
- EFI_DEVICE_ERROR
- Failed to set the state specified by State due to device error.
-
+ EFI_DEVICE_ERROR
+ Failed to set the state specified by State due to device error.
+
--*/
{
EFI_STATUS Status;
@@ -3033,29 +3033,29 @@ UsbVirtualHcGetRootHubPortStatus ( OUT EFI_USB_PORT_STATUS *PortStatus
)
/*++
-
+
Routine Description:
-
+
Virtual interface to retrieves the current status of a USB root hub port
both for Hc2 and Hc protocol.
-
+
Arguments:
-
+
UsbBusDev - A pointer to bus controller of the device.
- PortNumber - Specifies the root hub port from which the status
- is to be retrieved. This value is zero-based. For example,
+ PortNumber - Specifies the root hub port from which the status
+ is to be retrieved. This value is zero-based. For example,
if a root hub has two ports, then the first port is numbered 0,
and the second port is numbered 1.
- PortStatus - A pointer to the current port status bits and
- port status change bits.
-
+ PortStatus - A pointer to the current port status bits and
+ port status change bits.
+
Returns:
-
- EFI_SUCCESS The status of the USB root hub port specified by PortNumber
+
+ EFI_SUCCESS The status of the USB root hub port specified by PortNumber
was returned in PortStatus.
- EFI_INVALID_PARAMETER PortNumber is invalid.
- EFI_DEVICE_ERROR Can't read register
-
+ EFI_INVALID_PARAMETER PortNumber is invalid.
+ EFI_DEVICE_ERROR Can't read register
+
--*/
{
EFI_STATUS Status;
@@ -3087,29 +3087,29 @@ UsbVirtualHcSetRootHubPortFeature ( IN EFI_USB_PORT_FEATURE PortFeature
)
/*++
-
+
Routine Description:
Virual interface to sets a feature for the specified root hub port
for both Hc2 and Hc protocol.
-
+
Arguments:
-
+
UsbBusDev - A pointer to bus controller of the device.
- PortNumber - Specifies the root hub port whose feature
+ PortNumber - Specifies the root hub port whose feature
is requested to be set.
- PortFeature - Indicates the feature selector associated
- with the feature set request.
-
+ PortFeature - Indicates the feature selector associated
+ with the feature set request.
+
Returns:
-
- EFI_SUCCESS
- The feature specified by PortFeature was set for the
+
+ EFI_SUCCESS
+ The feature specified by PortFeature was set for the
USB root hub port specified by PortNumber.
- EFI_INVALID_PARAMETER
+ EFI_INVALID_PARAMETER
PortNumber is invalid or PortFeature is invalid.
EFI_DEVICE_ERROR
Can't read register
-
+
--*/
{
EFI_STATUS Status;
@@ -3141,30 +3141,30 @@ UsbVirtualHcClearRootHubPortFeature ( IN EFI_USB_PORT_FEATURE PortFeature
)
/*++
-
+
Routine Description:
-
+
Virtual interface to clears a feature for the specified root hub port
for both Hc2 and Hc protocol.
-
+
Arguments:
-
+
UsbBusDev - A pointer to bus controller of the device.
- PortNumber - Specifies the root hub port whose feature
+ PortNumber - Specifies the root hub port whose feature
is requested to be cleared.
- PortFeature - Indicates the feature selector associated with the
+ PortFeature - Indicates the feature selector associated with the
feature clear request.
-
+
Returns:
-
- EFI_SUCCESS
- The feature specified by PortFeature was cleared for the
+
+ EFI_SUCCESS
+ The feature specified by PortFeature was cleared for the
USB root hub port specified by PortNumber.
- EFI_INVALID_PARAMETER
+ EFI_INVALID_PARAMETER
PortNumber is invalid or PortFeature is invalid.
EFI_DEVICE_ERROR
Can't read register
-
+
--*/
{
EFI_STATUS Status;
@@ -3204,48 +3204,48 @@ UsbVirtualHcControlTransfer ( OUT UINT32 *TransferResult
)
/*++
-
+
Routine Description:
-
+
Virtual interface to submits control transfer to a target USB device
for both Hc2 and Hc protocol.
-
+
Arguments:
-
+
UsbBusDev - A pointer to bus controller of the device.
DeviceAddress - Represents the address of the target device on the USB,
which is assigned during USB enumeration.
DeviceSpeed - Indicates target device speed.
- MaximumPacketLength - Indicates the maximum packet size that the
- default control transfer endpoint is capable of
+ MaximumPacketLength - Indicates the maximum packet size that the
+ default control transfer endpoint is capable of
sending or receiving.
- Request - A pointer to the USB device request that will be sent
- to the USB device.
+ Request - A pointer to the USB device request that will be sent
+ to the USB device.
TransferDirection - Specifies the data direction for the transfer.
- There are three values available, DataIn, DataOut
+ There are three values available, DataIn, DataOut
and NoData.
- Data - A pointer to the buffer of data that will be transmitted
+ Data - A pointer to the buffer of data that will be transmitted
to USB device or received from USB device.
- DataLength - Indicates the size, in bytes, of the data buffer
+ DataLength - Indicates the size, in bytes, of the data buffer
specified by Data.
- TimeOut - Indicates the maximum time, in microseconds,
+ TimeOut - Indicates the maximum time, in microseconds,
which the transfer is allowed to complete.
Translator - A pointr to the transaction translator data.
- TransferResult - A pointer to the detailed result information generated
+ TransferResult - A pointer to the detailed result information generated
by this control transfer.
-
+
Returns:
-
- EFI_SUCCESS
+
+ EFI_SUCCESS
The control transfer was completed successfully.
- EFI_OUT_OF_RESOURCES
+ EFI_OUT_OF_RESOURCES
The control transfer could not be completed due to a lack of resources.
- EFI_INVALID_PARAMETER
+ EFI_INVALID_PARAMETER
Some parameters are invalid.
- EFI_TIMEOUT
+ EFI_TIMEOUT
The control transfer failed due to timeout.
- EFI_DEVICE_ERROR
- The control transfer failed due to host controller or device error.
+ EFI_DEVICE_ERROR
+ The control transfer failed due to host controller or device error.
Caller should check TranferResult for detailed error information.
--*/
@@ -3305,55 +3305,55 @@ UsbVirtualHcBulkTransfer ( OUT UINT32 *TransferResult
)
/*++
-
+
Routine Description:
-
+
Virtual interface to submits bulk transfer to a bulk endpoint of a USB device
both for Hc2 and Hc protocol.
-
+
Arguments:
-
+
UsbBusDev - A pointer to bus controller of the device.
DeviceAddress - Represents the address of the target device on the USB,
- which is assigned during USB enumeration.
- EndPointAddress - The combination of an endpoint number and an
- endpoint direction of the target USB device.
- Each endpoint address supports data transfer in
- one direction except the control endpoint
- (whose default endpoint address is 0).
- It is the caller's responsibility to make sure that
- the EndPointAddress represents a bulk endpoint.
+ which is assigned during USB enumeration.
+ EndPointAddress - The combination of an endpoint number and an
+ endpoint direction of the target USB device.
+ Each endpoint address supports data transfer in
+ one direction except the control endpoint
+ (whose default endpoint address is 0).
+ It is the caller's responsibility to make sure that
+ the EndPointAddress represents a bulk endpoint.
DeviceSpeed - Indicates device speed. The supported values are EFI_USB_SPEED_FULL
and EFI_USB_SPEED_HIGH.
MaximumPacketLength - Indicates the maximum packet size the target endpoint
- is capable of sending or receiving.
+ is capable of sending or receiving.
DataBuffersNumber - Number of data buffers prepared for the transfer.
- Data - Array of pointers to the buffers of data that will be transmitted
- to USB device or received from USB device.
+ Data - Array of pointers to the buffers of data that will be transmitted
+ to USB device or received from USB device.
DataLength - When input, indicates the size, in bytes, of the data buffer
- specified by Data. When output, indicates the actually
- transferred data size.
- DataToggle - A pointer to the data toggle value. On input, it indicates
+ specified by Data. When output, indicates the actually
+ transferred data size.
+ DataToggle - A pointer to the data toggle value. On input, it indicates
the initial data toggle value the bulk transfer should adopt;
- on output, it is updated to indicate the data toggle value
- of the subsequent bulk transfer.
- Translator - A pointr to the transaction translator data.
- TimeOut - Indicates the maximum time, in microseconds, which the
- transfer is allowed to complete.
- TransferResult - A pointer to the detailed result information of the
+ on output, it is updated to indicate the data toggle value
+ of the subsequent bulk transfer.
+ Translator - A pointr to the transaction translator data.
+ TimeOut - Indicates the maximum time, in microseconds, which the
+ transfer is allowed to complete.
+ TransferResult - A pointer to the detailed result information of the
bulk transfer.
Returns:
-
- EFI_SUCCESS
+
+ EFI_SUCCESS
The bulk transfer was completed successfully.
- EFI_OUT_OF_RESOURCES
+ EFI_OUT_OF_RESOURCES
The bulk transfer could not be submitted due to lack of resource.
- EFI_INVALID_PARAMETER
+ EFI_INVALID_PARAMETER
Some parameters are invalid.
- EFI_TIMEOUT
+ EFI_TIMEOUT
The bulk transfer failed due to timeout.
- EFI_DEVICE_ERROR
+ EFI_DEVICE_ERROR
The bulk transfer failed due to host controller or device error.
Caller should check TranferResult for detailed error information.
@@ -3412,63 +3412,63 @@ UsbVirtualHcAsyncInterruptTransfer ( IN VOID *Context OPTIONAL
)
/*++
-
+
Routine Description:
-
- Virtual interface to submits an asynchronous interrupt transfer to an
+
+ Virtual interface to submits an asynchronous interrupt transfer to an
interrupt endpoint of a USB device for both Hc2 and Hc protocol.
-
+
Arguments:
-
+
UsbBusDev - A pointer to bus controller of the device.
DeviceAddress - Represents the address of the target device on the USB,
- which is assigned during USB enumeration.
- EndPointAddress - The combination of an endpoint number and an endpoint
- direction of the target USB device. Each endpoint address
- supports data transfer in one direction except the
- control endpoint (whose default endpoint address is 0).
- It is the caller's responsibility to make sure that
- the EndPointAddress represents an interrupt endpoint.
+ which is assigned during USB enumeration.
+ EndPointAddress - The combination of an endpoint number and an endpoint
+ direction of the target USB device. Each endpoint address
+ supports data transfer in one direction except the
+ control endpoint (whose default endpoint address is 0).
+ It is the caller's responsibility to make sure that
+ the EndPointAddress represents an interrupt endpoint.
DeviceSpeed - Indicates device speed.
MaximumPacketLength - Indicates the maximum packet size the target endpoint
- is capable of sending or receiving.
+ is capable of sending or receiving.
IsNewTransfer - If TRUE, an asynchronous interrupt pipe is built between
- the host and the target interrupt endpoint.
- If FALSE, the specified asynchronous interrupt pipe
- is canceled.
- DataToggle - A pointer to the data toggle value. On input, it is valid
- when IsNewTransfer is TRUE, and it indicates the initial
- data toggle value the asynchronous interrupt transfer
- should adopt.
- On output, it is valid when IsNewTransfer is FALSE,
- and it is updated to indicate the data toggle value of
- the subsequent asynchronous interrupt transfer.
- PollingInterval - Indicates the interval, in milliseconds, that the
- asynchronous interrupt transfer is polled.
- This parameter is required when IsNewTransfer is TRUE.
- DataLength - Indicates the length of data to be received at the
- rate specified by PollingInterval from the target
- asynchronous interrupt endpoint. This parameter
- is only required when IsNewTransfer is TRUE.
+ the host and the target interrupt endpoint.
+ If FALSE, the specified asynchronous interrupt pipe
+ is canceled.
+ DataToggle - A pointer to the data toggle value. On input, it is valid
+ when IsNewTransfer is TRUE, and it indicates the initial
+ data toggle value the asynchronous interrupt transfer
+ should adopt.
+ On output, it is valid when IsNewTransfer is FALSE,
+ and it is updated to indicate the data toggle value of
+ the subsequent asynchronous interrupt transfer.
+ PollingInterval - Indicates the interval, in milliseconds, that the
+ asynchronous interrupt transfer is polled.
+ This parameter is required when IsNewTransfer is TRUE.
+ DataLength - Indicates the length of data to be received at the
+ rate specified by PollingInterval from the target
+ asynchronous interrupt endpoint. This parameter
+ is only required when IsNewTransfer is TRUE.
Translator - A pointr to the transaction translator data.
- CallBackFunction - The Callback function.This function is called at the
- rate specified by PollingInterval.This parameter is
- only required when IsNewTransfer is TRUE.
+ CallBackFunction - The Callback function.This function is called at the
+ rate specified by PollingInterval.This parameter is
+ only required when IsNewTransfer is TRUE.
Context - The context that is passed to the CallBackFunction.
- This is an optional parameter and may be NULL.
-
+
Returns:
-
- EFI_SUCCESS
- The asynchronous interrupt transfer request has been successfully
+
+ EFI_SUCCESS
+ The asynchronous interrupt transfer request has been successfully
submitted or canceled.
- EFI_INVALID_PARAMETER
+ EFI_INVALID_PARAMETER
Some parameters are invalid.
- EFI_OUT_OF_RESOURCES
- The request could not be completed due to a lack of resources.
+ EFI_OUT_OF_RESOURCES
+ The request could not be completed due to a lack of resources.
EFI_DEVICE_ERROR
Can't read register
-
+
--*/
{
EFI_STATUS Status;
@@ -3527,58 +3527,58 @@ UsbVirtualHcSyncInterruptTransfer ( OUT UINT32 *TransferResult
)
/*++
-
+
Routine Description:
-
- Vitual interface to submits synchronous interrupt transfer to an interrupt endpoint
+
+ Vitual interface to submits synchronous interrupt transfer to an interrupt endpoint
of a USB device for both Hc2 and Hc protocol.
-
+
Arguments:
-
+
UsbBusDev - A pointer to bus controller of the device.
- DeviceAddress - Represents the address of the target device on the USB,
+ DeviceAddress - Represents the address of the target device on the USB,
which is assigned during USB enumeration.
- EndPointAddress - The combination of an endpoint number and an endpoint
- direction of the target USB device. Each endpoint
- address supports data transfer in one direction
- except the control endpoint (whose default
+ EndPointAddress - The combination of an endpoint number and an endpoint
+ direction of the target USB device. Each endpoint
+ address supports data transfer in one direction
+ except the control endpoint (whose default
endpoint address is 0). It is the caller's responsibility
- to make sure that the EndPointAddress represents
- an interrupt endpoint.
+ to make sure that the EndPointAddress represents
+ an interrupt endpoint.
DeviceSpeed - Indicates device speed.
- MaximumPacketLength - Indicates the maximum packet size the target endpoint
+ MaximumPacketLength - Indicates the maximum packet size the target endpoint
is capable of sending or receiving.
- Data - A pointer to the buffer of data that will be transmitted
+ Data - A pointer to the buffer of data that will be transmitted
to USB device or received from USB device.
- DataLength - On input, the size, in bytes, of the data buffer specified
+ DataLength - On input, the size, in bytes, of the data buffer specified
by Data. On output, the number of bytes transferred.
DataToggle - A pointer to the data toggle value. On input, it indicates
- the initial data toggle value the synchronous interrupt
- transfer should adopt;
- on output, it is updated to indicate the data toggle value
- of the subsequent synchronous interrupt transfer.
- TimeOut - Indicates the maximum time, in microseconds, which the
+ the initial data toggle value the synchronous interrupt
+ transfer should adopt;
+ on output, it is updated to indicate the data toggle value
+ of the subsequent synchronous interrupt transfer.
+ TimeOut - Indicates the maximum time, in microseconds, which the
transfer is allowed to complete.
Translator - A pointr to the transaction translator data.
- TransferResult - A pointer to the detailed result information from
- the synchronous interrupt transfer.
+ TransferResult - A pointer to the detailed result information from
+ the synchronous interrupt transfer.
Returns:
-
- EFI_SUCCESS
+
+ EFI_SUCCESS
The synchronous interrupt transfer was completed successfully.
- EFI_OUT_OF_RESOURCES
- The synchronous interrupt transfer could not be submitted due
+ EFI_OUT_OF_RESOURCES
+ The synchronous interrupt transfer could not be submitted due
to lack of resource.
- EFI_INVALID_PARAMETER
+ EFI_INVALID_PARAMETER
Some parameters are invalid.
- EFI_TIMEOUT
+ EFI_TIMEOUT
The synchronous interrupt transfer failed due to timeout.
- EFI_DEVICE_ERROR
- The synchronous interrupt transfer failed due to host controller
- or device error. Caller should check TranferResult for detailed
- error information.
-
+ EFI_DEVICE_ERROR
+ The synchronous interrupt transfer failed due to host controller
+ or device error. Caller should check TranferResult for detailed
+ error information.
+
--*/
{
EFI_STATUS Status;
@@ -3634,34 +3634,34 @@ UsbVirtualHcIsochronousTransfer ( OUT UINT32 *TransferResult
)
/*++
-
+
Routine Description:
-
+
Virtual interface to submits isochronous transfer to a target USB device
for both Hc2 and Hc protocol.
-
+
Arguments:
-
+
UsbBusDev - A pointer to bus controller of the device.
DeviceAddress - Represents the address of the target device on the USB,
which is assigned during USB enumeration.
EndPointAddress - End point address
DeviceSpeed - Indicates device speed.
- MaximumPacketLength - Indicates the maximum packet size that the
- default control transfer endpoint is capable of
+ MaximumPacketLength - Indicates the maximum packet size that the
+ default control transfer endpoint is capable of
sending or receiving.
DataBuffersNumber - Number of data buffers prepared for the transfer.
- Data - Array of pointers to the buffers of data that will be
+ Data - Array of pointers to the buffers of data that will be
transmitted to USB device or received from USB device.
- DataLength - Indicates the size, in bytes, of the data buffer
+ DataLength - Indicates the size, in bytes, of the data buffer
specified by Data.
Translator - A pointr to the transaction translator data.
- TransferResult - A pointer to the detailed result information generated
- by this control transfer.
-
+ TransferResult - A pointer to the detailed result information generated
+ by this control transfer.
+
Returns:
-
- EFI_UNSUPPORTED
+
+ EFI_UNSUPPORTED
--*/
{
@@ -3684,34 +3684,34 @@ UsbVirtualHcAsyncIsochronousTransfer ( IN VOID *Context
)
/*++
-
+
Routine Description:
-
+
Vitual interface to submits Async isochronous transfer to a target USB device
for both Hc2 and Hc protocol.
-
+
Arguments:
-
+
UsbBusDev - A pointer to bus controller of the device.
DeviceAddress - Represents the address of the target device on the USB,
which is assigned during USB enumeration.
EndPointAddress - End point address
DeviceSpeed - Indicates device speed.
- MaximumPacketLength - Indicates the maximum packet size that the
- default control transfer endpoint is capable of
+ MaximumPacketLength - Indicates the maximum packet size that the
+ default control transfer endpoint is capable of
sending or receiving.
DataBuffersNumber - Number of data buffers prepared for the transfer.
- Data - Array of pointers to the buffers of data that will be transmitted
+ Data - Array of pointers to the buffers of data that will be transmitted
to USB device or received from USB device.
- DataLength - Indicates the size, in bytes, of the data buffer
+ DataLength - Indicates the size, in bytes, of the data buffer
specified by Data.
Translator - A pointr to the transaction translator data.
IsochronousCallBack - When the transfer complete, the call back function will be called
Context - Pass to the call back function as parameter
-
+
Returns:
-
- EFI_UNSUPPORTED
+
+ EFI_UNSUPPORTED
--*/
{
diff --git a/EdkModulePkg/Bus/Usb/UsbKb/Dxe/efikey.c b/EdkModulePkg/Bus/Usb/UsbKb/Dxe/efikey.c index a1fd418..069e31d 100644 --- a/EdkModulePkg/Bus/Usb/UsbKb/Dxe/efikey.c +++ b/EdkModulePkg/Bus/Usb/UsbKb/Dxe/efikey.c @@ -1,18 +1,18 @@ /*++
-Copyright (c) 2006, Intel Corporation
-All rights reserved. This program and the accompanying materials
-are licensed and made available under the terms and conditions of the BSD License
-which accompanies this distribution. The full text of the license may be found at
-http://opensource.org/licenses/bsd-license.php
-
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+Copyright (c) 2006, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
Module Name:
EfiKey.c
-
+
Abstract:
USB Keyboard Driver
@@ -80,18 +80,18 @@ USBKeyboardDriverBindingSupported ( IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
)
/*++
-
+
Routine Description:
Supported.
-
+
Arguments:
This - EFI_DRIVER_BINDING_PROTOCOL
Controller - Controller handle
- RemainingDevicePath - EFI_DEVICE_PATH_PROTOCOL
+ RemainingDevicePath - EFI_DEVICE_PATH_PROTOCOL
Returns:
EFI_STATUS
-
---*/
+
+--*/
{
EFI_STATUS OpenStatus;
EFI_USB_IO_PROTOCOL *UsbIo;
@@ -111,7 +111,7 @@ USBKeyboardDriverBindingSupported ( if (EFI_ERROR (OpenStatus)) {
return OpenStatus;
}
-
+
//
// Use the USB I/O protocol interface to check whether the Controller is
// the Keyboard controller that can be managed by this driver.
@@ -140,10 +140,10 @@ USBKeyboardDriverBindingStart ( IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
)
/*++
-
+
Routine Description:
Start.
-
+
Arguments:
This - EFI_DRIVER_BINDING_PROTOCOL
Controller - Controller handle
@@ -152,8 +152,8 @@ USBKeyboardDriverBindingStart ( EFI_SUCCESS - Success
EFI_OUT_OF_RESOURCES - Can't allocate memory
EFI_UNSUPPORTED - The Start routine fail
---*/
-{
+--*/
+{
EFI_STATUS Status;
EFI_USB_IO_PROTOCOL *UsbIo;
USB_KB_DEV *UsbKeyboardDevice;
@@ -164,7 +164,7 @@ USBKeyboardDriverBindingStart ( UINT8 PollingInterval;
UINT8 PacketSize;
BOOLEAN Found;
-
+
UsbKeyboardDevice = NULL;
Found = FALSE;
@@ -283,8 +283,8 @@ USBKeyboardDriverBindingStart ( UsbKeyboardDevice->SimpleInput.Reset = USBKeyboardReset;
UsbKeyboardDevice->SimpleInput.ReadKeyStroke = USBKeyboardReadKeyStroke;
Status = gBS->CreateEvent (
- EFI_EVENT_NOTIFY_WAIT,
- EFI_TPL_NOTIFY,
+ EVT_NOTIFY_WAIT,
+ TPL_NOTIFY,
USBKeyboardWaitForKey,
UsbKeyboardDevice,
&(UsbKeyboardDevice->SimpleInput.WaitForKey)
@@ -300,7 +300,7 @@ USBKeyboardDriverBindingStart ( );
return Status;
}
-
+
//
// Install simple txt in protocol interface
// for the usb keyboard device.
@@ -328,7 +328,7 @@ USBKeyboardDriverBindingStart ( );
return Status;
}
-
+
//
// Reset USB Keyboard Device
//
@@ -414,19 +414,19 @@ USBKeyboardDriverBindingStop ( IN EFI_HANDLE *ChildHandleBuffer
)
/*++
-
+
Routine Description:
Stop.
-
+
Arguments:
This - EFI_DRIVER_BINDING_PROTOCOL
Controller - Controller handle
NumberOfChildren - Child handle number
- ChildHandleBuffer - Child handle buffer
+ ChildHandleBuffer - Child handle buffer
Returns:
EFI_SUCCESS - Success
- EFI_UNSUPPORTED - Can't support
---*/
+ EFI_UNSUPPORTED - Can't support
+--*/
{
EFI_STATUS Status;
EFI_SIMPLE_TEXT_IN_PROTOCOL *SimpleInput;
@@ -443,7 +443,7 @@ USBKeyboardDriverBindingStop ( if (EFI_ERROR (Status)) {
return EFI_UNSUPPORTED;
}
-
+
//
// Get USB_KB_DEV instance.
//
@@ -522,17 +522,17 @@ USBKeyboardReset ( Routine Description:
Implements EFI_SIMPLE_TEXT_IN_PROTOCOL.Reset() function.
-
+
Arguments:
This The EFI_SIMPLE_TEXT_IN_PROTOCOL instance.
ExtendedVerification
Indicates that the driver may perform a more exhaustive
- verification operation of the device during reset.
-
- Returns:
+ verification operation of the device during reset.
+
+ Returns:
EFI_SUCCESS - Success
EFI_DEVICE_ERROR - Hardware Error
---*/
+--*/
{
EFI_STATUS Status;
USB_KB_DEV *UsbKeyboardDevice;
@@ -563,7 +563,7 @@ USBKeyboardReset ( UsbKeyboardDevice->CurKeyChar = 0;
return EFI_SUCCESS;
}
-
+
//
// Exhaustive reset
//
@@ -587,15 +587,15 @@ USBKeyboardReadKeyStroke ( Routine Description:
Implements EFI_SIMPLE_TEXT_IN_PROTOCOL.ReadKeyStroke() function.
-
+
Arguments:
This The EFI_SIMPLE_TEXT_IN_PROTOCOL instance.
Key A pointer to a buffer that is filled in with the keystroke
information for the key that was pressed.
-
- Returns:
+
+ Returns:
EFI_SUCCESS - Success
---*/
+--*/
{
USB_KB_DEV *UsbKeyboardDevice;
EFI_STATUS Status;
@@ -640,15 +640,15 @@ USBKeyboardWaitForKey ( /*++
Routine Description:
- Handler function for WaitForKey event.
-
+ Handler function for WaitForKey event.
+
Arguments:
Event Event to be signaled when a key is pressed.
Context Points to USB_KB_DEV instance.
-
- Returns:
+
+ Returns:
VOID
---*/
+--*/
{
USB_KB_DEV *UsbKeyboardDevice;
@@ -676,13 +676,13 @@ USBKeyboardCheckForKey ( Routine Description:
Check whether there is key pending.
-
+
Arguments:
UsbKeyboardDevice The USB_KB_DEV instance.
-
- Returns:
+
+ Returns:
EFI_SUCCESS - Success
---*/
+--*/
{
EFI_STATUS Status;
UINT8 KeyChar;
diff --git a/EdkModulePkg/Bus/Usb/UsbKb/Dxe/keyboard.c b/EdkModulePkg/Bus/Usb/UsbKb/Dxe/keyboard.c index 64bbd30..d81a976 100644 --- a/EdkModulePkg/Bus/Usb/UsbKb/Dxe/keyboard.c +++ b/EdkModulePkg/Bus/Usb/UsbKb/Dxe/keyboard.c @@ -1,18 +1,18 @@ /*++
-Copyright (c) 2006, Intel Corporation
-All rights reserved. This program and the accompanying materials
-are licensed and made available under the terms and conditions of the BSD License
-which accompanies this distribution. The full text of the license may be found at
-http://opensource.org/licenses/bsd-license.php
-
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+Copyright (c) 2006, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
Module Name:
Keyboard.c
-
+
Abstract:
Helper functions for USB Keyboard Driver
@@ -85,8 +85,8 @@ UINT8 KeyConvertionTable[USB_KEYCODE_MAX_MAKE][3] = { { SCAN_NULL, 0x00, 0x00 }, // 0x39 CapsLock
{ SCAN_F1, 0x00, 0x00 }, // 0x3A
{ SCAN_F2, 0x00, 0x00 }, // 0x3B
- { SCAN_F3, 0x00, 0x00 }, // 0x3C
- { SCAN_F4, 0x00, 0x00 }, // 0x3D
+ { SCAN_F3, 0x00, 0x00 }, // 0x3C
+ { SCAN_F4, 0x00, 0x00 }, // 0x3D
{ SCAN_F5, 0x00, 0x00 }, // 0x3E
{ SCAN_F6, 0x00, 0x00 }, // 0x3F
{ SCAN_F7, 0x00, 0x00 }, // 0x40
@@ -132,14 +132,14 @@ UINT8 KeyConvertionTable[USB_KEYCODE_MAX_MAKE][3] = { };
STATIC KB_MODIFIER KB_Mod[8] = {
- { MOD_CONTROL_L, 0xe0 }, // 11100000
- { MOD_CONTROL_R, 0xe4 }, // 11100100
- { MOD_SHIFT_L, 0xe1 }, // 11100001
- { MOD_SHIFT_R, 0xe5 }, // 11100101
- { MOD_ALT_L, 0xe2 }, // 11100010
- { MOD_ALT_R, 0xe6 }, // 11100110
- { MOD_WIN_L, 0xe3 }, // 11100011
- { MOD_WIN_R, 0xe7 } // 11100111
+ { MOD_CONTROL_L, 0xe0 }, // 11100000
+ { MOD_CONTROL_R, 0xe4 }, // 11100100
+ { MOD_SHIFT_L, 0xe1 }, // 11100001
+ { MOD_SHIFT_R, 0xe5 }, // 11100101
+ { MOD_ALT_L, 0xe2 }, // 11100010
+ { MOD_ALT_R, 0xe6 }, // 11100110
+ { MOD_WIN_L, 0xe3 }, // 11100011
+ { MOD_WIN_R, 0xe7 } // 11100111
};
@@ -148,16 +148,16 @@ IsUSBKeyboard ( IN EFI_USB_IO_PROTOCOL *UsbIo
)
/*++
-
+
Routine Description:
Uses USB I/O to check whether the device is a USB Keyboard device.
-
+
Arguments:
UsbIo: Points to a USB I/O protocol instance.
-
+
Returns:
-
---*/
+
+--*/
{
EFI_STATUS Status;
EFI_USB_INTERFACE_DESCRIPTOR InterfaceDescriptor;
@@ -192,13 +192,13 @@ InitUSBKeyboard ( IN USB_KB_DEV *UsbKeyboardDevice
)
/*++
-
+
Routine Description:
Initialize USB Keyboard device and all private data structures.
-
+
Arguments:
UsbKeyboardDevice The USB_KB_DEV instance.
-
+
Returns:
EFI_SUCCESS - Success
EFI_DEVICE_ERROR - Hardware Error
@@ -289,7 +289,7 @@ InitUSBKeyboard ( UsbKeyboardDevice->ShiftOn = 0;
UsbKeyboardDevice->NumLockOn = 0;
UsbKeyboardDevice->CapsOn = 0;
- UsbKeyboardDevice->ScrollOn = 0;
+ UsbKeyboardDevice->ScrollOn = 0;
ZeroMem (UsbKeyboardDevice->LastKeyCodeArray, sizeof (UINT8) * 8);
//
@@ -301,8 +301,8 @@ InitUSBKeyboard ( }
Status = gBS->CreateEvent (
- EFI_EVENT_TIMER | EFI_EVENT_NOTIFY_SIGNAL,
- EFI_TPL_NOTIFY,
+ EVT_TIMER | EVT_NOTIFY_SIGNAL,
+ TPL_NOTIFY,
USBKeyboardRepeatHandler,
UsbKeyboardDevice,
&UsbKeyboardDevice->RepeatTimer
@@ -314,8 +314,8 @@ InitUSBKeyboard ( }
Status = gBS->CreateEvent (
- EFI_EVENT_TIMER | EFI_EVENT_NOTIFY_SIGNAL,
- EFI_TPL_NOTIFY,
+ EVT_TIMER | EVT_NOTIFY_SIGNAL,
+ TPL_NOTIFY,
USBKeyboardRecoveryHandler,
UsbKeyboardDevice,
&UsbKeyboardDevice->DelayedRecoveryEvent
@@ -333,21 +333,21 @@ KeyboardHandler ( IN UINT32 Result
)
/*++
-
+
Routine Description:
Handler function for USB Keyboard's asynchronous interrupt transfer.
-
+
Arguments:
Data A pointer to a buffer that is filled with key data which is
retrieved via asynchronous interrupt transfer.
DataLength Indicates the size of the data buffer.
Context Pointing to USB_KB_DEV instance.
Result Indicates the result of the asynchronous interrupt transfer.
-
+
Returns:
EFI_SUCCESS - Success
EFI_DEVICE_ERROR - Hardware Error
---*/
+--*/
{
USB_KB_DEV *UsbKeyboardDevice;
EFI_USB_IO_PROTOCOL *UsbIo;
@@ -402,11 +402,11 @@ KeyboardHandler ( &UsbStatus
);
}
-
+
//
// Delete & Submit this interrupt again
//
-
+
UsbIo->UsbAsyncInterruptTransfer (
UsbIo,
UsbKeyboardDevice->IntEndpointDescriptor.EndpointAddress,
@@ -446,7 +446,7 @@ KeyboardHandler ( if (Index == 8) {
return EFI_SUCCESS;
}
-
+
//
// Parse the modifier key
//
@@ -469,7 +469,7 @@ KeyboardHandler ( InsertKeyCode (&(UsbKeyboardDevice->KeyboardBuffer), KB_Mod[Index].Key, Down);
}
}
-
+
//
// handle normal key's releasing situation
//
@@ -507,7 +507,7 @@ KeyboardHandler ( }
}
}
-
+
//
// original repeat key is released, cancel the repeat timer
//
@@ -518,7 +518,7 @@ KeyboardHandler ( USBKBD_REPEAT_RATE
);
}
-
+
//
// handle normal key's pressing situation
//
@@ -558,7 +558,7 @@ KeyboardHandler ( }
}
}
-
+
//
// Update LastKeycodeArray[] buffer in the
// Usb Keyboard Device data structure.
@@ -566,7 +566,7 @@ KeyboardHandler ( for (Index = 0; Index < 8; Index++) {
UsbKeyboardDevice->LastKeyCodeArray[Index] = CurKeyCodeBuffer[Index];
}
-
+
//
// pre-process KeyboardBuffer, pop out the ctrl,alt,del key in sequence
// and judge whether it will invoke reset event.
@@ -611,7 +611,7 @@ KeyboardHandler ( default:
break;
}
-
+
//
// insert the key back to the buffer.
// so the key sequence will not be destroyed.
@@ -651,18 +651,18 @@ USBParseKey ( OUT UINT8 *KeyChar
)
/*++
-
+
Routine Description:
Retrieves a key character after parsing the raw data in keyboard buffer.
-
+
Arguments:
UsbKeyboardDevice The USB_KB_DEV instance.
KeyChar Points to the Key character after key parsing.
-
+
Returns:
EFI_SUCCESS - Success
- EFI_NOT_READY - Device is not ready
---*/
+ EFI_NOT_READY - Device is not ready
+--*/
{
USB_KEY UsbKey;
@@ -698,7 +698,7 @@ USBParseKey ( continue;
}
-
+
//
// Analyzes key pressing situation
//
@@ -762,7 +762,7 @@ USBParseKey ( UsbKeyboardDevice->ScrollOn ^= 1;
SetKeyLED (UsbKeyboardDevice);
continue;
- break;
+ break;
case 0x48:
//
// fall through
@@ -775,7 +775,7 @@ USBParseKey ( default:
break;
}
-
+
//
// When encountered Del Key...
//
@@ -801,15 +801,15 @@ USBKeyCodeToEFIScanCode ( OUT EFI_INPUT_KEY *Key
)
/*++
-
+
Routine Description:
Converts USB Keyboard code to EFI Scan Code.
-
- Arguments:
+
+ Arguments:
UsbKeyboardDevice The USB_KB_DEV instance.
- KeyChar Indicates the key code that will be interpreted.
- Key A pointer to a buffer that is filled in with
- the keystroke information for the key that
+ KeyChar Indicates the key code that will be interpreted.
+ Key A pointer to a buffer that is filled in with
+ the keystroke information for the key that
was pressed.
Returns:
EFI_NOT_READY - Device is not ready
@@ -821,7 +821,7 @@ USBKeyCodeToEFIScanCode ( if (!USBKBD_VALID_KEYCODE (KeyChar)) {
return EFI_NOT_READY;
}
-
+
//
// valid USB Key Code starts from 4
//
@@ -881,16 +881,16 @@ InitUSBKeyBuffer ( IN OUT USB_KB_BUFFER *KeyboardBuffer
)
/*++
-
+
Routine Description:
Resets USB Keyboard Buffer.
-
+
Arguments:
KeyboardBuffer - Points to the USB Keyboard Buffer.
-
+
Returns:
EFI_SUCCESS - Success
---*/
+--*/
{
ZeroMem (KeyboardBuffer, sizeof (USB_KB_BUFFER));
@@ -904,15 +904,15 @@ IsUSBKeyboardBufferEmpty ( IN USB_KB_BUFFER *KeyboardBuffer
)
/*++
-
+
Routine Description:
Check whether USB Keyboard buffer is empty.
-
+
Arguments:
KeyboardBuffer - USB Keyboard Buffer.
-
+
Returns:
-
+
--*/
{
//
@@ -927,18 +927,18 @@ IsUSBKeyboardBufferFull ( IN USB_KB_BUFFER *KeyboardBuffer
)
/*++
-
+
Routine Description:
Check whether USB Keyboard buffer is full.
-
+
Arguments:
KeyboardBuffer - USB Keyboard Buffer.
-
+
Returns:
-
+
--*/
{
- return (BOOLEAN)(((KeyboardBuffer->bTail + 1) % (MAX_KEY_ALLOWED + 1)) ==
+ return (BOOLEAN)(((KeyboardBuffer->bTail + 1) % (MAX_KEY_ALLOWED + 1)) ==
KeyboardBuffer->bHead);
}
@@ -950,10 +950,10 @@ InsertKeyCode ( IN UINT8 Down
)
/*++
-
+
Routine Description:
Inserts a key code into keyboard buffer.
-
+
Arguments:
KeyboardBuffer - Points to the USB Keyboard Buffer.
Key - Key code
@@ -989,18 +989,18 @@ RemoveKeyCode ( OUT USB_KEY *UsbKey
)
/*++
-
+
Routine Description:
Pops a key code off from keyboard buffer.
-
+
Arguments:
KeyboardBuffer - Points to the USB Keyboard Buffer.
UsbKey - Points to the buffer that contains a usb key code.
-
+
Returns:
EFI_SUCCESS - Success
EFI_DEVICE_ERROR - Hardware Error
---*/
+--*/
{
if (IsUSBKeyboardBufferEmpty (KeyboardBuffer)) {
return EFI_DEVICE_ERROR;
@@ -1022,16 +1022,16 @@ SetKeyLED ( IN USB_KB_DEV *UsbKeyboardDevice
)
/*++
-
+
Routine Description:
Sets USB Keyboard LED state.
-
+
Arguments:
UsbKeyboardDevice - The USB_KB_DEV instance.
-
+
Returns:
EFI_SUCCESS - Success
---*/
+--*/
{
LED_MAP Led;
UINT8 ReportId;
@@ -1041,7 +1041,7 @@ SetKeyLED ( //
Led.NumLock = (UINT8) UsbKeyboardDevice->NumLockOn;
Led.CapsLock = (UINT8) UsbKeyboardDevice->CapsOn;
- Led.ScrollLock = (UINT8) UsbKeyboardDevice->ScrollOn;
+ Led.ScrollLock = (UINT8) UsbKeyboardDevice->ScrollOn;
Led.Resrvd = 0;
ReportId = 0;
@@ -1067,17 +1067,17 @@ USBKeyboardRepeatHandler ( IN VOID *Context
)
/*++
-
+
Routine Description:
Timer handler for Repeat Key timer.
-
+
Arguments:
Event - The Repeat Key event.
Context - Points to the USB_KB_DEV instance.
-
+
Returns:
-
---*/
+
+--*/
{
USB_KB_DEV *UsbKeyboardDevice;
@@ -1115,17 +1115,17 @@ USBKeyboardRecoveryHandler ( IN VOID *Context
)
/*++
-
+
Routine Description:
Timer handler for Delayed Recovery timer.
-
+
Arguments:
Event - The Delayed Recovery event.
Context - Points to the USB_KB_DEV instance.
-
+
Returns:
-
---*/
+
+--*/
{
USB_KB_DEV *UsbKeyboardDevice;
diff --git a/EdkModulePkg/Bus/Usb/UsbMassStorage/Dxe/UsbMassStorage.c b/EdkModulePkg/Bus/Usb/UsbMassStorage/Dxe/UsbMassStorage.c index 9caa006..daaf3f8 100644 --- a/EdkModulePkg/Bus/Usb/UsbMassStorage/Dxe/UsbMassStorage.c +++ b/EdkModulePkg/Bus/Usb/UsbMassStorage/Dxe/UsbMassStorage.c @@ -352,7 +352,7 @@ USBFloppyReset ( EFI_STATUS Status;
EFI_TPL OldTpl;
- OldTpl = gBS->RaiseTPL (EFI_TPL_CALLBACK);
+ OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
UsbFloppyDevice = USB_FLOPPY_DEV_FROM_THIS (This);
@@ -426,7 +426,7 @@ USBFloppyReadBlocks ( return EFI_SUCCESS;
}
- OldTpl = gBS->RaiseTPL (EFI_TPL_CALLBACK);
+ OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
UsbFloppyTestUnitReady (UsbFloppyDevice);
@@ -572,7 +572,7 @@ USBFloppyWriteBlocks ( return EFI_SUCCESS;
}
- OldTpl = gBS->RaiseTPL (EFI_TPL_CALLBACK);
+ OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
UsbFloppyTestUnitReady (UsbFloppyDevice);
diff --git a/EdkModulePkg/Bus/Usb/UsbMouse/Dxe/usbmouse.c b/EdkModulePkg/Bus/Usb/UsbMouse/Dxe/usbmouse.c index f7449eb..a3fc6c7 100644 --- a/EdkModulePkg/Bus/Usb/UsbMouse/Dxe/usbmouse.c +++ b/EdkModulePkg/Bus/Usb/UsbMouse/Dxe/usbmouse.c @@ -1,13 +1,13 @@ /*++
-Copyright (c) 2006, Intel Corporation
-All rights reserved. This program and the accompanying materials
-are licensed and made available under the terms and conditions of the BSD License
-which accompanies this distribution. The full text of the license may be found at
-http://opensource.org/licenses/bsd-license.php
-
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+Copyright (c) 2006, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
Module Name:
@@ -127,7 +127,7 @@ USBMouseDriverBindingSupported ( if (OpenStatus == EFI_ALREADY_STARTED) {
return EFI_ALREADY_STARTED;
}
-
+
//
// Use the USB I/O protocol interface to see the Controller is
// the Mouse controller that can be managed by this driver.
@@ -283,8 +283,8 @@ USBMouseDriverBindingStart ( UsbMouseDevice->SimplePointerProtocol.Mode = &UsbMouseDevice->Mode;
Status = gBS->CreateEvent (
- EFI_EVENT_NOTIFY_WAIT,
- EFI_TPL_NOTIFY,
+ EVT_NOTIFY_WAIT,
+ TPL_NOTIFY,
UsbMouseWaitForInput,
UsbMouseDevice,
&((UsbMouseDevice->SimplePointerProtocol).WaitForInput)
@@ -304,13 +304,13 @@ USBMouseDriverBindingStart ( Status = EFI_DEVICE_ERROR;
goto ErrorExit;
}
-
+
//
// After Enabling Async Interrupt Transfer on this mouse Device
// we will be able to get key data from it. Thus this is deemed as
// the enable action of the mouse
//
-
+
MouseReportStatusCode (
UsbMouseDevice->DevicePath,
EFI_PROGRESS_CODE,
@@ -677,8 +677,8 @@ InitializeUsbMouseDevice ( }
Status = gBS->CreateEvent (
- EFI_EVENT_TIMER | EFI_EVENT_NOTIFY_SIGNAL,
- EFI_TPL_NOTIFY,
+ EVT_TIMER | EVT_NOTIFY_SIGNAL,
+ TPL_NOTIFY,
USBMouseRecoveryHandler,
UsbMouseDev,
&UsbMouseDev->DelayedRecoveryEvent
@@ -805,11 +805,11 @@ GetMouseState ( Routine Description:
Get the mouse state, see SIMPLE POINTER PROTOCOL.
-
+
Arguments:
This - Protocol instance pointer.
MouseState - Current mouse state
-
+
Returns:
EFI_SUCCESS
EFI_DEVICE_ERROR
@@ -858,11 +858,11 @@ UsbMouseReset ( Routine Description:
Reset the mouse device, see SIMPLE POINTER PROTOCOL.
-
+
Arguments:
This - Protocol instance pointer.
ExtendedVerification - Ignored here/
-
+
Returns:
EFI_SUCCESS
@@ -928,17 +928,17 @@ USBMouseRecoveryHandler ( IN VOID *Context
)
/*++
-
+
Routine Description:
Timer handler for Delayed Recovery timer.
-
+
Arguments:
Event - The Delayed Recovery event.
Context - Points to the USB_KB_DEV instance.
-
+
Returns:
-
---*/
+
+--*/
{
USB_MOUSE_DEV *UsbMouseDev;
EFI_USB_IO_PROTOCOL *UsbIo;
|