search for: pci_iounmap

Displaying 20 results from an estimated 111 matches for "pci_iounmap".

Did you mean: pci_iomap
2015 Jun 16
2
[PATCH] virtio-pci: alloc only resources actually used.
...t;del_vq = del_vq; return 0; + +err_iomap: + pci_release_region(pci_dev, 0); + return rc; } void virtio_pci_legacy_remove(struct virtio_pci_device *vp_dev) @@ -253,4 +263,5 @@ void virtio_pci_legacy_remove(struct virtio_pci_device *vp_dev) struct pci_dev *pci_dev = vp_dev->pci_dev; pci_iounmap(pci_dev, vp_dev->ioaddr); + pci_release_region(pci_dev, 0); } diff --git a/drivers/virtio/virtio_pci_modern.c b/drivers/virtio/virtio_pci_modern.c index e88e099..b4bd92b 100644 --- a/drivers/virtio/virtio_pci_modern.c +++ b/drivers/virtio/virtio_pci_modern.c @@ -64,6 +64,24 @@ static void vp_io...
2015 Jun 16
2
[PATCH] virtio-pci: alloc only resources actually used.
...t;del_vq = del_vq; return 0; + +err_iomap: + pci_release_region(pci_dev, 0); + return rc; } void virtio_pci_legacy_remove(struct virtio_pci_device *vp_dev) @@ -253,4 +263,5 @@ void virtio_pci_legacy_remove(struct virtio_pci_device *vp_dev) struct pci_dev *pci_dev = vp_dev->pci_dev; pci_iounmap(pci_dev, vp_dev->ioaddr); + pci_release_region(pci_dev, 0); } diff --git a/drivers/virtio/virtio_pci_modern.c b/drivers/virtio/virtio_pci_modern.c index e88e099..b4bd92b 100644 --- a/drivers/virtio/virtio_pci_modern.c +++ b/drivers/virtio/virtio_pci_modern.c @@ -64,6 +64,24 @@ static void vp_io...
2014 Dec 19
2
[PATCH RFC 2/5] s390: add pci_iomap_range
...+{ > + return pci_iomap_range(dev, bar, 0, maxlen); > +} > +EXPORT_SYMBOL(pci_iomap); This was EXPORT_SYMBOL_GPL. I guess, for this patch, it should stay that way. ...Hm, everyone else has this stuff as EXPORT_SYMBOL looks like we should use that too. Regards, Sebastian > > void pci_iounmap(struct pci_dev *pdev, void __iomem *addr) > { > @@ -285,8 +301,12 @@ void pci_iounmap(struct pci_dev *pdev, void __iomem *addr) > > idx = (((__force u64) addr) & ~ZPCI_IOMAP_ADDR_BASE) >> 48; > spin_lock(&zpci_iomap_lock); > - zpci_iomap_start[idx].fh = 0; >...
2014 Dec 19
2
[PATCH RFC 2/5] s390: add pci_iomap_range
...+{ > + return pci_iomap_range(dev, bar, 0, maxlen); > +} > +EXPORT_SYMBOL(pci_iomap); This was EXPORT_SYMBOL_GPL. I guess, for this patch, it should stay that way. ...Hm, everyone else has this stuff as EXPORT_SYMBOL looks like we should use that too. Regards, Sebastian > > void pci_iounmap(struct pci_dev *pdev, void __iomem *addr) > { > @@ -285,8 +301,12 @@ void pci_iounmap(struct pci_dev *pdev, void __iomem *addr) > > idx = (((__force u64) addr) & ~ZPCI_IOMAP_ADDR_BASE) >> 48; > spin_lock(&zpci_iomap_lock); > - zpci_iomap_start[idx].fh = 0; >...
2015 Jun 18
2
[PATCH v2] virtio-pci: alloc only resources actually used.
...t;del_vq = del_vq; return 0; + +err_iomap: + pci_release_region(pci_dev, 0); + return rc; } void virtio_pci_legacy_remove(struct virtio_pci_device *vp_dev) @@ -253,4 +263,5 @@ void virtio_pci_legacy_remove(struct virtio_pci_device *vp_dev) struct pci_dev *pci_dev = vp_dev->pci_dev; pci_iounmap(pci_dev, vp_dev->ioaddr); + pci_release_region(pci_dev, 0); } diff --git a/drivers/virtio/virtio_pci_modern.c b/drivers/virtio/virtio_pci_modern.c index e88e099..d9976ad 100644 --- a/drivers/virtio/virtio_pci_modern.c +++ b/drivers/virtio/virtio_pci_modern.c @@ -64,6 +64,37 @@ static void vp_io...
2015 Jun 18
2
[PATCH v2] virtio-pci: alloc only resources actually used.
...t;del_vq = del_vq; return 0; + +err_iomap: + pci_release_region(pci_dev, 0); + return rc; } void virtio_pci_legacy_remove(struct virtio_pci_device *vp_dev) @@ -253,4 +263,5 @@ void virtio_pci_legacy_remove(struct virtio_pci_device *vp_dev) struct pci_dev *pci_dev = vp_dev->pci_dev; pci_iounmap(pci_dev, vp_dev->ioaddr); + pci_release_region(pci_dev, 0); } diff --git a/drivers/virtio/virtio_pci_modern.c b/drivers/virtio/virtio_pci_modern.c index e88e099..d9976ad 100644 --- a/drivers/virtio/virtio_pci_modern.c +++ b/drivers/virtio/virtio_pci_modern.c @@ -64,6 +64,37 @@ static void vp_io...
2015 Jun 24
1
[PATCH] virtio-pci: alloc only resources actually used.
...t;del_vq = del_vq; return 0; + +err_iomap: + pci_release_region(pci_dev, 0); + return rc; } void virtio_pci_legacy_remove(struct virtio_pci_device *vp_dev) @@ -253,4 +263,5 @@ void virtio_pci_legacy_remove(struct virtio_pci_device *vp_dev) struct pci_dev *pci_dev = vp_dev->pci_dev; pci_iounmap(pci_dev, vp_dev->ioaddr); + pci_release_region(pci_dev, 0); } diff --git a/drivers/virtio/virtio_pci_modern.c b/drivers/virtio/virtio_pci_modern.c index e88e099..8e5cf19 100644 --- a/drivers/virtio/virtio_pci_modern.c +++ b/drivers/virtio/virtio_pci_modern.c @@ -499,7 +499,7 @@ static const str...
2015 Jun 24
1
[PATCH] virtio-pci: alloc only resources actually used.
...t;del_vq = del_vq; return 0; + +err_iomap: + pci_release_region(pci_dev, 0); + return rc; } void virtio_pci_legacy_remove(struct virtio_pci_device *vp_dev) @@ -253,4 +263,5 @@ void virtio_pci_legacy_remove(struct virtio_pci_device *vp_dev) struct pci_dev *pci_dev = vp_dev->pci_dev; pci_iounmap(pci_dev, vp_dev->ioaddr); + pci_release_region(pci_dev, 0); } diff --git a/drivers/virtio/virtio_pci_modern.c b/drivers/virtio/virtio_pci_modern.c index e88e099..8e5cf19 100644 --- a/drivers/virtio/virtio_pci_modern.c +++ b/drivers/virtio/virtio_pci_modern.c @@ -499,7 +499,7 @@ static const str...
2015 Jun 23
1
[PATCH] virtio-pci: alloc only resources actually used.
...t;del_vq = del_vq; return 0; + +err_iomap: + pci_release_region(pci_dev, 0); + return rc; } void virtio_pci_legacy_remove(struct virtio_pci_device *vp_dev) @@ -253,4 +263,5 @@ void virtio_pci_legacy_remove(struct virtio_pci_device *vp_dev) struct pci_dev *pci_dev = vp_dev->pci_dev; pci_iounmap(pci_dev, vp_dev->ioaddr); + pci_release_region(pci_dev, 0); } diff --git a/drivers/virtio/virtio_pci_modern.c b/drivers/virtio/virtio_pci_modern.c index e88e099..122ad7a 100644 --- a/drivers/virtio/virtio_pci_modern.c +++ b/drivers/virtio/virtio_pci_modern.c @@ -499,7 +499,7 @@ static const str...
2015 Jun 23
1
[PATCH] virtio-pci: alloc only resources actually used.
...t;del_vq = del_vq; return 0; + +err_iomap: + pci_release_region(pci_dev, 0); + return rc; } void virtio_pci_legacy_remove(struct virtio_pci_device *vp_dev) @@ -253,4 +263,5 @@ void virtio_pci_legacy_remove(struct virtio_pci_device *vp_dev) struct pci_dev *pci_dev = vp_dev->pci_dev; pci_iounmap(pci_dev, vp_dev->ioaddr); + pci_release_region(pci_dev, 0); } diff --git a/drivers/virtio/virtio_pci_modern.c b/drivers/virtio/virtio_pci_modern.c index e88e099..122ad7a 100644 --- a/drivers/virtio/virtio_pci_modern.c +++ b/drivers/virtio/virtio_pci_modern.c @@ -499,7 +499,7 @@ static const str...
2011 Nov 14
2
[PATCHv2 RFC] virtio-pci: flexible configuration layout
...*/ + p = pci_iomap_range(dev, bir, offset, size, PAGE_SIZE); + if (!p) + dev_err(&vp_dev->vdev.dev, "Unable to map virtio pci memory"); + return p; +err: + dev_err(&vp_dev->vdev.dev, "Unable to parse virtio pci capability"); + return NULL; +} + +static void virtio_pci_iounmap(struct virtio_pci_device *vp_dev) +{ + if (vp_dev->legacy_map) + pci_iounmap(vp_dev->pci_dev, vp_dev->legacy_map); + if (vp_dev->isr_map) + pci_iounmap(vp_dev->pci_dev, vp_dev->isr_map); + if (vp_dev->notify_map) + pci_iounmap(vp_dev->pci_dev, vp_dev->notify_map); + if...
2011 Nov 14
2
[PATCHv2 RFC] virtio-pci: flexible configuration layout
...*/ + p = pci_iomap_range(dev, bir, offset, size, PAGE_SIZE); + if (!p) + dev_err(&vp_dev->vdev.dev, "Unable to map virtio pci memory"); + return p; +err: + dev_err(&vp_dev->vdev.dev, "Unable to parse virtio pci capability"); + return NULL; +} + +static void virtio_pci_iounmap(struct virtio_pci_device *vp_dev) +{ + if (vp_dev->legacy_map) + pci_iounmap(vp_dev->pci_dev, vp_dev->legacy_map); + if (vp_dev->isr_map) + pci_iounmap(vp_dev->pci_dev, vp_dev->isr_map); + if (vp_dev->notify_map) + pci_iounmap(vp_dev->pci_dev, vp_dev->notify_map); + if...
2013 Nov 25
1
[PATCH] virtio: pci: remove unnecessary pci_set_drvdata()
...a/drivers/virtio/virtio_pci.c b/drivers/virtio/virtio_pci.c index a37c699..a416f9b 100644 --- a/drivers/virtio/virtio_pci.c +++ b/drivers/virtio/virtio_pci.c @@ -742,7 +742,6 @@ static int virtio_pci_probe(struct pci_dev *pci_dev, return 0; out_set_drvdata: - pci_set_drvdata(pci_dev, NULL); pci_iounmap(pci_dev, vp_dev->ioaddr); out_req_regions: pci_release_regions(pci_dev); @@ -760,7 +759,6 @@ static void virtio_pci_remove(struct pci_dev *pci_dev) unregister_virtio_device(&vp_dev->vdev); vp_del_vqs(&vp_dev->vdev); - pci_set_drvdata(pci_dev, NULL); pci_iounmap(pci_dev,...
2015 Jan 15
1
[PATCH] virtio_pci_modern: validate features
...+ features = vp_get_features(vdev); + if (!features & (1ULL << VIRTIO_F_VERSION_1)) + goto err_valid_features; + vp_dev->config_vector = vp_config_vector; vp_dev->setup_vq = setup_vq; vp_dev->del_vq = del_vq; return 0; +err_valid_features: + if (vp_dev->device) + pci_iounmap(pci_dev, vp_dev->device); err_map_device: if (vp_dev->notify_base) pci_iounmap(pci_dev, vp_dev->notify_base); -- MST
2013 Nov 25
1
[PATCH] virtio: pci: remove unnecessary pci_set_drvdata()
...a/drivers/virtio/virtio_pci.c b/drivers/virtio/virtio_pci.c index a37c699..a416f9b 100644 --- a/drivers/virtio/virtio_pci.c +++ b/drivers/virtio/virtio_pci.c @@ -742,7 +742,6 @@ static int virtio_pci_probe(struct pci_dev *pci_dev, return 0; out_set_drvdata: - pci_set_drvdata(pci_dev, NULL); pci_iounmap(pci_dev, vp_dev->ioaddr); out_req_regions: pci_release_regions(pci_dev); @@ -760,7 +759,6 @@ static void virtio_pci_remove(struct pci_dev *pci_dev) unregister_virtio_device(&vp_dev->vdev); vp_del_vqs(&vp_dev->vdev); - pci_set_drvdata(pci_dev, NULL); pci_iounmap(pci_dev,...
2015 Jan 15
1
[PATCH] virtio_pci_modern: validate features
...+ features = vp_get_features(vdev); + if (!features & (1ULL << VIRTIO_F_VERSION_1)) + goto err_valid_features; + vp_dev->config_vector = vp_config_vector; vp_dev->setup_vq = setup_vq; vp_dev->del_vq = del_vq; return 0; +err_valid_features: + if (vp_dev->device) + pci_iounmap(pci_dev, vp_dev->device); err_map_device: if (vp_dev->notify_base) pci_iounmap(pci_dev, vp_dev->notify_base); -- MST
2015 Jan 21
9
[PATCH post-squash 0/9] virtio 1.0: virtio-pci fixup
This is just repost of all patches with fixups squashed in - convenient if you just want to remove old ones from queue and apply new ones. I also tweaked commit log for patch "virtio_pci: modern driver" I also included Gerd's tag: Tested-by: Gerd Hoffmann <kraxel at redhat.com> You can find it all before the rebase -i --autosquash in my tree:
2015 Jan 21
9
[PATCH post-squash 0/9] virtio 1.0: virtio-pci fixup
This is just repost of all patches with fixups squashed in - convenient if you just want to remove old ones from queue and apply new ones. I also tweaked commit log for patch "virtio_pci: modern driver" I also included Gerd's tag: Tested-by: Gerd Hoffmann <kraxel at redhat.com> You can find it all before the rebase -i --autosquash in my tree:
2015 Jun 16
0
[PATCH] virtio-pci: alloc only resources actually used.
...: > + pci_release_region(pci_dev, 0); > + return rc; > } > > void virtio_pci_legacy_remove(struct virtio_pci_device *vp_dev) > @@ -253,4 +263,5 @@ void virtio_pci_legacy_remove(struct virtio_pci_device *vp_dev) > struct pci_dev *pci_dev = vp_dev->pci_dev; > > pci_iounmap(pci_dev, vp_dev->ioaddr); > + pci_release_region(pci_dev, 0); > } > diff --git a/drivers/virtio/virtio_pci_modern.c b/drivers/virtio/virtio_pci_modern.c > index e88e099..b4bd92b 100644 > --- a/drivers/virtio/virtio_pci_modern.c > +++ b/drivers/virtio/virtio_pci_modern.c > @...
2011 Mar 14
1
[PATCH] virtio_pci: Prevent double-free of pci regions after device hot-unplug
...he port's device. This results in the parent device's structures to be freed as well. This includes the PCI regions for the virtio-console PCI device. Once this is done, however, virtio_pci_release_dev() kicks in, as the last ref to the virtio device is now gone, and attempts to do pci_iounmap(pci_dev, vp_dev->ioaddr); pci_release_regions(pci_dev); pci_disable_device(pci_dev); which results in a double-free warning. Move the code that releases regions, etc., to the virtio_pci_remove() function, and all that's now left in release_dev is the final freeing of the vp_dev....