Displaying 20 results from an estimated 60 matches for "err_free_dev".
2020 Apr 14
0
[PATCH v2 20/33] iommu/virtio: Convert to probe/release_device() call-backs
...if (!viommu)
- return -ENODEV;
+ return ERR_PTR(-ENODEV);
vdev = kzalloc(sizeof(*vdev), GFP_KERNEL);
if (!vdev)
- return -ENOMEM;
+ return ERR_PTR(-ENOMEM);
vdev->dev = dev;
vdev->viommu = viommu;
@@ -896,45 +895,25 @@ static int viommu_add_device(struct device *dev)
goto err_free_dev;
}
- ret = iommu_device_link(&viommu->iommu, dev);
- if (ret)
- goto err_free_dev;
+ return &viommu->iommu;
- /*
- * Last step creates a default domain and attaches to it. Everything
- * must be ready.
- */
- group = iommu_group_get_for_dev(dev);
- if (IS_ERR(group)) {
- re...
2018 Nov 15
0
[PATCH v4 6/7] iommu/virtio: Add probe request
...return -ENOMEM;
+ vdev->dev = dev;
vdev->viommu = viommu;
+ INIT_LIST_HEAD(&vdev->resv_regions);
fwspec->iommu_priv = vdev;
+ if (viommu->probe_size) {
+ /* Get additional information for this endpoint */
+ ret = viommu_probe_endpoint(viommu, dev);
+ if (ret)
+ goto err_free_dev;
+ }
+
ret = iommu_device_link(&viommu->iommu, dev);
if (ret)
goto err_free_dev;
@@ -696,6 +833,7 @@ static int viommu_add_device(struct device *dev)
err_unlink_dev:
iommu_device_unlink(&viommu->iommu, dev);
err_free_dev:
+ viommu_put_resv_regions(dev, &vdev->resv_re...
2020 Dec 01
1
[PATCH v2 04/20] drm/bochs: Remove references to struct drm_device.pdev
...ions(-)
diff --git a/drivers/gpu/drm/bochs/bochs_drv.c b/drivers/gpu/drm/bochs/bochs_drv.c
index fd454225fd19..b469624fe40d 100644
--- a/drivers/gpu/drm/bochs/bochs_drv.c
+++ b/drivers/gpu/drm/bochs/bochs_drv.c
@@ -121,7 +121,6 @@ static int bochs_pci_probe(struct pci_dev *pdev,
if (ret)
goto err_free_dev;
- dev->pdev = pdev;
pci_set_drvdata(pdev, dev);
ret = bochs_load(dev);
diff --git a/drivers/gpu/drm/bochs/bochs_hw.c b/drivers/gpu/drm/bochs/bochs_hw.c
index dce4672e3fc8..2d7380a9890e 100644
--- a/drivers/gpu/drm/bochs/bochs_hw.c
+++ b/drivers/gpu/drm/bochs/bochs_hw.c
@@ -110,7 +110,7...
2018 Nov 15
1
[PATCH v3 6/7] iommu/virtio: Add probe request
...> + if (viommu->probe_size) {
> + /* Get additional information for this endpoint */
> + ret = viommu_probe_endpoint(viommu, dev);
> + if (ret)
leaks vdev
> + return ret;
> + }
> +
> ret = iommu_device_link(&viommu->iommu, dev);
> if (ret)
> goto err_free_dev;
> @@ -717,6 +845,7 @@ static int viommu_add_device(struct device *dev)
> iommu_device_unlink(&viommu->iommu, dev);
>
> err_free_dev:
> + viommu_put_resv_regions(dev, &vdev->resv_regions);
> kfree(vdev);
>
> return ret;
> @@ -734,6 +863,7 @@ stati...
2018 Oct 12
0
[PATCH v3 6/7] iommu/virtio: Add probe request
...amp;vdev->resv_regions);
fwspec->iommu_priv = vdev;
+ if (viommu->probe_size) {
+ /* Get additional information for this endpoint */
+ ret = viommu_probe_endpoint(viommu, dev);
+ if (ret)
+ return ret;
+ }
+
ret = iommu_device_link(&viommu->iommu, dev);
if (ret)
goto err_free_dev;
@@ -717,6 +845,7 @@ static int viommu_add_device(struct device *dev)
iommu_device_unlink(&viommu->iommu, dev);
err_free_dev:
+ viommu_put_resv_regions(dev, &vdev->resv_regions);
kfree(vdev);
return ret;
@@ -734,6 +863,7 @@ static void viommu_remove_device(struct device *de...
2018 Jun 21
0
[PATCH v2 3/5] iommu/virtio: Add probe request
...amp;vdev->resv_regions);
fwspec->iommu_priv = vdev;
+ if (viommu->probe_size) {
+ /* Get additional information for this endpoint */
+ ret = viommu_probe_endpoint(viommu, dev);
+ if (ret)
+ return ret;
+ }
+
ret = iommu_device_link(&viommu->iommu, dev);
if (ret)
goto err_free_dev;
@@ -708,6 +838,7 @@ static int viommu_add_device(struct device *dev)
iommu_device_unlink(&viommu->iommu, dev);
err_free_dev:
+ viommu_put_resv_regions(dev, &vdev->resv_regions);
kfree(vdev);
return ret;
@@ -725,6 +856,7 @@ static void viommu_remove_device(struct device *de...
2018 Nov 08
1
[PATCH v3 6/7] iommu/virtio: Add probe request
...dev;
>
> + if (viommu->probe_size) {
> + /* Get additional information for this endpoint */
> + ret = viommu_probe_endpoint(viommu, dev);
> + if (ret)
> + return ret;
> + }
> +
> ret = iommu_device_link(&viommu->iommu, dev);
> if (ret)
> goto err_free_dev;
> @@ -717,6 +845,7 @@ static int viommu_add_device(struct device *dev)
> iommu_device_unlink(&viommu->iommu, dev);
>
> err_free_dev:
> + viommu_put_resv_regions(dev, &vdev->resv_regions);
> kfree(vdev);
>
> return ret;
> @@ -734,6 +863,7 @@ stati...
2018 Jun 22
1
[PATCH v2 3/5] iommu/virtio: Add probe request
...dev;
>
> + if (viommu->probe_size) {
> + /* Get additional information for this endpoint */
> + ret = viommu_probe_endpoint(viommu, dev);
> + if (ret)
> + return ret;
> + }
> +
> ret = iommu_device_link(&viommu->iommu, dev);
> if (ret)
> goto err_free_dev;
> @@ -708,6 +838,7 @@ static int viommu_add_device(struct device *dev)
> iommu_device_unlink(&viommu->iommu, dev);
>
> err_free_dev:
> + viommu_put_resv_regions(dev, &vdev->resv_regions);
> kfree(vdev);
>
> return ret;
> @@ -725,6 +856,7 @@ stati...
2019 Feb 21
2
[PATCH] drm/bochs: Fix the ID mismatch error
.../bochs_drv.c
index f3dd66ae990a..aa35007262cd 100644
--- a/drivers/gpu/drm/bochs/bochs_drv.c
+++ b/drivers/gpu/drm/bochs/bochs_drv.c
@@ -154,6 +154,10 @@ static int bochs_pci_probe(struct pci_dev *pdev,
if (IS_ERR(dev))
return PTR_ERR(dev);
+ ret = pci_enable_device(pdev);
+ if (ret)
+ goto err_free_dev;
+
dev->pdev = pdev;
pci_set_drvdata(pdev, dev);
--
2.20.1
2019 Dec 09
0
[PATCH v2 5/5] iommu: virtio: Use iommu_put_resv_regions_simple()
...-
- list_for_each_entry_safe(entry, next, head, list)
- kfree(entry);
-}
-
static struct iommu_ops viommu_ops;
static struct virtio_driver virtio_iommu_drv;
@@ -914,7 +906,7 @@ static int viommu_add_device(struct device *dev)
err_unlink_dev:
iommu_device_unlink(&viommu->iommu, dev);
err_free_dev:
- viommu_put_resv_regions(dev, &vdev->resv_regions);
+ iommu_put_resv_regions_simple(dev, &vdev->resv_regions);
kfree(vdev);
return ret;
@@ -932,7 +924,7 @@ static void viommu_remove_device(struct device *dev)
iommu_group_remove_device(dev);
iommu_device_unlink(&vdev-...
2020 Apr 21
0
[PATCH v1] drm/bochs: fix an issue of ioremap() leak
...a60135c8a 100644
> --- a/drivers/gpu/drm/bochs/bochs_drv.c
> +++ b/drivers/gpu/drm/bochs/bochs_drv.c
> @@ -138,6 +138,7 @@ static int bochs_pci_probe(struct pci_dev *pdev,
> return ret;
>
> err_unload:
> + bochs_hw_fini(dev);
> bochs_unload(dev);
> err_free_dev:
> drm_dev_put(dev);
> --
> 2.25.0
>
--
With Best Regards,
Andy Shevchenko
2020 Apr 22
0
[PATCH v1] drm/bochs: fix an issue of ioremap() leak
...b/drivers/gpu/drm/bochs/bochs_drv.c
> > > @@ -138,6 +138,7 @@ static int bochs_pci_probe(struct pci_dev *pdev,
> > > return ret;
> > >
> > > err_unload:
> > > + bochs_hw_fini(dev);
> > > bochs_unload(dev);
> > > err_free_dev:
> > > drm_dev_put(dev);
> > > --
> > > 2.25.0
> > >
> >
> >
> > --
> > With Best Regards,
> > Andy Shevchenko
--
With Best Regards,
Andy Shevchenko
2019 Feb 21
2
[PATCH] drm/bochs: Fix the ID mismatch error
.../bochs_drv.c
index f3dd66ae990a..aa35007262cd 100644
--- a/drivers/gpu/drm/bochs/bochs_drv.c
+++ b/drivers/gpu/drm/bochs/bochs_drv.c
@@ -154,6 +154,10 @@ static int bochs_pci_probe(struct pci_dev *pdev,
if (IS_ERR(dev))
return PTR_ERR(dev);
+ ret = pci_enable_device(pdev);
+ if (ret)
+ goto err_free_dev;
+
dev->pdev = pdev;
pci_set_drvdata(pdev, dev);
--
2.20.1
2018 Nov 15
12
[PATCH v4 0/7] Add virtio-iommu driver
Implement the virtio-iommu driver, following specification v0.8 [1].
Changes since v3 [2]:
* Rebase onto v4.20-rc2. Patch 3 now touches drivers/of/base.c instead
of drivers/pci/of.c, since the map_rid() function has moved.
* Removed the request timeout, that depended on DEBUG.
* Other small fixes addressing comments on v3.
You can find Linux driver and kvmtool device on my virtio-iommu/v0.8.1
2018 Oct 12
18
[PATCH v3 0/7] Add virtio-iommu driver
Implement the virtio-iommu driver, following specification v0.8 [1].
Changes since v2 [2]:
* Patches 2-4 allow virtio-iommu to use the PCI transport, since QEMU
would like to phase out the MMIO transport. This produces a complex
topology where the programming interface of the IOMMU could appear
lower than the endpoints that it translates. It's not unheard of (e.g.
AMD IOMMU), and the
2018 Oct 12
18
[PATCH v3 0/7] Add virtio-iommu driver
Implement the virtio-iommu driver, following specification v0.8 [1].
Changes since v2 [2]:
* Patches 2-4 allow virtio-iommu to use the PCI transport, since QEMU
would like to phase out the MMIO transport. This produces a complex
topology where the programming interface of the IOMMU could appear
lower than the endpoints that it translates. It's not unheard of (e.g.
AMD IOMMU), and the
2018 Jun 21
11
[PATCH v2 0/5] Add virtio-iommu driver
Implement the base virtio-iommu driver, following version 0.7 of the
specification [1].
Changes since last version [2]:
* Address comments, thanks again for the review.
* As suggested, add a DT binding description in patch 1.
* Depend on VIRTIO_MMIO=y to fix a build failure?
* Switch to v0.7 of the spec, which changes resv_mem parameters and adds
an MMIO flag. These are trivial but not backward
2018 Jun 21
11
[PATCH v2 0/5] Add virtio-iommu driver
Implement the base virtio-iommu driver, following version 0.7 of the
specification [1].
Changes since last version [2]:
* Address comments, thanks again for the review.
* As suggested, add a DT binding description in patch 1.
* Depend on VIRTIO_MMIO=y to fix a build failure?
* Switch to v0.7 of the spec, which changes resv_mem parameters and adds
an MMIO flag. These are trivial but not backward
2019 May 30
10
[PATCH v8 0/7] Add virtio-iommu driver
Implement the virtio-iommu driver, following specification v0.12 [1].
Since last version [2] we've worked on improving the specification,
which resulted in the following changes to the interface:
* Remove the EXEC flag.
* Add feature bit for the MMIO flag.
* Change domain_bits to domain_range.
Given that there were small changes to patch 5/7, I removed the review
and test tags. Please find
2018 Dec 11
13
[PATCH v6 0/7] Add virtio-iommu driver
Implement the virtio-iommu driver, following specification v0.9 [1].
Only minor changes since v5 [2]. I fixed issues reported by Michael and
added tags from Eric and Bharat. Thanks!
You can find Linux driver and kvmtool device on v0.9 branches [3],
module and x86 support on virtio-iommu/devel. Also tested with Eric's
QEMU device [4].
[1] Virtio-iommu specification v0.9, sources and pdf