Lines Matching refs:ndev

698 	struct nvme_dev *ndev = dev_get_priv(udev->parent);  in nvme_blk_probe()  local
705 id = memalign(ndev->page_size, sizeof(struct nvme_id_ns)); in nvme_blk_probe()
710 ns->dev = ndev; in nvme_blk_probe()
713 if (nvme_identify(ndev, ns->ns_id, 0, (dma_addr_t)(long)id)) { in nvme_blk_probe()
724 list_add(&ns->list, &ndev->namespaces); in nvme_blk_probe()
732 memcpy(desc->product, ndev->serial, sizeof(ndev->serial)); in nvme_blk_probe()
733 memcpy(desc->revision, ndev->firmware_rev, sizeof(ndev->firmware_rev)); in nvme_blk_probe()
837 struct nvme_dev *ndev = dev_get_priv(udev); in nvme_probe() local
839 ndev->instance = trailing_strtol(udev->name); in nvme_probe()
841 INIT_LIST_HEAD(&ndev->namespaces); in nvme_probe()
842 ndev->bar = dm_pci_map_bar(udev, PCI_BASE_ADDRESS_0, in nvme_probe()
844 if (readl(&ndev->bar->csts) == -1) { in nvme_probe()
850 ndev->queues = malloc(NVME_Q_NUM * sizeof(struct nvme_queue *)); in nvme_probe()
851 if (!ndev->queues) { in nvme_probe()
856 memset(ndev->queues, 0, NVME_Q_NUM * sizeof(struct nvme_queue *)); in nvme_probe()
858 ndev->cap = nvme_readq(&ndev->bar->cap); in nvme_probe()
859 ndev->q_depth = min_t(int, NVME_CAP_MQES(ndev->cap) + 1, NVME_Q_DEPTH); in nvme_probe()
860 ndev->db_stride = 1 << NVME_CAP_STRIDE(ndev->cap); in nvme_probe()
861 ndev->dbs = ((void __iomem *)ndev->bar) + 4096; in nvme_probe()
863 ret = nvme_configure_admin_queue(ndev); in nvme_probe()
868 ndev->prp_pool = memalign(ndev->page_size, MAX_PRP_POOL); in nvme_probe()
869 if (!ndev->prp_pool) { in nvme_probe()
874 ndev->prp_entry_num = MAX_PRP_POOL >> 3; in nvme_probe()
876 ret = nvme_setup_io_queues(ndev); in nvme_probe()
880 nvme_get_info_from_identify(ndev); in nvme_probe()
885 free((void *)ndev->queues); in nvme_probe()