mirror of https://github.com/acidanthera/audk.git
uniform the sw and hw expression to avoid confusing. it does not effect hw function.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10186 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
029f9e857e
commit
3a2f9cce7d
|
@ -74,6 +74,7 @@ EhcCreateHelpQ (
|
|||
QhHw->HorizonLink = QH_LINK (PciAddr + OFFSET_OF(EHC_QH, QhHw), EHC_TYPE_QH, FALSE);
|
||||
QhHw->Status = QTD_STAT_HALTED;
|
||||
QhHw->ReclaimHead = 1;
|
||||
Qh->NextQh = Qh;
|
||||
Ehc->ReclaimHead = Qh;
|
||||
|
||||
//
|
||||
|
@ -335,9 +336,9 @@ EhcLinkQhToAsync (
|
|||
Qh->NextQh = Head->NextQh;
|
||||
Head->NextQh = Qh;
|
||||
|
||||
PciAddr = UsbHcGetPciAddressForHostMem (Ehc->MemPool, Head, sizeof (EHC_QH));
|
||||
PciAddr = UsbHcGetPciAddressForHostMem (Ehc->MemPool, Qh->NextQh, sizeof (EHC_QH));
|
||||
Qh->QhHw.HorizonLink = QH_LINK (PciAddr, EHC_TYPE_QH, FALSE);
|
||||
PciAddr = UsbHcGetPciAddressForHostMem (Ehc->MemPool, Qh, sizeof (EHC_QH));
|
||||
PciAddr = UsbHcGetPciAddressForHostMem (Ehc->MemPool, Head->NextQh, sizeof (EHC_QH));
|
||||
Head->QhHw.HorizonLink = QH_LINK (PciAddr, EHC_TYPE_QH, FALSE);
|
||||
}
|
||||
|
||||
|
@ -372,7 +373,7 @@ EhcUnlinkQhFromAsync (
|
|||
Head->NextQh = Qh->NextQh;
|
||||
Qh->NextQh = NULL;
|
||||
|
||||
PciAddr = UsbHcGetPciAddressForHostMem (Ehc->MemPool, Head, sizeof (EHC_QH));
|
||||
PciAddr = UsbHcGetPciAddressForHostMem (Ehc->MemPool, Head->NextQh, sizeof (EHC_QH));
|
||||
Head->QhHw.HorizonLink = QH_LINK (PciAddr, EHC_TYPE_QH, FALSE);
|
||||
|
||||
//
|
||||
|
|
|
@ -246,6 +246,10 @@ UsbHcGetPciAddressForHostMem (
|
|||
Head = Pool->Head;
|
||||
AllocSize = USBHC_MEM_ROUND (Size);
|
||||
|
||||
if (Mem == NULL) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
for (Block = Head; Block != NULL; Block = Block->Next) {
|
||||
//
|
||||
// scan the memory block list for the memory block that
|
||||
|
|
Loading…
Reference in New Issue