Commit a91c6db7 authored by Bjorn Helgaas's avatar Bjorn Helgaas

Merge branch 'pci/ctrl/vmd'

- Use devm_kasprintf() instead of simple kasprintf() (Subramanian Mohan)

- Add [8086:7D0B] and [8086:AD0B] devices to VMD driver (Francisco Munoz)

* pci/ctrl/vmd:
  PCI: vmd: Add DID 8086:7D0B and 8086:AD0B for Intel MTL SKUs
  PCI: vmd: Use devm_kasprintf() instead of simple kasprintf()
parents 64451ac8 57a128ac
...@@ -898,7 +898,8 @@ static int vmd_probe(struct pci_dev *dev, const struct pci_device_id *id) ...@@ -898,7 +898,8 @@ static int vmd_probe(struct pci_dev *dev, const struct pci_device_id *id)
if (vmd->instance < 0) if (vmd->instance < 0)
return vmd->instance; return vmd->instance;
vmd->name = kasprintf(GFP_KERNEL, "vmd%d", vmd->instance); vmd->name = devm_kasprintf(&dev->dev, GFP_KERNEL, "vmd%d",
vmd->instance);
if (!vmd->name) { if (!vmd->name) {
err = -ENOMEM; err = -ENOMEM;
goto out_release_instance; goto out_release_instance;
...@@ -936,7 +937,6 @@ static int vmd_probe(struct pci_dev *dev, const struct pci_device_id *id) ...@@ -936,7 +937,6 @@ static int vmd_probe(struct pci_dev *dev, const struct pci_device_id *id)
out_release_instance: out_release_instance:
ida_simple_remove(&vmd_instance_ida, vmd->instance); ida_simple_remove(&vmd_instance_ida, vmd->instance);
kfree(vmd->name);
return err; return err;
} }
...@@ -959,7 +959,6 @@ static void vmd_remove(struct pci_dev *dev) ...@@ -959,7 +959,6 @@ static void vmd_remove(struct pci_dev *dev)
vmd_detach_resources(vmd); vmd_detach_resources(vmd);
vmd_remove_irq_domain(vmd); vmd_remove_irq_domain(vmd);
ida_simple_remove(&vmd_instance_ida, vmd->instance); ida_simple_remove(&vmd_instance_ida, vmd->instance);
kfree(vmd->name);
} }
#ifdef CONFIG_PM_SLEEP #ifdef CONFIG_PM_SLEEP
...@@ -1013,6 +1012,14 @@ static const struct pci_device_id vmd_ids[] = { ...@@ -1013,6 +1012,14 @@ static const struct pci_device_id vmd_ids[] = {
.driver_data = VMD_FEAT_HAS_MEMBAR_SHADOW_VSCAP | .driver_data = VMD_FEAT_HAS_MEMBAR_SHADOW_VSCAP |
VMD_FEAT_HAS_BUS_RESTRICTIONS | VMD_FEAT_HAS_BUS_RESTRICTIONS |
VMD_FEAT_OFFSET_FIRST_VECTOR,}, VMD_FEAT_OFFSET_FIRST_VECTOR,},
{PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x7d0b),
.driver_data = VMD_FEAT_HAS_MEMBAR_SHADOW_VSCAP |
VMD_FEAT_HAS_BUS_RESTRICTIONS |
VMD_FEAT_OFFSET_FIRST_VECTOR,},
{PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0xad0b),
.driver_data = VMD_FEAT_HAS_MEMBAR_SHADOW_VSCAP |
VMD_FEAT_HAS_BUS_RESTRICTIONS |
VMD_FEAT_OFFSET_FIRST_VECTOR,},
{PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_VMD_9A0B), {PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_VMD_9A0B),
.driver_data = VMD_FEAT_HAS_MEMBAR_SHADOW_VSCAP | .driver_data = VMD_FEAT_HAS_MEMBAR_SHADOW_VSCAP |
VMD_FEAT_HAS_BUS_RESTRICTIONS | VMD_FEAT_HAS_BUS_RESTRICTIONS |
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment