[Denali] Move AHCI read to internal method as well.
This commit is contained in:
parent
3e1da2bc90
commit
69ce3028fa
6 changed files with 19 additions and 117 deletions
|
|
@ -20,8 +20,8 @@ glcr::Status DenaliServer::HandleRead(const ReadRequest& req,
|
|||
mmth::OwnedMemoryRegion region =
|
||||
mmth::OwnedMemoryRegion::ContiguousPhysical(req.size() * 512, &paddr);
|
||||
|
||||
DmaReadCommand command(req.lba(), req.size(), paddr);
|
||||
ASSIGN_OR_RETURN(auto semaphore, device->IssueCommand(command));
|
||||
ASSIGN_OR_RETURN(auto semaphore,
|
||||
device->IssueRead(req.lba(), req.size(), paddr));
|
||||
semaphore->Wait();
|
||||
|
||||
resp.set_device_id(req.device_id());
|
||||
|
|
@ -49,8 +49,8 @@ glcr::Status DenaliServer::HandleReadMany(const ReadManyRequest& req,
|
|||
for (uint64_t i = 0; i < req.lba().size(); i++) {
|
||||
uint64_t lba = req.lba().at(i);
|
||||
uint64_t size = req.sector_cnt().at(i);
|
||||
DmaReadCommand command(lba, size, region_paddr);
|
||||
ASSIGN_OR_RETURN(auto semaphore, device->IssueCommand(command));
|
||||
ASSIGN_OR_RETURN(auto semaphore,
|
||||
device->IssueRead(lba, size, region_paddr));
|
||||
semaphore->Wait();
|
||||
|
||||
region_paddr += size * 512;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue