summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Bus/Pci
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/Pci
parent2a10d87453203eefbdcfc5029ea613927cfbce48 (diff)
downloadedk2-b4c24e2d42b6d91a6abdca2c3341469350e57483.zip
edk2-b4c24e2d42b6d91a6abdca2c3341469350e57483.tar.gz
edk2-b4c24e2d42b6d91a6abdca2c3341469350e57483.tar.bz2
[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/Pci')
-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
5 files changed, 19 insertions, 13 deletions
diff --git a/MdeModulePkg/Bus/Pci/EhciDxe/Ehci.c b/MdeModulePkg/Bus/Pci/EhciDxe/Ehci.c
index 9d18135..6516a9c 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 15a6444..39a22b7 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 843c9e3..8804e91 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 dd0103a..224f402 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 3c2b7d4..e6581d1 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;