Changeset 58459 in vbox for trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Bus/Pci/UhciDxe/Uhci.c
- Timestamp:
- Oct 28, 2015 8:17:18 PM (9 years ago)
- Location:
- trunk/src/VBox/Devices/EFI/Firmware
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/EFI/Firmware
-
Property svn:mergeinfo
set to (toggle deleted branches)
/vendor/edk2/current 103735-103757
-
Property svn:mergeinfo
set to (toggle deleted branches)
-
trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Bus/Pci/UhciDxe/Uhci.c
r48674 r58459 3 3 The UHCI driver model and HC protocol routines. 4 4 5 Copyright (c) 2004 - 201 1, Intel Corporation. All rights reserved.<BR>5 Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.<BR> 6 6 This program and the accompanying materials 7 7 are licensed and made available under the terms and conditions of the BSD License … … 54 54 } 55 55 56 Uhc = UHC_FROM_USB2_HC_PROTO (This); 56 Uhc = UHC_FROM_USB2_HC_PROTO (This); 57 58 if (Uhc->DevicePath != NULL) { 59 // 60 // Report Status Code to indicate reset happens 61 // 62 REPORT_STATUS_CODE_WITH_DEVICE_PATH ( 63 EFI_PROGRESS_CODE, 64 (EFI_IO_BUS_USB | EFI_IOB_PC_RESET), 65 Uhc->DevicePath 66 ); 67 } 57 68 58 69 OldTpl = gBS->RaiseTPL (UHCI_TPL); … … 1419 1430 1420 1431 @param PciIo The PCIIO to use. 1432 @param DevicePath The device path of host controller. 1421 1433 @param OriginalPciAttributes The original PCI attributes. 1422 1434 … … 1426 1438 USB_HC_DEV * 1427 1439 UhciAllocateDev ( 1428 IN EFI_PCI_IO_PROTOCOL *PciIo, 1429 IN UINT64 OriginalPciAttributes 1440 IN EFI_PCI_IO_PROTOCOL *PciIo, 1441 IN EFI_DEVICE_PATH_PROTOCOL *DevicePath, 1442 IN UINT64 OriginalPciAttributes 1430 1443 ) 1431 1444 { … … 1461 1474 1462 1475 Uhc->PciIo = PciIo; 1476 Uhc->DevicePath = DevicePath; 1463 1477 Uhc->OriginalPciAttributes = OriginalPciAttributes; 1464 1478 Uhc->MemPool = UsbHcInitMemPool (PciIo, TRUE, 0); … … 1537 1551 { 1538 1552 USB_HC_DEV *Uhc; 1553 EFI_STATUS Status; 1539 1554 1540 1555 // … … 1542 1557 // 1543 1558 Uhc = UHC_FROM_USB2_HC_PROTO (This); 1559 1560 1561 Status = gBS->UninstallProtocolInterface ( 1562 Controller, 1563 &gEfiUsb2HcProtocolGuid, 1564 &Uhc->Usb2Hc 1565 ); 1566 if (EFI_ERROR (Status)) { 1567 return ; 1568 } 1569 1544 1570 UhciStopHc (Uhc, UHC_GENERIC_TIMEOUT); 1545 1546 gBS->UninstallProtocolInterface (1547 Controller,1548 &gEfiUsb2HcProtocolGuid,1549 &Uhc->Usb2Hc1550 );1551 1552 1571 UhciFreeAllAsyncReq (Uhc); 1553 1572 UhciDestoryFrameList (Uhc); … … 1570 1589 1571 1590 @param Event Pointer to this event 1572 @param Context Event han lder private data1591 @param Context Event handler private data 1573 1592 1574 1593 **/ … … 1623 1642 UINT64 OriginalPciAttributes; 1624 1643 BOOLEAN PciAttributesSaved; 1644 EFI_DEVICE_PATH_PROTOCOL *HcDevicePath; 1625 1645 1626 1646 // … … 1641 1661 } 1642 1662 1663 // 1664 // Open Device Path Protocol for on USB host controller 1665 // 1666 HcDevicePath = NULL; 1667 Status = gBS->OpenProtocol ( 1668 Controller, 1669 &gEfiDevicePathProtocolGuid, 1670 (VOID **) &HcDevicePath, 1671 This->DriverBindingHandle, 1672 Controller, 1673 EFI_OPEN_PROTOCOL_GET_PROTOCOL 1674 ); 1675 1643 1676 PciAttributesSaved = FALSE; 1644 1677 // … … 1672 1705 ); 1673 1706 if (!EFI_ERROR (Status)) { 1674 Supports &= EFI_PCI_DEVICE_ENABLE;1707 Supports &= (UINT64)EFI_PCI_DEVICE_ENABLE; 1675 1708 Status = PciIo->Attributes ( 1676 1709 PciIo, … … 1685 1718 } 1686 1719 1687 Uhc = UhciAllocateDev (PciIo, OriginalPciAttributes);1720 Uhc = UhciAllocateDev (PciIo, HcDevicePath, OriginalPciAttributes); 1688 1721 1689 1722 if (Uhc == NULL) {
Note:
See TracChangeset
for help on using the changeset viewer.