diff options
Diffstat (limited to 'MdeModulePkg')
-rw-r--r-- | MdeModulePkg/Bus/Pci/EhciDxe/Ehci.c | 6 | ||||
-rw-r--r-- | MdeModulePkg/Bus/Pci/UhciDxe/Uhci.c | 7 | ||||
-rw-r--r-- | MdeModulePkg/Bus/Pci/UhciDxe/UhciQueue.c | 4 | ||||
-rw-r--r-- | MdeModulePkg/Bus/Pci/UhciDxe/UhciReg.h | 11 | ||||
-rw-r--r-- | MdeModulePkg/Bus/Pci/UhciDxe/UhciSched.c | 4 | ||||
-rw-r--r-- | MdeModulePkg/Bus/Usb/UsbBusDxe/UsbEnumer.c | 7 |
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;
|