MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / nvme_blk_sync

Function nvme_blk_sync

components/drivers/nvme/nvme.c:567–577  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

565}
566
567static rt_err_t nvme_blk_sync(struct rt_blk_disk *disk)
568{
569 struct rt_nvme_command cmd;
570 struct rt_nvme_device *ndev = rt_disk_to_nvme_device(disk);
571
572 rt_memset(&cmd, 0, sizeof(cmd));
573 cmd.common.opcode = RT_NVME_CMD_FLUSH;
574 cmd.common.nsid = rt_cpu_to_le32(ndev->nsid);
575
576 return nvme_submit_io_cmd(ndev->ctrl, &cmd);
577}
578
579static rt_err_t nvme_blk_erase(struct rt_blk_disk *disk)
580{

Callers

nothing calls this directly

Calls 2

rt_memsetFunction · 0.85
nvme_submit_io_cmdFunction · 0.85

Tested by

no test coverage detected