summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Bus
diff options
context:
space:
mode:
authorvanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524>2008-06-25 05:50:41 +0000
committervanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524>2008-06-25 05:50:41 +0000
commitb4c24e2d42b6d91a6abdca2c3341469350e57483 (patch)
tree9c0114635e4963a57f6843a20a1a9688c3e45b96 /MdeModulePkg/Bus
parent2a10d87453203eefbdcfc5029ea613927cfbce48 (diff)
downloadedk2-platforms-b4c24e2d42b6d91a6abdca2c3341469350e57483.tar.xz
[Description]:
Sync 3 trackers. 1. A bug that may cause the low/full speed device behind 2.0 hub will not work. 2. MajorRevision and MinorRevision need updating. 3. Misuse UhciConvertPollRate in UHCI driver. [Impaction]: EhicDxe, UhciDxe and UsbBusDxe. [Reference Info]: EDK tracker 1122 - A bug that may cause the low/full speed device behind 2.0 hub will not work . EDK tracker 1101 - Phoenix found issue in USB and Misuse UhciConvertPollRate in UHCI driver. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5370 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Bus')
-rw-r--r--MdeModulePkg/Bus/Pci/EhciDxe/Ehci.c6
-rw-r--r--MdeModulePkg/Bus/Pci/UhciDxe/Uhci.c7
-rw-r--r--MdeModulePkg/Bus/Pci/UhciDxe/UhciQueue.c4
-rw-r--r--MdeModulePkg/Bus/Pci/UhciDxe/UhciReg.h11
-rw-r--r--MdeModulePkg/Bus/Pci/UhciDxe/UhciSched.c4
-rw-r--r--MdeModulePkg/Bus/Usb/UsbBusDxe/UsbEnumer.c7
6 files changed, 23 insertions, 16 deletions
diff --git a/MdeModulePkg/Bus/Pci/EhciDxe/Ehci.c b/MdeModulePkg/Bus/Pci/EhciDxe/Ehci.c
index 9d181351a2..6516a9c1f8 100644
--- a/MdeModulePkg/Bus/Pci/EhciDxe/Ehci.c
+++ b/MdeModulePkg/Bus/Pci/EhciDxe/Ehci.c
@@ -1,6 +1,6 @@
/** @file
-Copyright (c) 2006 - 2007, Intel Corporation
+Copyright (c) 2006 - 2008, Intel Corporation
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -1436,8 +1436,8 @@ EhcCreateUsb2Hc (
Ehc->Usb2Hc.GetRootHubPortStatus = EhcGetRootHubPortStatus;
Ehc->Usb2Hc.SetRootHubPortFeature = EhcSetRootHubPortFeature;
Ehc->Usb2Hc.ClearRootHubPortFeature = EhcClearRootHubPortFeature;
- Ehc->Usb2Hc.MajorRevision = 0x1;
- Ehc->Usb2Hc.MinorRevision = 0x1;
+ Ehc->Usb2Hc.MajorRevision = 0x2;
+ Ehc->Usb2Hc.MinorRevision = 0x0;
Ehc->PciIo = PciIo;
Ehc->OriginalPciAttributes = OriginalPciAttributes;
diff --git a/MdeModulePkg/Bus/Pci/UhciDxe/Uhci.c b/MdeModulePkg/Bus/Pci/UhciDxe/Uhci.c
index 15a6444c5b..39a22b72cd 100644
--- a/MdeModulePkg/Bus/Pci/UhciDxe/Uhci.c
+++ b/MdeModulePkg/Bus/Pci/UhciDxe/Uhci.c
@@ -1,6 +1,6 @@
/** @file
-Copyright (c) 2004 - 2007, Intel Corporation
+Copyright (c) 2004 - 2008, Intel Corporation
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -313,9 +313,10 @@ Uhci2GetCapability (
// returns 0 in this bit if port number is invalid. Also, if
// PciIo IoRead returns error, 0xFFFF is returned to caller.
//
- if (((PortSC & 0x80) != 0) && (PortSC != 0xFFFF)) {
- (*PortNumber)++;
+ if (((PortSC & 0x80) == 0) || (PortSC == 0xFFFF)) {
+ break;
}
+ (*PortNumber)++;
}
Uhc->RootPorts = *PortNumber;
diff --git a/MdeModulePkg/Bus/Pci/UhciDxe/UhciQueue.c b/MdeModulePkg/Bus/Pci/UhciDxe/UhciQueue.c
index 843c9e38aa..8804e91244 100644
--- a/MdeModulePkg/Bus/Pci/UhciDxe/UhciQueue.c
+++ b/MdeModulePkg/Bus/Pci/UhciDxe/UhciQueue.c
@@ -1,6 +1,6 @@
/** @file
-Copyright (c) 2007, Intel Corporation
+Copyright (c) 2007 - 2008, Intel Corporation
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -280,7 +280,7 @@ UhciCreateQh (
Qh->QhHw.HorizonLink = QH_HLINK (NULL, TRUE);
Qh->QhHw.VerticalLink = QH_VLINK (NULL, TRUE);
- Qh->Interval = Interval;
+ Qh->Interval = UhciConvertPollRate(Interval);
Qh->TDs = NULL;
Qh->NextQh = NULL;
diff --git a/MdeModulePkg/Bus/Pci/UhciDxe/UhciReg.h b/MdeModulePkg/Bus/Pci/UhciDxe/UhciReg.h
index dd0103aadc..224f402c3c 100644
--- a/MdeModulePkg/Bus/Pci/UhciDxe/UhciReg.h
+++ b/MdeModulePkg/Bus/Pci/UhciDxe/UhciReg.h
@@ -1,6 +1,6 @@
/** @file
-Copyright (c) 2007, Intel Corporation
+Copyright (c) 2007 - 2008, Intel Corporation
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -68,8 +68,13 @@ enum {
USBPORTSC_PR = BIT(9), // Port Reset
USBPORTSC_SUSP = BIT(12), // Suspend
- USB_MAX_ROOTHUB_PORT = 0x0F, // Max number of root hub port
-
+ //
+ // UHCI Spec said it must implement 2 ports each host at least,
+ // and if more, check whether the bit7 of PORTSC is always 1.
+ // So here assume the max of port number each host is 16.
+ //
+ USB_MAX_ROOTHUB_PORT = 0x0F,
+
//
// Command register bit definitions
//
diff --git a/MdeModulePkg/Bus/Pci/UhciDxe/UhciSched.c b/MdeModulePkg/Bus/Pci/UhciDxe/UhciSched.c
index 3c2b7d4cbb..e6581d104c 100644
--- a/MdeModulePkg/Bus/Pci/UhciDxe/UhciSched.c
+++ b/MdeModulePkg/Bus/Pci/UhciDxe/UhciSched.c
@@ -1,6 +1,6 @@
/** @file
-Copyright (c) 2007, Intel Corporation
+Copyright (c) 2007 - 2008, Intel Corporation
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -704,7 +704,7 @@ UhciCreateAsyncReq (
AsyncReq->DevAddr = DevAddr;
AsyncReq->EndPoint = EndPoint;
AsyncReq->DataLen = DataLen;
- AsyncReq->Interval = Interval;
+ AsyncReq->Interval = UhciConvertPollRate(Interval);
AsyncReq->Mapping = Mapping;
AsyncReq->Data = Data;
AsyncReq->Callback = Callback;
diff --git a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbEnumer.c b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbEnumer.c
index 8d527e061b..f5ec52d988 100644
--- a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbEnumer.c
+++ b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbEnumer.c
@@ -1,6 +1,6 @@
/** @file
-Copyright (c) 2007, Intel Corporation
+Copyright (c) 2007 - 2008, Intel Corporation
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -713,13 +713,14 @@ UsbEnumerateNewDev (
if (Child->Speed != EFI_USB_SPEED_HIGH) {
//
// If the child isn't a high speed device, it is necessary to
- // set the transaction translator. This is quite simple:
+ // set the transaction translator. Port TT is 1-based.
+ // This is quite simple:
// 1. if parent is of high speed, then parent is our translator
// 2. otherwise use parent's translator.
//
if (Parent->Speed == EFI_USB_SPEED_HIGH) {
Child->Translator.TranslatorHubAddress = Parent->Address;
- Child->Translator.TranslatorPortNumber = Port;
+ Child->Translator.TranslatorPortNumber = Port + 1;
} else {
Child->Translator = Parent->Translator;