Lines Matching refs:transfer

842 XHCI::SubmitTransfer(Transfer *transfer)
845 if (transfer->TransferPipe()->DeviceAddress() == 1)
846 return fRootHub->ProcessTransfer(this, transfer);
848 TRACE("SubmitTransfer(%p)\n", transfer);
849 Pipe *pipe = transfer->TransferPipe();
851 return SubmitControlRequest(transfer);
852 return SubmitNormalRequest(transfer);
857 XHCI::SubmitControlRequest(Transfer *transfer)
859 Pipe *pipe = transfer->TransferPipe();
860 usb_request_data *requestData = transfer->RequestData();
875 status_t status = transfer->InitKernelAccess();
882 descriptor->transfer = transfer;
909 transfer->PrepareKernelAccess();
910 WriteDescriptor(descriptor, transfer->Vector(),
911 transfer->VectorCount(), transfer->IsPhysical());
925 // Status Stage is an OUT transfer when the device is sending data
943 XHCI::SubmitNormalRequest(Transfer *transfer)
945 TRACE("SubmitNormalRequest() length %" B_PRIuSIZE "\n", transfer->FragmentLength());
947 Pipe *pipe = transfer->TransferPipe();
948 usb_isochronous_data *isochronousData = transfer->IsochronousData();
961 status_t status = transfer->InitKernelAccess();
976 trbSize = transfer->DataLength() / isochronousData->packet_count;
983 const int32 trbCount = (transfer->FragmentLength() + trbSize - 1) / trbSize;
991 size_t remaining = transfer->FragmentLength();
996 // The "TD Size" field of a transfer TRB indicates the number of
1016 // This is an isochronous transfer; it should have one TD per packet.
1055 // TRB that generates the interrupt for this transfer.
1063 TRACE("copying out iov count %ld\n", transfer->VectorCount());
1064 status_t status = transfer->PrepareKernelAccess();
1069 WriteDescriptor(td, transfer->Vector(),
1070 transfer->VectorCount(), transfer->IsPhysical());
1073 td->transfer = transfer;
1117 if (td->transfer == NULL)
1123 transfers[transfersCount] = td->transfer;
1126 td->transfer = NULL;
1199 XHCI::StartDebugTransfer(Transfer *transfer)
1201 Pipe *pipe = transfer->TransferPipe();
1222 status_t status = SubmitTransfer(transfer);
1226 // The endpoint's head TD is the TD of the just-submitted transfer.
1228 transfer->SetCallback(NULL, endpoint->td_head);
1235 XHCI::CheckDebugTransfer(Transfer *transfer)
1237 xhci_td *transfer_td = (xhci_td *)transfer->CallbackCookie();
1257 bool directionIn = (transfer->TransferPipe()->Direction() != Pipe::Out);
1262 ReadDescriptor(td, transfer->Vector(), transfer->VectorCount(),
1263 transfer->IsPhysical());
1267 transfer->SetCallback(NULL, NULL);
1278 XHCI::CancelDebugTransfer(Transfer *transfer)
1280 while (CheckDebugTransfer(transfer) == B_DEV_PENDING)
1323 TRACE_ERROR("failed to allocate a transfer descriptor\n");
1341 // request one large chunk the size of the transfer, and so instead we
1399 result->transfer = NULL;
2008 // used TRBs on the ring (we use 2 TRBs on the ring per transfer.)
2016 if (endpoint->td_head != NULL && endpoint->td_head->transfer != NULL
2017 && endpoint->td_head->transfer->IsFragmented()) {
2018 TRACE_ERROR("cannot submit transfer: a fragmented transfer is queued\n");
2078 // "real" TRB in the TD; this will allow us to determine what transfer
2670 TRACE("got transfer event for a non-Event Data TRB!\n");
2678 TRACE_ALWAYS("transfer error on slot %" B_PRId8 " endpoint %" B_PRId8
2701 if (td->transfer != NULL && td->transfer->IsochronousData() != NULL) {
2702 usb_isochronous_data* isochronousData = td->transfer->IsochronousData();
2708 (td->transfer->TransferPipe()->Direction() != Pipe::Out));
2748 // But if we have an unsuccessful completion code, the transfer
3134 TRACE("finishing transfer td %p\n", td);
3136 Transfer* transfer = td->transfer;
3137 if (transfer == NULL) {
3138 // No transfer? Quick way out.
3144 bool directionIn = (transfer->TransferPipe()->Direction() != Pipe::Out);
3149 size_t actualLength = transfer->FragmentLength();
3153 actualLength = transfer->FragmentLength() - td->trb_left;
3154 TRACE("transfer not successful, actualLength=%" B_PRIuSIZE "\n",
3159 TRACE("copying in iov count %ld\n", transfer->VectorCount());
3160 status_t status = transfer->PrepareKernelAccess();
3162 ReadDescriptor(td, transfer->Vector(),
3163 transfer->VectorCount(), transfer->IsPhysical());
3171 // this transfer may still have data left
3173 transfer->AdvanceByFragment(actualLength);
3175 && transfer->FragmentLength() > 0) {
3176 TRACE("still %" B_PRIuSIZE " bytes left on transfer\n",
3177 transfer->FragmentLength());
3178 callbackStatus = SubmitTransfer(transfer);
3183 transfer->Finished(callbackStatus, 0);
3184 delete transfer;