class TransferRequestProcessor
Defined at line 36 of file ../../src/devices/block/drivers/ufs/transfer_request_processor.h
Owns and processes the UTP transfer request list.
Public Methods
zx::result<std::unique_ptr<TransferRequestProcessor>> Create (Ufs &ufs,zx::unowned_btibti,const fdf::MmioViewmmio,uint8_tentry_count)
Defined at line 38 of file ../../src/devices/block/drivers/ufs/transfer_request_processor.h
void TransferRequestProcessor (RequestListrequest_list,Ufs &ufs,zx::unowned_btibti,const fdf::MmioViewmmio,uint32_tslot_count)
Defined at line 49 of file ../../src/devices/block/drivers/ufs/transfer_request_processor.h
void ~TransferRequestProcessor ()
Defined at line 52 of file ../../src/devices/block/drivers/ufs/transfer_request_processor.h
bool CheckAdminCommandCompleted (uint32_t doorbell)
Defined at line 62 of file ../../src/devices/block/drivers/ufs/transfer_request_processor.h
zx::result<> Init ()
Defined at line 72 of file ../../src/devices/block/drivers/ufs/transfer_request_processor.cc
zx::result<uint8_t> ReserveAdminSlot ()
Allocate a slot to submit an Admin command. Use slot 31 to avoid conflicts with I/O commands.
Defined at line 99 of file ../../src/devices/block/drivers/ufs/transfer_request_processor.cc
uint32_t ProcessCompletionOfAdminRequests ()
Defined at line 509 of file ../../src/devices/block/drivers/ufs/transfer_request_processor.cc
uint32_t ProcessCompletionOfIoRequests ()
Defined at line 527 of file ../../src/devices/block/drivers/ufs/transfer_request_processor.cc
zx_time_t GetEarliestTimeoutDeadline ()
Find the earliest timeout deadline of the in-flight I/O.
Defined at line 562 of file ../../src/devices/block/drivers/ufs/transfer_request_processor.cc
zx::result<std::unique_ptr<ResponseUpiu>> SendAdminScsiCmd (ScsiCommandUpiu &request,uint8_tlun,zx::unowned_vmodata_vmo)
|SendAdminScsiCmd| allocates the admin slot for a SCSI command and calls SendRequestUsingSlot.
Blocks until completion and returns the result.
Defined at line 111 of file ../../src/devices/block/drivers/ufs/transfer_request_processor.cc
void SendIoScsiCmd (ScsiCommandUpiu &request,uint8_tlun,uint8_tslot,zx::unowned_vmodata_vmo,uint64_tdma_offset,uint64_tdma_length,fit::callback<void (zx_status_t)>completion_cb,block_server::internal::InlineCryptoOptionsinline_crypto)
|SendIoScsiCmd| sends an asynchronous SCSI command using a previously reserved I/O slot.
The |completion_cb| is guaranteed to be invoked, and the |slot| will be automatically
released, regardless of whether the request is successfully submitted or fails early.
Defined at line 124 of file ../../src/devices/block/drivers/ufs/transfer_request_processor.cc
zx::result<std::unique_ptr<QueryResponseUpiu>> SendQueryRequestUpiu (QueryRequestUpiu & request)
This function is a wrapper function that sends a query request UPIU.
Defined at line 194 of file ../../src/devices/block/drivers/ufs/transfer_request_processor.cc
template <>
std::tuple<uint16_t, uint32_t> PreparePrdt<ufs::ScsiCommandUpiu> (ScsiCommandUpiu &request,uint8_tlun,uint8_tslot,const std::vector<zx_paddr_t> &buffer_phys,uint16_tresponse_offset,uint16_tresponse_length)
Defined at line 40 of file ../../src/devices/block/drivers/ufs/transfer_request_processor.cc
template <class RequestType>
std::tuple<uint16_t, uint32_t> PreparePrdt (RequestType &request,uint8_tlun,uint8_tslot,const std::vector<zx_paddr_t> &buffer_phys,uint16_tresponse_offset,uint16_tresponse_length)
Defined at line 95 of file ../../src/devices/block/drivers/ufs/transfer_request_processor.h
uint32_t GetInflightIoCount ()
Defined at line 117 of file ../../src/devices/block/drivers/ufs/transfer_request_processor.h
template <class RequestType, class ResponseType>
zx::result<std::unique_ptr<ResponseType>> SendRequestUpiu (RequestType &request,uint8_tlun,zx::unowned_vmodata_vmo,uint64_tdma_offset,uint64_tdma_length)
|SendRequestUpiu| allocates a slot for request UPIU and calls SendRequestUsingSlot.
This function is only ever used for admin commands.
Defined at line 133 of file ../../src/devices/block/drivers/ufs/transfer_request_processor.cc
template <class RequestType>
void SendRequestUsingSlot (RequestType &request,uint8_tlun,uint8_tslot,zx::unowned_vmodata_vmo,uint64_tdma_offset,uint64_tdma_length,fit::callback<void (zx_status_t)>completion_cb,block_server::internal::InlineCryptoOptionsinline_crypto)
Low-level helper that sets up descriptor and PRDT buffers for a reserved slot, pins data VMO,
and rings the doorbell. Invokes |completion_cb| when the hardware request completes, or
immediately with an error status if slot preparation fails.
Defined at line 208 of file ../../src/devices/block/drivers/ufs/transfer_request_processor.cc
Friends
class UfsTest