summaryrefslogtreecommitdiffstats
path: root/MdeModulePkg/Bus/Pci/EhciDxe/EhciSched.c
Commit message (Collapse)AuthorAgeFilesLines
* MdeModulePkg: Update code to be more C11 compliant by using __func__Rebecca Cran2023-04-101-2/+2
| | | | | | | | | | | | __FUNCTION__ is a pre-standard extension that gcc and Visual C++ among others support, while __func__ was standardized in C99. Since it's more standard, replace __FUNCTION__ with __func__ throughout MdeModulePkg. Signed-off-by: Rebecca Cran <rebecca@bsdio.com> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
* MdeModulePkg: Put USB DEBUGs that occur for bulk timeouts under VERBOSERebecca Cran2022-12-081-1/+1
| | | | | | | | | | | | | | | With the pending commit of UsbNetworkPkg, it will become common for UsbBulkTransfer calls to timeout, given that the drivers are called from MnpSystemPoll every MNP_SYS_POLL_INTERVAL milliseconds: the drivers check for network packets by calling UsbBulkTransfer with a timeout of 1ms. Avoid console spam by moving DEBUG messages that occur each time a bulk transfer request times out from DEBUG_ERROR to DEBUG_VERBOSE, for both EHCI and XHCI drivers. Signed-off-by: Rebecca Cran <rebecca@quicinc.com> Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
* MdeModulePkg: Apply uncrustify changesMichael Kubacki2021-12-071-198/+183
| | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3737 Apply uncrustify changes to .c/.h files in the MdeModulePkg package Cc: Andrew Fish <afish@apple.com> Cc: Leif Lindholm <leif@nuviainc.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
* MdeModulePkg: Change use of EFI_D_* to DEBUG_*Michael D Kinney2021-12-071-6/+6
| | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3739 Update all use of EFI_D_* defines in DEBUG() macros to DEBUG_* defines. Cc: Andrew Fish <afish@apple.com> Cc: Leif Lindholm <leif@nuviainc.com> Cc: Michael Kubacki <michael.kubacki@microsoft.com> Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
* MdeModulePkg/EhciDxe: Use BaseLib linked list iteration macrosMichael Kubacki2020-04-211-5/+6
| | | | | | | | | | | | | | | | | | | REF:https://bugzilla.tianocore.org/show_bug.cgi?id=1959 Replaces usage of the linked list iteration macros defined in Ehci.h with the common definition in BaseLib.h. Cc: Dandan Bi <dandan.bi@intel.com> Cc: Hao A Wu <hao.a.wu@intel.com> Cc: Jian J Wang <jian.j.wang@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Ray Ni <ray.ni@intel.com> Cc: Sean Brogan <sean.brogan@microsoft.com> Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com> Reviewed-by: Guomin Jiang <guomin.jiang@intel.com> Reviewed-by: Hao A Wu <hao.a.wu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Bret Barkelew <bret.barkelew@microsoft.com>
* MdeModulePkg: Replace BSD License with BSD+Patent LicenseMichael D Kinney2019-04-091-7/+1
| | | | | | | | | | | | | | | | | | | | | https://bugzilla.tianocore.org/show_bug.cgi?id=1373 Replace BSD 2-Clause License with BSD+Patent License. This change is based on the following emails: https://lists.01.org/pipermail/edk2-devel/2019-February/036260.html https://lists.01.org/pipermail/edk2-devel/2018-October/030385.html RFCs with detailed process for the license change: V3: https://lists.01.org/pipermail/edk2-devel/2019-March/038116.html V2: https://lists.01.org/pipermail/edk2-devel/2019-March/037669.html V1: https://lists.01.org/pipermail/edk2-devel/2019-March/037500.html Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Jian J Wang <jian.j.wang@intel.com>
* Revert "EhciDxe: Use common buffer for AsyncInterruptTransfer"Star Zeng2018-11-071-2/+76
| | | | | | | | | | | | There is concern at the thread https://lists.01.org/pipermail/edk2-devel/2018-November/031951.html. And the time point is a little sensitive as it is near edk2-stable201811. This reverts commit 0cd645250306b244a5d6e0e293ed1786ec101641. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
* MdeModulePkg EhciDxe: Use common buffer for AsyncInterruptTransferStar Zeng2018-10-281-76/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1274 In current code, EhcMonitorAsyncRequests (timer handler) will do unmap and map operations for AsyncIntTransfers to "Flush data from PCI controller specific address to mapped system memory address". EhcMonitorAsyncRequests EhcFlushAsyncIntMap PciIo->Unmap IoMmu->SetAttribute PciIo->Map IoMmu->SetAttribute This may impact the boot performance. Since the data buffer for EhcMonitorAsyncRequests is internal buffer, we can allocate common buffer by PciIo->AllocateBuffer and map the buffer with EfiPciIoOperationBusMasterCommonBuffer, then the unmap and map operations can be removed. /// /// Provides both read and write access to system memory by /// both the processor and a bus master. The buffer is coherent /// from both the processor's and the bus master's point of view. /// EfiPciIoOperationBusMasterCommonBuffer, Test done: USB KB works normally. USB disk read/write works normally. Cc: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Hao Wu <hao.a.wu@intel.com> Cc: Jian J Wang <jian.j.wang@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Hao Wu <hao.a.wu@intel.com>
* MdeModulePkg EhciDxe: Extract new EhciInsertAsyncIntTransfer functionStar Zeng2018-10-281-0/+76
| | | | | | | | | | | | | | | | | | | | | | | | | V3: Match function parameter name and description between EhciSched.c and EhciSched.h. V2: Add the missing "gBS->FreePool (Data);". REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1274 Extract new EhciInsertAsyncIntTransfer function from EhcAsyncInterruptTransfer. It is code preparation for following patch, no essential functional change. Cc: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Hao Wu <hao.a.wu@intel.com> Cc: Jian J Wang <jian.j.wang@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Hao Wu <hao.a.wu@intel.com>
* MdeModulePkg/Usb: Make sure data from HW is no more than expectedRuiyu Ni2018-10-171-3/+6
| | | | | | | | | | Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Star Zeng <star.zeng@intel.com> Cc: Hao A Wu <hao.a.wu@intel.com> Reviewed-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
* MdeModulePkg: Clean up source filesLiming Gao2018-06-281-2/+2
| | | | | | | | | | 1. Do not use tab characters 2. No trailing white space in one line 3. All files must end with CRLF Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
* MdeModulePkg/EhciDxe: enable 64-bit PCI DMAArd Biesheuvel2016-09-061-1/+1
| | | | | | | | | | PCI controller drivers must set the EFI_PCI_IO_ATTRIBUTE_DUAL_ADDRESS_CYCLE attribute if the controller supports 64-bit DMA addressing. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Feng Tian <feng.tian@Intel.com>
* MdeModulePkg/Usb: Update some debug messages’ print level to EFI_D_VERBOSEFeng Tian2013-07-051-2/+2
| | | | | | | | Signed-off-by: Feng Tian <feng.tian@intel.com> Reviewed-by: Elvin Li <elvin.li@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14459 6f19259b-4bc3-4df7-8a09-765794883524
* MdeModulePkg/Usb: Boost the r/w performance by reducing stall time on ↵Feng Tian2013-06-241-3/+3
| | | | | | | | | | | polling cmd execution status Signed-off-by: Feng Tian <feng.tian@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Elvin Li <elvin.li@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14442 6f19259b-4bc3-4df7-8a09-765794883524
* when timeout is 0, infinite loop on the timeout request to follow UEFI specerictian2011-03-041-5/+16
| | | | git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11343 6f19259b-4bc3-4df7-8a09-765794883524
* Update the copyright notice formathhtian2010-04-241-2/+2
| | | | git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10420 6f19259b-4bc3-4df7-8a09-765794883524
* Fix a bug that usb keybarod can not work well when it is inserted at a usb ↵erictian2010-03-191-1/+6
| | | | | | | | 2.0 hub. It's due to AsyncInterruptList does not update the corresponding QTDHw->Data with pci bus master address. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10286 6f19259b-4bc3-4df7-8a09-765794883524
* uniform the sw and hw expression to avoid confusing. it does not effect hw ↵erictian2010-03-041-3/+4
| | | | | | function. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10186 6f19259b-4bc3-4df7-8a09-765794883524
* Minor bug fix and robustness check improvement.rsun32010-03-031-4/+7
| | | | git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10168 6f19259b-4bc3-4df7-8a09-765794883524
* update Ehci driver to distinct pci memory address and host addresserictian2010-02-281-28/+64
| | | | git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10121 6f19259b-4bc3-4df7-8a09-765794883524
* Improve coding style in MdeModulePkg.rsun32010-01-191-2/+2
| | | | git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9793 6f19259b-4bc3-4df7-8a09-765794883524
* update code to eliminate the wrong assumption that pci address is equal to ↵eric_tian2009-10-141-20/+42
| | | | | | host address in all archs. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9339 6f19259b-4bc3-4df7-8a09-765794883524
* Fix various 'EFIAPI' inconsistencies found while building MdeModulePkg.jljusten2009-04-101-0/+1
| | | | git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8062 6f19259b-4bc3-4df7-8a09-765794883524
* 1) Fix a typo in EhcMoniteAsyncRequests.qwang122009-02-041-19/+3
| | | | | | | 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
* Library usage checkedjji42008-12-261-1/+1
| | | | git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7132 6f19259b-4bc3-4df7-8a09-765794883524
* check the usage of %d,%x,%ld,%lx and so on in debug print statement.jji42008-12-181-1/+1
| | | | git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7080 6f19259b-4bc3-4df7-8a09-765794883524
* modify coding style to pass ecc tool and provide comments that complied with ↵eric_tian2008-07-081-86/+63
| | | | | | Doxgen. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5427 6f19259b-4bc3-4df7-8a09-765794883524
* 1. Added EFI_MEDIA_CHANGED and EFI_INVALID_PARAMETER returns in ↵vanjeff2008-02-131-14/+14
| | | | | | | | UsbMassReadBlocks(). 2. Use DEBUG () to replace some native debug function in USB stack modules. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4689 6f19259b-4bc3-4df7-8a09-765794883524
* Fixed unexpected timeout in Usb MassStorage Driver.yshang12007-10-081-3/+3
| | | | | | Fixed unexpected timeout in Uhci/Ehci driver. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4038 6f19259b-4bc3-4df7-8a09-765794883524
* Sync USB modules with main trunk.vanjeff2007-07-241-0/+71
| | | | git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@3423 6f19259b-4bc3-4df7-8a09-765794883524
* Import EhciDxe and UhciDxe into MdeModulePkg.vanjeff2007-07-111-0/+941
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@3191 6f19259b-4bc3-4df7-8a09-765794883524