summaryrefslogtreecommitdiff
path: root/EdkModulePkg/Bus/Pci/Uhci
diff options
context:
space:
mode:
authorqhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524>2007-01-26 04:08:57 +0000
committerqhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524>2007-01-26 04:08:57 +0000
commit4d1fe68e1ca84cf0d3eec69d20625fa57769de12 (patch)
tree225a3ba03053fc3b4c1e45b10a185bef52645df2 /EdkModulePkg/Bus/Pci/Uhci
parent01bf334d2c017095a1776c2c42fe5dd0337cff0a (diff)
downloadedk2-platforms-4d1fe68e1ca84cf0d3eec69d20625fa57769de12.tar.xz
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
Diffstat (limited to 'EdkModulePkg/Bus/Pci/Uhci')
-rw-r--r--EdkModulePkg/Bus/Pci/Uhci/Dxe/uhci.c39
1 files changed, 30 insertions, 9 deletions
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);