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
/** @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
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
/** @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
// 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
/** @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
\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
/** @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
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
/** @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
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
/** @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
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