]> git.proxmox.com Git - mirror_edk2.git/commitdiff
[Description]:
authorvanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 25 Jun 2008 05:50:41 +0000 (05:50 +0000)
committervanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 25 Jun 2008 05:50:41 +0000 (05:50 +0000)
 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

MdeModulePkg/Bus/Pci/EhciDxe/Ehci.c
MdeModulePkg/Bus/Pci/UhciDxe/Uhci.c
MdeModulePkg/Bus/Pci/UhciDxe/UhciQueue.c
MdeModulePkg/Bus/Pci/UhciDxe/UhciReg.h
MdeModulePkg/Bus/Pci/UhciDxe/UhciSched.c
MdeModulePkg/Bus/Usb/UsbBusDxe/UsbEnumer.c

index 9d181351a2fedd37a8020d74fe965ff04ea9f0bf..6516a9c1f83abc59d48e2a2c8021c5c89b085506 100644 (file)
@@ -1,6 +1,6 @@
 /** @file\r
 \r
-Copyright (c) 2006 - 2007, Intel Corporation\r
+Copyright (c) 2006 - 2008, Intel Corporation\r
 All rights reserved. This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -1436,8 +1436,8 @@ EhcCreateUsb2Hc (
   Ehc->Usb2Hc.GetRootHubPortStatus      = EhcGetRootHubPortStatus;\r
   Ehc->Usb2Hc.SetRootHubPortFeature     = EhcSetRootHubPortFeature;\r
   Ehc->Usb2Hc.ClearRootHubPortFeature   = EhcClearRootHubPortFeature;\r
-  Ehc->Usb2Hc.MajorRevision             = 0x1;\r
-  Ehc->Usb2Hc.MinorRevision             = 0x1;\r
+  Ehc->Usb2Hc.MajorRevision             = 0x2;\r
+  Ehc->Usb2Hc.MinorRevision             = 0x0;\r
 \r
   Ehc->PciIo                 = PciIo;\r
   Ehc->OriginalPciAttributes = OriginalPciAttributes;\r
index 15a6444c5b97a50f29dc523065c119df483c2ef8..39a22b72cdf30d76b96ebfd51ef0db2ed52da63c 100644 (file)
@@ -1,6 +1,6 @@
 /** @file\r
 \r
-Copyright (c) 2004 - 2007, Intel Corporation\r
+Copyright (c) 2004 - 2008, Intel Corporation\r
 All rights reserved. This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -313,9 +313,10 @@ Uhci2GetCapability (
     // returns 0 in this bit if port number is invalid. Also, if\r
     // PciIo IoRead returns error, 0xFFFF is returned to caller.\r
     //\r
-    if (((PortSC & 0x80) != 0) && (PortSC != 0xFFFF)) {\r
-      (*PortNumber)++;\r
+    if (((PortSC & 0x80) == 0) || (PortSC == 0xFFFF)) {\r
+      break;\r
     }\r
+    (*PortNumber)++;\r
   }\r
 \r
   Uhc->RootPorts = *PortNumber;\r
index 843c9e38aa64c987a43e45315eab21460c3658b0..8804e91244f7ef3efcf7b2a96bfda396bd5db0d3 100644 (file)
@@ -1,6 +1,6 @@
 /** @file\r
 \r
-Copyright (c) 2007, Intel Corporation\r
+Copyright (c) 2007 - 2008, Intel Corporation\r
 All rights reserved. This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -280,7 +280,7 @@ UhciCreateQh (
 \r
   Qh->QhHw.HorizonLink  = QH_HLINK (NULL, TRUE);\r
   Qh->QhHw.VerticalLink = QH_VLINK (NULL, TRUE);\r
-  Qh->Interval          = Interval;\r
+  Qh->Interval          = UhciConvertPollRate(Interval);\r
   Qh->TDs               = NULL;\r
   Qh->NextQh            = NULL;\r
 \r
index dd0103aadc8186e2160e376d24ecb46800629318..224f402c3c5cf6830636dd7bd0dd350488a37292 100644 (file)
@@ -1,6 +1,6 @@
 /** @file\r
 \r
-Copyright (c) 2007, Intel Corporation\r
+Copyright (c) 2007 - 2008, Intel Corporation\r
 All rights reserved. This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -68,8 +68,13 @@ enum {
   USBPORTSC_PR          = BIT(9),  // Port Reset\r
   USBPORTSC_SUSP        = BIT(12), // Suspend\r
 \r
-  USB_MAX_ROOTHUB_PORT  = 0x0F,    // Max number of root hub port\r
-\r
+  //\r
+  // UHCI Spec said it must implement 2 ports each host at least,\r
+  // and if more, check whether the bit7 of PORTSC is always 1.\r
+  // So here assume the max of port number each host is 16.\r
+  //\r
+  USB_MAX_ROOTHUB_PORT  = 0x0F,\r
+  \r
   //\r
   // Command register bit definitions\r
   //\r
index 3c2b7d4cbbd6ae405df86030e22d38ab72f064c7..e6581d104c8c3ce594ff5f24dc5f5aeb2782f23b 100644 (file)
@@ -1,6 +1,6 @@
 /** @file\r
 \r
-Copyright (c) 2007, Intel Corporation\r
+Copyright (c) 2007 - 2008, Intel Corporation\r
 All rights reserved. This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -704,7 +704,7 @@ UhciCreateAsyncReq (
   AsyncReq->DevAddr     = DevAddr;\r
   AsyncReq->EndPoint    = EndPoint;\r
   AsyncReq->DataLen     = DataLen;\r
-  AsyncReq->Interval    = Interval;\r
+  AsyncReq->Interval    = UhciConvertPollRate(Interval);\r
   AsyncReq->Mapping     = Mapping;\r
   AsyncReq->Data        = Data;\r
   AsyncReq->Callback    = Callback;\r
index 8d527e061bf1640583a2201a896ec393b532aedd..f5ec52d988e52e5ec8cc278d1fcb8387bbf658fd 100644 (file)
@@ -1,6 +1,6 @@
 /** @file\r
 \r
-Copyright (c) 2007, Intel Corporation\r
+Copyright (c) 2007 - 2008, Intel Corporation\r
 All rights reserved. This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -713,13 +713,14 @@ UsbEnumerateNewDev (
   if (Child->Speed != EFI_USB_SPEED_HIGH) {\r
     //\r
     // If the child isn't a high speed device, it is necessary to\r
-    // set the transaction translator. This is quite simple:\r
+    // set the transaction translator. Port TT is 1-based.\r
+    // This is quite simple:\r
     //  1. if parent is of high speed, then parent is our translator\r
     //  2. otherwise use parent's translator.\r
     //\r
     if (Parent->Speed == EFI_USB_SPEED_HIGH) {\r
       Child->Translator.TranslatorHubAddress  = Parent->Address;\r
-      Child->Translator.TranslatorPortNumber  = Port;\r
+      Child->Translator.TranslatorPortNumber  = Port + 1;\r
 \r
     } else {\r
       Child->Translator = Parent->Translator;\r