/* Check if the Trb is a transaction of the URB. */
BOOLEAN XhcPeiIsTransferRingTrb(IN TRB_TEMPLATE *Trb, IN URB *Urb)
/* Check if the Trb is a transaction of the URB. */
BOOLEAN XhcPeiIsTransferRingTrb(IN TRB_TEMPLATE *Trb, IN URB *Urb)
{
  TRB_TEMPLATE  *CheckedTrb;
  UINTN         Index;
  CheckedTrb = Urb->Ring->RingSeg0;
  ASSERT (Urb->Ring->TrbNumber == CMD_RING_TRB_NUMBER || Urb->Ring->TrbNumber == TR_RING_TRB_NUMBER);
  for (Index = 0; Index < Urb->Ring->TrbNumber; Index++) {
    if (Trb == CheckedTrb) {
      return TRUE;
    }
    CheckedTrb++;
  }
  return FALSE;
}