mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-31 01:24:12 +02:00
add comments to clarify the enhancement on EHCI driver, which is guaranteed to get attached to EHCI host controller before UHCI driver attaches to uhci host controller.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9040 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
4888999008
commit
ba19956ac3
@ -1,7 +1,15 @@
|
|||||||
/** @file
|
/** @file
|
||||||
|
|
||||||
The Ehci controller driver.
|
The Ehci controller driver.
|
||||||
|
|
||||||
|
EhciDxe driver is responsible for managing the behavior of EHCI controller.
|
||||||
|
It implements the interfaces of monitoring the status of all ports and transferring
|
||||||
|
Control, Bulk, Interrupt and Isochronous requests to Usb2.0 device.
|
||||||
|
|
||||||
|
Note that EhciDxe driver is enhanced to guarantee that the EHCI controller get attached
|
||||||
|
to the EHCI controller before the UHCI driver attaches to the companion UHCI controller.
|
||||||
|
This way avoids the control transfer on a shared port between EHCI and companion host
|
||||||
|
controller when UHCI gets attached earlier than EHCI and a USB 2.0 device inserts.
|
||||||
|
|
||||||
Copyright (c) 2006 - 2009, Intel Corporation
|
Copyright (c) 2006 - 2009, Intel Corporation
|
||||||
All rights reserved. This program and the accompanying materials
|
All rights reserved. This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
@ -1570,6 +1578,9 @@ EhcDriverBindingStart (
|
|||||||
goto CLOSE_PCIIO;
|
goto CLOSE_PCIIO;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Get the Pci device class code.
|
||||||
|
//
|
||||||
Status = PciIo->Pci.Read (
|
Status = PciIo->Pci.Read (
|
||||||
PciIo,
|
PciIo,
|
||||||
EfiPciIoWidthUint8,
|
EfiPciIoWidthUint8,
|
||||||
@ -1582,7 +1593,11 @@ EhcDriverBindingStart (
|
|||||||
Status = EFI_UNSUPPORTED;
|
Status = EFI_UNSUPPORTED;
|
||||||
goto CLOSE_PCIIO;
|
goto CLOSE_PCIIO;
|
||||||
}
|
}
|
||||||
|
//
|
||||||
|
// determine if the device is UHCI host controller or not. If yes, then find out the
|
||||||
|
// companion usb ehci host controller and force EHCI driver get attached to it before
|
||||||
|
// UHCI driver attaches to UHCI host controller.
|
||||||
|
//
|
||||||
if ((UsbClassCReg.PI == PCI_IF_UHCI) &&
|
if ((UsbClassCReg.PI == PCI_IF_UHCI) &&
|
||||||
(UsbClassCReg.BaseCode == PCI_CLASS_SERIAL) &&
|
(UsbClassCReg.BaseCode == PCI_CLASS_SERIAL) &&
|
||||||
(UsbClassCReg.SubClassCode == PCI_CLASS_SERIAL_USB)) {
|
(UsbClassCReg.SubClassCode == PCI_CLASS_SERIAL_USB)) {
|
||||||
@ -1645,6 +1660,10 @@ EhcDriverBindingStart (
|
|||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
goto CLOSE_PCIIO;
|
goto CLOSE_PCIIO;
|
||||||
}
|
}
|
||||||
|
//
|
||||||
|
// Currently, the judgment on the companion usb host controller is through the
|
||||||
|
// same bus number, which may vary on different platform.
|
||||||
|
//
|
||||||
if (EhciBusNumber == UhciBusNumber) {
|
if (EhciBusNumber == UhciBusNumber) {
|
||||||
gBS->CloseProtocol (
|
gBS->CloseProtocol (
|
||||||
Controller,
|
Controller,
|
||||||
|
@ -6,6 +6,11 @@
|
|||||||
# It implements the interfaces of monitoring the status of all ports and transferring
|
# It implements the interfaces of monitoring the status of all ports and transferring
|
||||||
# Control, Bulk, Interrupt and Isochronous requests to Usb2.0 device.
|
# Control, Bulk, Interrupt and Isochronous requests to Usb2.0 device.
|
||||||
#
|
#
|
||||||
|
# Note that EhciDxe driver is enhanced to guarantee that the EHCI controller get attached
|
||||||
|
# to the EHCI controller before the UHCI driver attaches to the companion UHCI controller.
|
||||||
|
# This way avoids the control transfer on a shared port between EHCI and companion host
|
||||||
|
# controller when UHCI gets attached earlier than EHCI and a USB 2.0 device inserts.
|
||||||
|
#
|
||||||
# Copyright (c) 2006 - 2009, Intel Corporation.
|
# Copyright (c) 2006 - 2009, Intel Corporation.
|
||||||
#
|
#
|
||||||
# All rights reserved. This program and the accompanying materials
|
# All rights reserved. This program and the accompanying materials
|
||||||
|
Loading…
x
Reference in New Issue
Block a user