From 4d1fe68e1ca84cf0d3eec69d20625fa57769de12 Mon Sep 17 00:00:00 2001 From: qhuang8 Date: Fri, 26 Jan 2007 04:08:57 +0000 Subject: 1. Add NULL QH to set as QH header; 2. Do ping for high speed OUT pipe; 3. Bug fix for QTD size detection; 4. Bug fix for short package detection; 5. Bug fix get next QTD in ExcutionTransfer; 6. BOT module modify to follow spec; 7. Massstorage error hanling enhancement git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2321 6f19259b-4bc3-4df7-8a09-765794883524 --- EdkModulePkg/Bus/Pci/Uhci/Dxe/uhci.c | 39 +++++++++++++++++++++++++++--------- 1 file changed, 30 insertions(+), 9 deletions(-) (limited to 'EdkModulePkg/Bus/Pci/Uhci') diff --git a/EdkModulePkg/Bus/Pci/Uhci/Dxe/uhci.c b/EdkModulePkg/Bus/Pci/Uhci/Dxe/uhci.c index 3d81d2c5c3..7e033df2df 100644 --- a/EdkModulePkg/Bus/Pci/Uhci/Dxe/uhci.c +++ b/EdkModulePkg/Bus/Pci/Uhci/Dxe/uhci.c @@ -485,6 +485,7 @@ UHCIDriverBindingStart ( UINTN FlBaseAddrReg; EFI_PCI_IO_PROTOCOL *PciIo; USB_HC_DEV *HcDev; + UINT64 Supports; HcDev = NULL; @@ -510,10 +511,19 @@ UHCIDriverBindingStart ( // Status = PciIo->Attributes ( PciIo, - EfiPciIoAttributeOperationEnable, - EFI_PCI_DEVICE_ENABLE, - NULL + EfiPciIoAttributeOperationSupported, + 0, + &Supports ); + if (!EFI_ERROR (Status)) { + Supports &= EFI_PCI_DEVICE_ENABLE; + Status = PciIo->Attributes ( + PciIo, + EfiPciIoAttributeOperationEnable, + Supports, + NULL + ); + } if (EFI_ERROR (Status)) { gBS->CloseProtocol ( Controller, @@ -777,6 +787,8 @@ UnInstallUHCInterface ( --*/ { USB_HC_DEV *HcDev; + EFI_STATUS Status; + UINT64 Supports; HcDev = USB_HC_DEV_FROM_THIS (This); @@ -823,12 +835,21 @@ UnInstallUHCInterface ( // // Disable the USB Host Controller // - HcDev->PciIo->Attributes ( - HcDev->PciIo, - EfiPciIoAttributeOperationDisable, - EFI_PCI_DEVICE_ENABLE, - NULL - ); + Status = HcDev->PciIo->Attributes ( + HcDev->PciIo, + EfiPciIoAttributeOperationSupported, + 0, + &Supports + ); + if (!EFI_ERROR (Status)) { + Supports &= EFI_PCI_DEVICE_ENABLE; + Status = HcDev->PciIo->Attributes ( + HcDev->PciIo, + EfiPciIoAttributeOperationDisable, + Supports, + NULL + ); + } gBS->FreePool (HcDev); -- cgit v1.2.3