From 597f4ee21c004a25d77d0417e9de7f6d5f9aace5 Mon Sep 17 00:00:00 2001 From: qwang12 Date: Wed, 4 Feb 2009 06:56:31 +0000 Subject: [PATCH] 1) Fix a typo in EhcMoniteAsyncRequests. 2) Code cleanup. 3) Doxygen comment cleanup. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7428 6f19259b-4bc3-4df7-8a09-765794883524 --- MdeModulePkg/Bus/Pci/EhciDxe/Ehci.c | 4 ++-- MdeModulePkg/Bus/Pci/EhciDxe/Ehci.h | 15 +++++++-------- MdeModulePkg/Bus/Pci/EhciDxe/EhciDebug.c | 10 +--------- MdeModulePkg/Bus/Pci/EhciDxe/EhciDebug.h | 8 +------- MdeModulePkg/Bus/Pci/EhciDxe/EhciDxe.inf | 6 +++--- MdeModulePkg/Bus/Pci/EhciDxe/EhciReg.c | 12 +----------- MdeModulePkg/Bus/Pci/EhciDxe/EhciReg.h | 8 +------- MdeModulePkg/Bus/Pci/EhciDxe/EhciSched.c | 22 +++------------------- MdeModulePkg/Bus/Pci/EhciDxe/EhciSched.h | 18 ++---------------- MdeModulePkg/Bus/Pci/EhciDxe/EhciUrb.c | 8 +------- MdeModulePkg/Bus/Pci/EhciDxe/EhciUrb.h | 4 +--- MdeModulePkg/Bus/Pci/EhciDxe/UsbHcMem.c | 10 +--------- MdeModulePkg/Bus/Pci/EhciDxe/UsbHcMem.h | 4 +--- 13 files changed, 25 insertions(+), 104 deletions(-) diff --git a/MdeModulePkg/Bus/Pci/EhciDxe/Ehci.c b/MdeModulePkg/Bus/Pci/EhciDxe/Ehci.c index 0667fa645d..c8de7052bb 100644 --- a/MdeModulePkg/Bus/Pci/EhciDxe/Ehci.c +++ b/MdeModulePkg/Bus/Pci/EhciDxe/Ehci.c @@ -2,7 +2,7 @@ The Ehci controller driver. -Copyright (c) 2006 - 2008, Intel Corporation +Copyright (c) 2006 - 2009, 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 @@ -1436,7 +1436,7 @@ EhcCreateUsb2Hc ( Status = gBS->CreateEvent ( EVT_TIMER | EVT_NOTIFY_SIGNAL, TPL_CALLBACK, - EhcMoniteAsyncRequests, + EhcMonitorAsyncRequests, Ehc, &Ehc->PollTimer ); diff --git a/MdeModulePkg/Bus/Pci/EhciDxe/Ehci.h b/MdeModulePkg/Bus/Pci/EhciDxe/Ehci.h index f2fdb929a9..85772fb30d 100644 --- a/MdeModulePkg/Bus/Pci/EhciDxe/Ehci.h +++ b/MdeModulePkg/Bus/Pci/EhciDxe/Ehci.h @@ -2,7 +2,7 @@ Provides some data struct used by EHCI controller driver. -Copyright (c) 2006 - 2007, Intel Corporation +Copyright (c) 2006 - 2009, 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 @@ -67,14 +67,12 @@ typedef enum { } EHC_TIMEOUT_EXPERIENCE_VALUE; - // - // EHC raises TPL to TPL_NOTIFY to serialize all its operations - // to protect shared data structures. - // +// +// EHC raises TPL to TPL_NOTIFY to serialize all its operations +// to protect shared data structures. +// #define EHC_TPL TPL_NOTIFY -#define USB2_HC_DEV_SIGNATURE SIGNATURE_32 ('e', 'h', 'c', 'i') - // //Iterate through the doule linked list. NOT delete safe // @@ -99,7 +97,8 @@ typedef enum { #define EHC_REG_BIT_IS_SET(Ehc, Offset, Bit) \ (EHC_BIT_IS_SET(EhcReadOpReg ((Ehc), (Offset)), (Bit))) -#define EHC_FROM_THIS(a) CR(a, USB2_HC_DEV, Usb2Hc, USB2_HC_DEV_SIGNATURE) +#define USB2_HC_DEV_SIGNATURE SIGNATURE_32 ('e', 'h', 'c', 'i') +#define EHC_FROM_THIS(a) CR(a, USB2_HC_DEV, Usb2Hc, USB2_HC_DEV_SIGNATURE) struct _USB2_HC_DEV { UINTN Signature; diff --git a/MdeModulePkg/Bus/Pci/EhciDxe/EhciDebug.c b/MdeModulePkg/Bus/Pci/EhciDxe/EhciDebug.c index 7177c33aa7..892021c1c0 100644 --- a/MdeModulePkg/Bus/Pci/EhciDxe/EhciDebug.c +++ b/MdeModulePkg/Bus/Pci/EhciDxe/EhciDebug.c @@ -2,7 +2,7 @@ This file provides the information dump support for EHCI when in debug mode. -Copyright (c) 2007, Intel Corporation +Copyright (c) 2007 - 2009, 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 @@ -21,8 +21,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. @param State The state in the QTD/QH. - @return None. - **/ VOID EhcDumpStatus ( @@ -71,8 +69,6 @@ EhcDumpStatus ( @param Qtd The QTD to dump. @param Msg The message to print before the dump. - @return None - **/ VOID EhcDumpQtd ( @@ -126,8 +122,6 @@ EhcDumpQtd ( @param Msg The message to print before the dump. @param DumpBuf Whether to dump the memory buffer of the associated QTD. - @return None - **/ VOID EhcDumpQh ( @@ -214,8 +208,6 @@ EhcDumpQh ( @param Buf The buffer to dump. @param Len The length of buffer. - @return None. - **/ VOID EhcDumpBuf ( diff --git a/MdeModulePkg/Bus/Pci/EhciDxe/EhciDebug.h b/MdeModulePkg/Bus/Pci/EhciDxe/EhciDebug.h index 3f786bc285..889047c7a7 100644 --- a/MdeModulePkg/Bus/Pci/EhciDxe/EhciDebug.h +++ b/MdeModulePkg/Bus/Pci/EhciDxe/EhciDebug.h @@ -2,7 +2,7 @@ This file contains the definination for host controller debug support routines. -Copyright (c) 2007, Intel Corporation +Copyright (c) 2007 - 2009, 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 @@ -23,8 +23,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. @param Qtd The QTD to dump. @param Msg The message to print before the dump. - @return None. - **/ VOID EhcDumpQtd ( @@ -40,8 +38,6 @@ EhcDumpQtd ( @param Msg The message to print before the dump. @param DumpBuf Whether to dump the memory buffer of the associated QTD. - @return None. - **/ VOID EhcDumpQh ( @@ -57,8 +53,6 @@ EhcDumpQh ( @param Buf The buffer to dump. @param Len The length of buffer. - @return None. - **/ VOID EhcDumpBuf ( diff --git a/MdeModulePkg/Bus/Pci/EhciDxe/EhciDxe.inf b/MdeModulePkg/Bus/Pci/EhciDxe/EhciDxe.inf index a37d55a9fa..78ab813efe 100644 --- a/MdeModulePkg/Bus/Pci/EhciDxe/EhciDxe.inf +++ b/MdeModulePkg/Bus/Pci/EhciDxe/EhciDxe.inf @@ -6,7 +6,7 @@ # It implements the interfaces of monitoring the status of all ports and transferring # Control, Bulk, Interrupt and Isochronous requests to Usb2.0 device. # -# Copyright (c) 2006 - 2008, Intel Corporation. +# Copyright (c) 2006 - 2009, 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 @@ -72,8 +72,8 @@ PcdLib [Protocols] - gEfiPciIoProtocolGuid ## ALWAYS_CONSUMED - gEfiUsb2HcProtocolGuid ## ALWAYS_PRODUCED + gEfiPciIoProtocolGuid ## CONSUMES + gEfiUsb2HcProtocolGuid ## PRODUCES # [Event] # ## diff --git a/MdeModulePkg/Bus/Pci/EhciDxe/EhciReg.c b/MdeModulePkg/Bus/Pci/EhciDxe/EhciReg.c index 87a41e1e88..eca9b0b272 100644 --- a/MdeModulePkg/Bus/Pci/EhciDxe/EhciReg.c +++ b/MdeModulePkg/Bus/Pci/EhciDxe/EhciReg.c @@ -2,7 +2,7 @@ The EHCI register operation routines. -Copyright (c) 2007, Intel Corporation +Copyright (c) 2007 - 2009, 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 @@ -100,8 +100,6 @@ EhcReadOpReg ( @param Offset EHCI operation register offset. @param Data The data to write. - @return None. - **/ VOID EhcWriteOpReg ( @@ -136,8 +134,6 @@ EhcWriteOpReg ( @param Offset The offset of the operational register. @param Bit The bit mask of the register to set. - @return None. - **/ VOID EhcSetOpRegBit ( @@ -161,8 +157,6 @@ EhcSetOpRegBit ( @param Offset The offset of the operational register. @param Bit The bit mask of the register to clear. - @return None. - **/ VOID EhcClearOpRegBit ( @@ -222,8 +216,6 @@ EhcWaitOpRegBit ( @param Ehc The EHCI device. - @return None. - **/ VOID EhcClearLegacySupport ( @@ -308,8 +300,6 @@ EhcSetAndWaitDoorBell ( @param Ehc The EHCI device. - @return None. - **/ VOID EhcAckAllInterrupt ( diff --git a/MdeModulePkg/Bus/Pci/EhciDxe/EhciReg.h b/MdeModulePkg/Bus/Pci/EhciDxe/EhciReg.h index f6ca764673..23f794381f 100644 --- a/MdeModulePkg/Bus/Pci/EhciDxe/EhciReg.h +++ b/MdeModulePkg/Bus/Pci/EhciDxe/EhciReg.h @@ -2,7 +2,7 @@ This file contains the definination for host controller register operation routines. -Copyright (c) 2007, Intel Corporation +Copyright (c) 2007 - 2009, 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 @@ -154,8 +154,6 @@ EhcReadOpReg ( @param Offset EHCI operation register offset. @param Data The data to write. - @return None. - **/ VOID EhcWriteOpReg ( @@ -171,8 +169,6 @@ EhcWriteOpReg ( @param Ehc The EHCI device. - @return None. - **/ VOID EhcClearLegacySupport ( @@ -204,8 +200,6 @@ EhcSetAndWaitDoorBell ( @param Ehc The EHCI device. - @return None. - **/ VOID EhcAckAllInterrupt ( diff --git a/MdeModulePkg/Bus/Pci/EhciDxe/EhciSched.c b/MdeModulePkg/Bus/Pci/EhciDxe/EhciSched.c index 936a855f12..0c5195e318 100644 --- a/MdeModulePkg/Bus/Pci/EhciDxe/EhciSched.c +++ b/MdeModulePkg/Bus/Pci/EhciDxe/EhciSched.c @@ -2,7 +2,7 @@ EHCI transfer scheduling routines. -Copyright (c) 2007, Intel Corporation +Copyright (c) 2007 - 2009, 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 @@ -208,8 +208,6 @@ EhcInitSched ( @param Ehc The EHCI device. - @return None. - **/ VOID EhcFreeSched ( @@ -268,8 +266,6 @@ EhcFreeSched ( @param Ehc The EHCI device. @param Qh The queue head to link. - @return None. - **/ VOID EhcLinkQhToAsync ( @@ -301,8 +297,6 @@ EhcLinkQhToAsync ( @param Ehc The EHCI device. @param Qh The queue head to unlink. - @return None. - **/ VOID EhcUnlinkQhFromAsync ( @@ -346,8 +340,6 @@ EhcUnlinkQhFromAsync ( @param Ehc The EHCI device. @param Qh The queue head to link. - @return None. - **/ VOID EhcLinkQhToPeriod ( @@ -447,8 +439,6 @@ EhcLinkQhToPeriod ( @param Ehc The EHCI device. @param Qh The queue head to unlink. - @return None. - **/ VOID EhcUnlinkQhFromPeriod ( @@ -734,8 +724,6 @@ EhciDelAsyncIntTransfer ( @param Ehc The EHCI device. - @return None. - **/ VOID EhciDelAllAsyncIntTransfers ( @@ -817,8 +805,6 @@ ON_ERROR: @param Urb The URB to update. - @return None. - **/ VOID EhcUpdateAsyncRequest ( @@ -895,11 +881,9 @@ EhcUpdateAsyncRequest ( @param Event Interrupt event. @param Context Pointer to USB2_HC_DEV. - @return None. - **/ VOID -EhcMoniteAsyncRequests ( +EhcMonitorAsyncRequests ( IN EFI_EVENT Event, IN VOID *Context ) @@ -935,7 +919,7 @@ EhcMoniteAsyncRequests ( // Status = EhcFlushAsyncIntMap (Ehc, Urb); if (EFI_ERROR (Status)) { - DEBUG ((EFI_D_ERROR, "EhcMoniteAsyncRequests: Fail to Flush AsyncInt Mapped Memeory\n")); + DEBUG ((EFI_D_ERROR, "EhcMonitorAsyncRequests: Fail to Flush AsyncInt Mapped Memeory\n")); } // diff --git a/MdeModulePkg/Bus/Pci/EhciDxe/EhciSched.h b/MdeModulePkg/Bus/Pci/EhciDxe/EhciSched.h index fb002a91c5..6a1bf0b86f 100644 --- a/MdeModulePkg/Bus/Pci/EhciDxe/EhciSched.h +++ b/MdeModulePkg/Bus/Pci/EhciDxe/EhciSched.h @@ -2,7 +2,7 @@ This file contains the definination for host controller schedule routines. -Copyright (c) 2007, Intel Corporation +Copyright (c) 2007 - 2009, 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 @@ -37,8 +37,6 @@ EhcInitSched ( @param Ehc The EHCI device. - @return None - **/ VOID EhcFreeSched ( @@ -56,8 +54,6 @@ EhcFreeSched ( @param Ehc The EHCI device. @param Qh The queue head to link. - @return None. - **/ VOID EhcLinkQhToAsync ( @@ -73,8 +69,6 @@ EhcLinkQhToAsync ( @param Ehc The EHCI device. @param Qh The queue head to unlink. - @return None. - **/ VOID EhcUnlinkQhFromAsync ( @@ -91,8 +85,6 @@ EhcUnlinkQhFromAsync ( @param Ehc The EHCI device. @param Qh The queue head to link. - @return None. - **/ VOID EhcLinkQhToPeriod ( @@ -108,8 +100,6 @@ EhcLinkQhToPeriod ( @param Ehc The EHCI device. @param Qh The queue head to unlink. - @return None. - **/ VOID EhcUnlinkQhFromPeriod ( @@ -166,8 +156,6 @@ EhciDelAsyncIntTransfer ( @param Ehc The EHCI device. - @return None. - **/ VOID EhciDelAllAsyncIntTransfers ( @@ -181,11 +169,9 @@ EhciDelAllAsyncIntTransfers ( @param Event Interrupt event. @param Context Pointer to USB2_HC_DEV. - @return None. - **/ VOID -EhcMoniteAsyncRequests ( +EhcMonitorAsyncRequests ( IN EFI_EVENT Event, IN VOID *Context ); diff --git a/MdeModulePkg/Bus/Pci/EhciDxe/EhciUrb.c b/MdeModulePkg/Bus/Pci/EhciDxe/EhciUrb.c index 4d8e38be2c..6d1bf9b336 100644 --- a/MdeModulePkg/Bus/Pci/EhciDxe/EhciUrb.c +++ b/MdeModulePkg/Bus/Pci/EhciDxe/EhciUrb.c @@ -3,7 +3,7 @@ This file contains URB request, each request is warpped in a URB (Usb Request Block). -Copyright (c) 2007, Intel Corporation +Copyright (c) 2007 - 2009, 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 @@ -125,8 +125,6 @@ EhcCreateQtd ( @param Ep The queue head's related endpoint. @param QhHw The queue head to initialize. - @return None. - **/ VOID EhcInitIntQh ( @@ -293,8 +291,6 @@ EhcConvertPollRate ( @param Ehc The EHCI device. @param Qtds The list head of the QTD. - @return None. - **/ VOID EhcFreeQtds ( @@ -321,8 +317,6 @@ EhcFreeQtds ( @param Ehc The EHCI device. @param Urb The URB to free. - @return None. - **/ VOID EhcFreeUrb ( diff --git a/MdeModulePkg/Bus/Pci/EhciDxe/EhciUrb.h b/MdeModulePkg/Bus/Pci/EhciDxe/EhciUrb.h index 7b66184a19..1079be003b 100644 --- a/MdeModulePkg/Bus/Pci/EhciDxe/EhciUrb.h +++ b/MdeModulePkg/Bus/Pci/EhciDxe/EhciUrb.h @@ -3,7 +3,7 @@ This file contains URB request, each request is warpped in a URB (Usb Request Block). -Copyright (c) 2007, Intel Corporation +Copyright (c) 2007 - 2009, 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 @@ -287,8 +287,6 @@ EhcCreateQh ( @param Ehc The EHCI device. @param Urb The URB to free. - @return None. - **/ VOID EhcFreeUrb ( diff --git a/MdeModulePkg/Bus/Pci/EhciDxe/UsbHcMem.c b/MdeModulePkg/Bus/Pci/EhciDxe/UsbHcMem.c index 92d7bf7a84..af8070e569 100644 --- a/MdeModulePkg/Bus/Pci/EhciDxe/UsbHcMem.c +++ b/MdeModulePkg/Bus/Pci/EhciDxe/UsbHcMem.c @@ -2,7 +2,7 @@ Routine procedures for memory allocate/free. -Copyright (c) 2007, Intel Corporation +Copyright (c) 2007 - 2009, 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 @@ -124,8 +124,6 @@ FREE_BITARRAY: @param Pool The memory pool to free the block from. @param Block The memory block to free. - @return None. - **/ VOID UsbHcFreeMemBlock ( @@ -230,8 +228,6 @@ UsbHcAllocMemFromBlock ( @param Head The head of the memory pool's block list. @param Block The memory block to insert. - @return None. - **/ VOID UsbHcInsertMemBlockToPool ( @@ -277,8 +273,6 @@ UsbHcIsMemBlockEmpty ( @param Head The block list head of the memory's pool. @param BlockToUnlink The memory block to unlink. - @return None. - **/ VOID UsbHcUnlinkMemBlock ( @@ -459,8 +453,6 @@ UsbHcAllocateMem ( @param Mem The memory to free. @param Size The size of the memory to free. - @return None. - **/ VOID UsbHcFreeMem ( diff --git a/MdeModulePkg/Bus/Pci/EhciDxe/UsbHcMem.h b/MdeModulePkg/Bus/Pci/EhciDxe/UsbHcMem.h index 944acdc11e..c835b66d7a 100644 --- a/MdeModulePkg/Bus/Pci/EhciDxe/UsbHcMem.h +++ b/MdeModulePkg/Bus/Pci/EhciDxe/UsbHcMem.h @@ -2,7 +2,7 @@ This file contains the definination for host controller memory management routines. -Copyright (c) 2007, Intel Corporation +Copyright (c) 2007 - 2009, 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 @@ -133,8 +133,6 @@ UsbHcAllocateMem ( @param Mem The memory to free. @param Size The size of the memory to free. - @return None. - **/ VOID UsbHcFreeMem ( -- 2.39.2