Displaying 20 results from an estimated 256 matches for "pci_disable_device".
2017 Dec 14
4
[PATCH v2 1/3] virtio_pci: use put_device instead of kfree
...t; pci_set_master(pci_dev);
>
> rc = register_virtio_device(&vp_dev->vdev);
> - if (rc)
> - goto err_register;
> + if (rc) {
> + if (vp_dev->ioaddr)
> + virtio_pci_legacy_remove(vp_dev);
> + else
> + virtio_pci_modern_remove(vp_dev);
> + pci_disable_device(pci_dev);
> + put_device(&vp_dev->vdev.dev);
> + }
>
> - return 0;
> + return rc;
>
> -err_register:
> - if (vp_dev->ioaddr)
> - virtio_pci_legacy_remove(vp_dev);
> - else
> - virtio_pci_modern_remove(vp_dev);
> err_probe:
> pci_dis...
2017 Dec 14
4
[PATCH v2 1/3] virtio_pci: use put_device instead of kfree
...t; pci_set_master(pci_dev);
>
> rc = register_virtio_device(&vp_dev->vdev);
> - if (rc)
> - goto err_register;
> + if (rc) {
> + if (vp_dev->ioaddr)
> + virtio_pci_legacy_remove(vp_dev);
> + else
> + virtio_pci_modern_remove(vp_dev);
> + pci_disable_device(pci_dev);
> + put_device(&vp_dev->vdev.dev);
> + }
>
> - return 0;
> + return rc;
>
> -err_register:
> - if (vp_dev->ioaddr)
> - virtio_pci_legacy_remove(vp_dev);
> - else
> - virtio_pci_modern_remove(vp_dev);
> err_probe:
> pci_dis...
2017 Dec 12
1
[PATCH 1/3] virtio_pci: use put_device instead of kfree
...t; pci_set_master(pci_dev);
>
> rc = register_virtio_device(&vp_dev->vdev);
> - if (rc)
> - goto err_register;
> + if (rc) {
> + if (vp_dev->ioaddr)
> + virtio_pci_legacy_remove(vp_dev);
> + else
> + virtio_pci_modern_remove(vp_dev);
> + pci_disable_device(pci_dev);
> + put_device(&vp_dev->vdev.dev);
> + }
>
> - return 0;
> + return rc;
>
> -err_register:
> - if (vp_dev->ioaddr)
> - virtio_pci_legacy_remove(vp_dev);
> - else
> - virtio_pci_modern_remove(vp_dev);
> err_probe:
> pci_dis...
2017 Dec 12
1
[PATCH 1/3] virtio_pci: use put_device instead of kfree
...t; pci_set_master(pci_dev);
>
> rc = register_virtio_device(&vp_dev->vdev);
> - if (rc)
> - goto err_register;
> + if (rc) {
> + if (vp_dev->ioaddr)
> + virtio_pci_legacy_remove(vp_dev);
> + else
> + virtio_pci_modern_remove(vp_dev);
> + pci_disable_device(pci_dev);
> + put_device(&vp_dev->vdev.dev);
> + }
>
> - return 0;
> + return rc;
>
> -err_register:
> - if (vp_dev->ioaddr)
> - virtio_pci_legacy_remove(vp_dev);
> - else
> - virtio_pci_modern_remove(vp_dev);
> err_probe:
> pci_dis...
2019 Sep 16
6
[PATCH 0/2] drm/nouveau: Two more fixes
...change, but
I'm also not exactly sure I understand what BAR2 is used for, so I don't
know if I would've even covered those code paths (other than the one
causing the crash at probe time) in my tests.
It'd be great to get Lyude's feedback on the second patch, since that
call to pci_disable_device() was rather oddly placed and I'm not sure if
that was essential for things to work or whether the slightly different
point in time where it's called after this patch is also okay. It looks
to me like it should work fine, but I don't currently have a way to test
this on desktop GPUs.
T...
2011 Nov 15
1
[PATCH v2 09/11] virtio: net: Add freeze, restore handlers to support S4
..._device_detach here,
> otherwise guest might be in the process of using the vq for transmit at
> this point.
Done.
> I think we also must make sure NAPI RX handler is not in progress.
How to do that? napi_disable() / napi_enable() doesn't seem right
(and it doesn't work, too). pci_disable_device() in the suspend
routine may work?
> We also might need to mask interrupts from the device
> to prevent TX or RX from getting rescheduled?
pci_disable_device() will help this too, right?
Amit
2011 Nov 15
1
[PATCH v2 09/11] virtio: net: Add freeze, restore handlers to support S4
..._device_detach here,
> otherwise guest might be in the process of using the vq for transmit at
> this point.
Done.
> I think we also must make sure NAPI RX handler is not in progress.
How to do that? napi_disable() / napi_enable() doesn't seem right
(and it doesn't work, too). pci_disable_device() in the suspend
routine may work?
> We also might need to mask interrupts from the device
> to prevent TX or RX from getting rescheduled?
pci_disable_device() will help this too, right?
Amit
2011 Mar 14
1
[PATCH] virtio_pci: Prevent double-free of pci regions after device hot-unplug
...reed 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.
Signed-off-by: Amit Shah <amit.shah at redhat.com>
---
drivers/virtio/virtio_pci...
2011 Mar 14
1
[PATCH] virtio_pci: Prevent double-free of pci regions after device hot-unplug
...reed 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.
Signed-off-by: Amit Shah <amit.shah at redhat.com>
---
drivers/virtio/virtio_pci...
2015 Jan 02
3
[PATCH 1/2] virtio_pci: double free and invalid memory access of device vqs
...tio_pci_legacy.c
+++ b/drivers/virtio/virtio_pci_legacy.c
@@ -298,7 +298,6 @@ void virtio_pci_legacy_remove(struct pci_dev *pci_dev)
unregister_virtio_device(&vp_dev->vdev);
- vp_del_vqs(&vp_dev->vdev);
pci_iounmap(pci_dev, vp_dev->ioaddr);
pci_release_regions(pci_dev);
pci_disable_device(pci_dev);
--
1.7.10.4
2015 Jan 02
3
[PATCH 1/2] virtio_pci: double free and invalid memory access of device vqs
...tio_pci_legacy.c
+++ b/drivers/virtio/virtio_pci_legacy.c
@@ -298,7 +298,6 @@ void virtio_pci_legacy_remove(struct pci_dev *pci_dev)
unregister_virtio_device(&vp_dev->vdev);
- vp_del_vqs(&vp_dev->vdev);
pci_iounmap(pci_dev, vp_dev->ioaddr);
pci_release_regions(pci_dev);
pci_disable_device(pci_dev);
--
1.7.10.4
2017 Dec 12
5
[PATCH v2 0/3] fix cleanup for fail to register_virtio_device
This series fix the cleanup for the caller of register_virtio_device,
the main work is use put_device instead of kfree.
V1->V2:
* virtio_pci: add comments for the reason use put_device
* virtio vop: also use put_device in in _vop_remove_device()
weiping zhang (3):
virtio_pci: use put_device instead of kfree
virtio: use put_device instead of kfree
virtio: put reference count of
2017 Dec 12
5
[PATCH v2 0/3] fix cleanup for fail to register_virtio_device
This series fix the cleanup for the caller of register_virtio_device,
the main work is use put_device instead of kfree.
V1->V2:
* virtio_pci: add comments for the reason use put_device
* virtio vop: also use put_device in in _vop_remove_device()
weiping zhang (3):
virtio_pci: use put_device instead of kfree
virtio: use put_device instead of kfree
virtio: put reference count of
2019 Sep 16
0
[PATCH 2/2] drm/nouveau: tegra: Do not try to disable PCI device
From: Thierry Reding <treding at nvidia.com>
When Nouveau is instantiated on top of a platform device, the dev->pdev
field will be NULL and calling pci_disable_device() will crash. Move the
PCI disabling code to the PCI specific driver removal code.
Signed-off-by: Thierry Reding <treding at nvidia.com>
---
drivers/gpu/drm/nouveau/nouveau_drm.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/nouveau/nouveau_drm.c b/dr...
2017 Dec 15
0
[PATCH v2 1/3] virtio_pci: use put_device instead of kfree
...if (rc)
>> - goto err_register;
>> + if (rc) {
>> + if (vp_dev->ioaddr)
>> + virtio_pci_legacy_remove(vp_dev);
>> + else
>> + virtio_pci_modern_remove(vp_dev);
>> + pci_disable_device(pci_dev);
>> + put_device(&vp_dev->vdev.dev);
>> + }
>>
>> - return 0;
>> + return rc;
>>
>> -err_register:
>> - if (vp_dev->ioaddr)
>> - virtio_pci_legacy_remove(vp_dev);
>> - else
>&g...
2018 Dec 10
1
TK1: DRM, Nouveau and VIC
...Modules linked in: nouveau(-) btusb btrtl btbcm btintel
tegra_drm xhci_tegra host1x iova ttm
[ 3044.482415] CPU: 3 PID: 616 Comm: rmmod Not tainted 4.20.0-rc6-next-
20181210-00001-gd70a977fd0d5-dirty #115
[ 3044.492176] Hardware name: NVIDIA Tegra SoC (Flattened Device Tree)
[ 3044.498455] PC is at pci_disable_device+0x8/0xd4
[ 3044.503165] LR is at nouveau_drm_device_remove+0x50/0x7c [nouveau]
[ 3044.509350] pc : [<c048d05c>] lr : [<bf254820>] psr: 60000113
[ 3044.515638] sp : ee3abedc ip : ed625000 fp : 00000001
[ 3044.520879] r10: 00000081 r9 : ee3aa000 r8 : ee9eb834
[ 3044.526107] r7 :...
2017 Dec 11
6
[PATCH 0/3] fix cleanup for fail to register_virtio_device
This series fix the cleanup for the caller of register_virtio_device,
the main work is use put_device instead of kfree.
weiping zhang (3):
virtio_pci: use put_device instead of kfree
virtio: use put_device instead of kfree
virtio: put reference count of virtio_device.dev
drivers/misc/mic/vop/vop_main.c | 16 +++++++++-------
drivers/remoteproc/remoteproc_virtio.c | 2 +-
2017 Dec 11
6
[PATCH 0/3] fix cleanup for fail to register_virtio_device
This series fix the cleanup for the caller of register_virtio_device,
the main work is use put_device instead of kfree.
weiping zhang (3):
virtio_pci: use put_device instead of kfree
virtio: use put_device instead of kfree
virtio: put reference count of virtio_device.dev
drivers/misc/mic/vop/vop_main.c | 16 +++++++++-------
drivers/remoteproc/remoteproc_virtio.c | 2 +-
2017 Dec 15
1
[PATCH v2 1/3] virtio_pci: use put_device instead of kfree
...goto err_register;
> >> + if (rc) {
> >> + if (vp_dev->ioaddr)
> >> + virtio_pci_legacy_remove(vp_dev);
> >> + else
> >> + virtio_pci_modern_remove(vp_dev);
> >> + pci_disable_device(pci_dev);
> >> + put_device(&vp_dev->vdev.dev);
> >> + }
> >>
> >> - return 0;
> >> + return rc;
> >>
> >> -err_register:
> >> - if (vp_dev->ioaddr)
> >> - virtio_pci_lega...
2017 Dec 15
1
[PATCH v2 1/3] virtio_pci: use put_device instead of kfree
...goto err_register;
> >> + if (rc) {
> >> + if (vp_dev->ioaddr)
> >> + virtio_pci_legacy_remove(vp_dev);
> >> + else
> >> + virtio_pci_modern_remove(vp_dev);
> >> + pci_disable_device(pci_dev);
> >> + put_device(&vp_dev->vdev.dev);
> >> + }
> >>
> >> - return 0;
> >> + return rc;
> >>
> >> -err_register:
> >> - if (vp_dev->ioaddr)
> >> - virtio_pci_lega...