Lines Matching refs:ctrl
281 struct rt_nvme_controller *nvme = ndev->ctrl; in nvme_blk_rw()
457 struct rt_nvme_controller *nvme = ndev->ctrl; in nvme_blk_read()
519 struct rt_nvme_controller *nvme = ndev->ctrl; in nvme_blk_write()
576 return nvme_submit_io_cmd(ndev->ctrl, &cmd); in nvme_blk_sync()
585 struct rt_nvme_controller *nvme = ndev->ctrl; in nvme_blk_erase()
625 struct rt_nvme_controller *nvme = ndev->ctrl; in nvme_blk_autorefresh()
1086 ndev->ctrl = nvme; in nvme_scan_device()
1134 struct rt_nvme_id_ctrl *ctrl = RT_NULL; in rt_nvme_controller_register() local
1172 if (!(ctrl = rt_malloc_align(sizeof(*ctrl), nvme->page_size))) in rt_nvme_controller_register()
1178 if ((err = nvme_identify(nvme, 0, 1, ctrl))) in rt_nvme_controller_register()
1183 if (ctrl->mdts) in rt_nvme_controller_register()
1185 nvme->max_transfer_shift = ctrl->mdts + (RT_NVME_CAP_MPSMIN(nvme->cap) + 12); in rt_nvme_controller_register()
1192 nvme->volatile_write_cache = ctrl->vwc; in rt_nvme_controller_register()
1193 nvme->write_zeroes = !!(rt_le64_to_cpu(ctrl->oncs) & RT_NVME_CTRL_ONCS_WRITE_ZEROES); in rt_nvme_controller_register()
1195 if ((rt_le32_to_cpu(ctrl->sgls) & RT_NVME_ID_SGL_SUPPORT_MASK)) in rt_nvme_controller_register()
1204 strip_len(ctrl->mn, sizeof(ctrl->mn)), ctrl->mn, in rt_nvme_controller_register()
1205 strip_len(ctrl->fr, sizeof(ctrl->fr)), ctrl->fr); in rt_nvme_controller_register()
1208 if ((err = nvme_scan_device(nvme, rt_le32_to_cpu(ctrl->nn)))) in rt_nvme_controller_register()
1213 rt_free_align(ctrl); in rt_nvme_controller_register()
1222 if (ctrl) in rt_nvme_controller_register()
1224 rt_free_align(ctrl); in rt_nvme_controller_register()