Lines Matching refs:descriptor

519 		uint32 descriptor = _ReadReg(OHCI_RH_DESCRIPTOR_A);
520 numberOfPorts = OHCI_RH_GET_PORT_COUNT(descriptor);
709 ohci_isochronous_td *descriptor
711 while (descriptor) {
713 descriptor->flags);
715 OHCI_ITD_GET_FRAME_COUNT(descriptor->flags));
716 if (descriptor
721 descriptor
723 descriptor->next_done_descriptor;
1025 // the current tail will become the first descriptor
1034 // even the last and the first descriptor might be the same
1081 // the current tail will become the first descriptor
1087 // the last and the first descriptor might be the same
1142 ohci_general_td *descriptor = transfer->first_descriptor;
1173 while (descriptor && !transfer->canceled) {
1174 uint32 status = OHCI_TD_GET_CONDITION_CODE(descriptor->flags);
1177 TRACE("td %p still active\n", descriptor);
1186 // descriptor has passed (we don't know if the endpoint
1199 TRACE("td %p active with error\n", descriptor);
1205 TRACE("td %p done\n", descriptor);
1207 if (descriptor == transfer->last_descriptor
1208 || descriptor->buffer_physical != 0) {
1215 descriptor
1216 = (ohci_general_td *)descriptor->next_logical_descriptor;
1256 // break the descriptor chain on the last descriptor
1334 ohci_isochronous_td *descriptor
1336 while (descriptor) {
1337 if (OHCI_TD_GET_CONDITION_CODE(descriptor->flags)
1339 TRACE("ITD %p still active\n", descriptor);
1344 if (descriptor == (ohci_isochronous_td*)transfer->last_descriptor) {
1346 descriptor = (ohci_isochronous_td *)transfer->first_descriptor;
1350 descriptor
1351 = (ohci_isochronous_td *)descriptor->next_done_descriptor;
1354 while (descriptor) {
1355 uint32 status = OHCI_TD_GET_CONDITION_CODE(descriptor->flags);
1370 uint32 frameCount = OHCI_ITD_GET_FRAME_COUNT(descriptor->flags);
1375 uint16 offset = descriptor->offset[OHCI_ITD_OFFSET_IDX(i)];
1392 uint16 frame = OHCI_ITD_GET_STARTING_FRAME(descriptor->flags);
1394 OHCI_ITD_GET_FRAME_COUNT(descriptor->flags));
1396 TRACE("ITD %p done\n", descriptor);
1398 if (descriptor == (ohci_isochronous_td*)transfer->last_descriptor)
1401 descriptor
1402 = (ohci_isochronous_td *)descriptor->next_done_descriptor;
1426 // break the descriptor chain on the last descriptor
1466 TRACE_ERROR("failed to allocate setup descriptor\n");
1477 TRACE_ERROR("failed to allocate status descriptor\n");
1530 // Add the descriptor chain to the endpoint
1556 // Apply data toggle to the first descriptor (the others will use the carry)
1561 // Set the last descriptor to generate an interrupt
1597 // Add the descriptor chain to the endpoint
1628 // Set the last descriptor to generate an interrupt
1633 // If direction is out set every descriptor data
1652 // Add the descriptor chain to the endpoint
1666 // fill in the information of the first descriptor into the current tail
1676 // the first descriptor becomes the new tail
1706 // fill in the information of the first descriptor into the current tail
1718 // the first descriptor becomes the new tail
1754 // endpoint head pointer might point somewhere into the descriptor chain
1757 // find the head to point to somewhere into the descriptor chain then
1763 ohci_general_td *descriptor = transfer->first_descriptor;
1764 while (descriptor) {
1766 == descriptor->physical_address) {
1767 // This descriptor caused the halt. Advance the head pointer. This
1778 descriptor = (ohci_general_td *)descriptor->next_logical_descriptor;
1798 TRACE_ERROR("failed to allocate endpoint descriptor\n");
1909 // Create (necessary) tail descriptor
1984 ohci_general_td *descriptor;
1987 if (fStack->AllocateChunk((void **)&descriptor, &physicalAddress,
1989 TRACE_ERROR("failed to allocate general descriptor\n");
1993 descriptor->physical_address = (uint32)physicalAddress;
1994 descriptor->next_physical_descriptor = 0;
1995 descriptor->next_logical_descriptor = NULL;
1996 descriptor->buffer_size = bufferSize;
1998 descriptor->buffer_physical = 0;
1999 descriptor->buffer_logical = NULL;
2000 descriptor->last_physical_byte_address = 0;
2001 return descriptor;
2004 if (fStack->AllocateChunk(&descriptor->buffer_logical,
2007 fStack->FreeChunk(descriptor, descriptor->physical_address,
2011 descriptor->buffer_physical = physicalAddress;
2013 descriptor->last_physical_byte_address
2014 = descriptor->buffer_physical + bufferSize - 1;
2015 return descriptor;
2020 OHCI::_FreeGeneralDescriptor(ohci_general_td *descriptor)
2022 if (!descriptor)
2025 if (descriptor->buffer_logical) {
2026 fStack->FreeChunk(descriptor->buffer_logical,
2027 descriptor->buffer_physical, descriptor->buffer_size);
2030 fStack->FreeChunk((void *)descriptor, descriptor->physical_address,
2047 ohci_general_td *descriptor = _CreateGeneralDescriptor(
2050 if (!descriptor) {
2055 descriptor->flags = direction
2063 _LinkDescriptors(lastDescriptor, descriptor);
2066 lastDescriptor = descriptor;
2068 firstDescriptor = descriptor;
2094 ohci_isochronous_td *descriptor = NULL;
2097 if (fStack->AllocateChunk((void **)&descriptor, &physicalAddress,
2099 TRACE_ERROR("failed to allocate isochronous descriptor\n");
2103 descriptor->physical_address = (uint32)physicalAddress;
2104 descriptor->next_physical_descriptor = 0;
2105 descriptor->next_logical_descriptor = NULL;
2106 descriptor->next_done_descriptor = NULL;
2107 descriptor->buffer_size = bufferSize;
2109 descriptor->buffer_page_byte_0 = 0;
2110 descriptor->buffer_logical = NULL;
2111 descriptor->last_byte_address = 0;
2112 return descriptor;
2115 if (fStack->AllocateChunk(&descriptor->buffer_logical,
2118 fStack->FreeChunk(descriptor, descriptor->physical_address,
2122 descriptor->buffer_page_byte_0 = (uint32)physicalAddress;
2123 descriptor->last_byte_address
2124 = descriptor->buffer_page_byte_0 + bufferSize - 1;
2126 return descriptor;
2131 OHCI::_FreeIsochronousDescriptor(ohci_isochronous_td *descriptor)
2133 if (!descriptor)
2136 if (descriptor->buffer_logical) {
2137 fStack->FreeChunk(descriptor->buffer_logical,
2138 descriptor->buffer_page_byte_0, descriptor->buffer_size);
2141 fStack->FreeChunk((void *)descriptor, descriptor->physical_address,
2182 // The entry where to start inserting the first Isochronous descriptor
2212 ohci_isochronous_td *descriptor = _CreateIsochronousDescriptor(
2215 if (!descriptor) {
2222 uint16 pageOffset = descriptor->buffer_page_byte_0 & 0xfff;
2223 descriptor->buffer_page_byte_0 &= ~0xfff;
2225 descriptor->offset[OHCI_ITD_OFFSET_IDX(i)]
2229 descriptor->flags = OHCI_ITD_SET_FRAME_COUNT(frameCount)
2236 descriptor->last_byte_address
2241 _LinkIsochronousDescriptors(lastDescriptor, descriptor, descriptor);
2243 lastDescriptor = descriptor;
2245 firstDescriptor = descriptor;
2308 TRACE("wrote descriptor chain (%ld bytes, no"
2328 TRACE("wrote descriptor chain (%ld bytes)\n", actualLength);
2365 TRACE("wrote descriptor chain (%ld bytes, no"
2385 TRACE("wrote descriptor chain (%ld bytes)\n", actualLength);
2429 TRACE("read descriptor chain (%ld bytes, no more vectors)\n",
2446 TRACE("read descriptor chain (%ld bytes)\n", actualLength);
2483 TRACE("read descriptor chain (%ld bytes, "
2501 TRACE("read descriptor chain (%ld bytes)\n", actualLength);
2665 dprintf("descriptor %p\n", topDescriptor);
2684 dprintf("iso.descriptor %p\n", topDescriptor);