]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - drivers/nvme/host/lightnvm.c
nvme: fix lightnvm check
[mirror_ubuntu-bionic-kernel.git] / drivers / nvme / host / lightnvm.c
index c1a28569e843c67f6e17c97bb1cf1497ff48b02d..1f79e3f141e64d50002d3c4c0459502e1463c0b7 100644 (file)
@@ -955,29 +955,3 @@ void nvme_nvm_unregister_sysfs(struct nvme_ns *ns)
        sysfs_remove_group(&disk_to_dev(ns->disk)->kobj,
                                        &nvm_dev_attr_group);
 }
-
-/* move to shared place when used in multiple places. */
-#define PCI_VENDOR_ID_CNEX 0x1d1d
-#define PCI_DEVICE_ID_CNEX_WL 0x2807
-#define PCI_DEVICE_ID_CNEX_QEMU 0x1f1f
-
-int nvme_nvm_ns_supported(struct nvme_ns *ns, struct nvme_id_ns *id)
-{
-       struct nvme_ctrl *ctrl = ns->ctrl;
-       /* XXX: this is poking into PCI structures from generic code! */
-       struct pci_dev *pdev = to_pci_dev(ctrl->dev);
-
-       /* QEMU NVMe simulator - PCI ID + Vendor specific bit */
-       if (pdev->vendor == PCI_VENDOR_ID_CNEX &&
-                               pdev->device == PCI_DEVICE_ID_CNEX_QEMU &&
-                                                       id->vs[0] == 0x1)
-               return 1;
-
-       /* CNEX Labs - PCI ID + Vendor specific bit */
-       if (pdev->vendor == PCI_VENDOR_ID_CNEX &&
-                               pdev->device == PCI_DEVICE_ID_CNEX_WL &&
-                                                       id->vs[0] == 0x1)
-               return 1;
-
-       return 0;
-}