Displaying 20 results from an estimated 42 matches for "err_probe".
2015 Jan 15
1
[PATCH] virtio_pci: add module param to force legacy mode
...(vp_dev);
- if (rc != -ENODEV)
- return rc;
+ if (force_legacy) {
+ rc = virtio_pci_legacy_probe(vp_dev);
+ /* Also try modern mode if we can't map BAR0 (no IO space). */
+ if (rc != -ENODEV && rc != -ENOMEM)
+ return rc;
- rc = virtio_pci_legacy_probe(vp_dev);
- if (rc)
- goto err_probe;
+ rc = virtio_pci_modern_probe(vp_dev);
+ if (rc)
+ goto err_probe;
+ } else {
+ rc = virtio_pci_modern_probe(vp_dev);
+ if (rc != -ENODEV)
+ return rc;
+
+ rc = virtio_pci_legacy_probe(vp_dev);
+ if (rc)
+ goto err_probe;
+ }
pci_set_master(pci_dev);
--
MST
2015 Jan 15
1
[PATCH] virtio_pci: add module param to force legacy mode
...(vp_dev);
- if (rc != -ENODEV)
- return rc;
+ if (force_legacy) {
+ rc = virtio_pci_legacy_probe(vp_dev);
+ /* Also try modern mode if we can't map BAR0 (no IO space). */
+ if (rc != -ENODEV && rc != -ENOMEM)
+ return rc;
- rc = virtio_pci_legacy_probe(vp_dev);
- if (rc)
- goto err_probe;
+ rc = virtio_pci_modern_probe(vp_dev);
+ if (rc)
+ goto err_probe;
+ } else {
+ rc = virtio_pci_modern_probe(vp_dev);
+ if (rc != -ENODEV)
+ return rc;
+
+ rc = virtio_pci_legacy_probe(vp_dev);
+ if (rc)
+ goto err_probe;
+ }
pci_set_master(pci_dev);
--
MST
2017 Dec 14
4
[PATCH v2 1/3] virtio_pci: use put_device instead of kfree
...gt; + 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_disable_device(pci_dev);
> err_enable_device:
> --
> 2.9.4
I'd prefer something like the below.
--->
virtio_pci: don't kfree device on register failure
Signed-off-by: Michael S. Tsirkin <mst at redhat.com>
---
diff --git a/drivers/virtio/virtio_pci_comm...
2017 Dec 14
4
[PATCH v2 1/3] virtio_pci: use put_device instead of kfree
...gt; + 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_disable_device(pci_dev);
> err_enable_device:
> --
> 2.9.4
I'd prefer something like the below.
--->
virtio_pci: don't kfree device on register failure
Signed-off-by: Michael S. Tsirkin <mst at redhat.com>
---
diff --git a/drivers/virtio/virtio_pci_comm...
2017 Dec 12
1
[PATCH 1/3] virtio_pci: use put_device instead of kfree
...gt; + 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_disable_device(pci_dev);
> err_enable_device:
Otherwise, looks good.
Reviewed-by: Cornelia Huck <cohuck at redhat.com>
2017 Dec 12
1
[PATCH 1/3] virtio_pci: use put_device instead of kfree
...gt; + 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_disable_device(pci_dev);
> err_enable_device:
Otherwise, looks good.
Reviewed-by: Cornelia Huck <cohuck at redhat.com>
2015 Jan 20
0
[PATCH 04/05] fixup! virtio_pci: add module param to force legacy mode
...i_legacy_probe(vp_dev);
/* Also try modern mode if we can't map BAR0 (no IO space). */
- if (rc != -ENODEV && rc != -ENOMEM)
- return rc;
-
- rc = virtio_pci_modern_probe(vp_dev);
+ if (rc == -ENODEV || rc == -ENOMEM)
+ rc = virtio_pci_modern_probe(vp_dev);
if (rc)
goto err_probe;
} else {
rc = virtio_pci_modern_probe(vp_dev);
- if (rc != -ENODEV)
- return rc;
-
- rc = virtio_pci_legacy_probe(vp_dev);
+ if (rc == -ENODEV)
+ rc = virtio_pci_legacy_probe(vp_dev);
if (rc)
goto err_probe;
}
--
MST
2015 Jan 20
0
[PATCH 04/05] fixup! virtio_pci: add module param to force legacy mode
...i_legacy_probe(vp_dev);
/* Also try modern mode if we can't map BAR0 (no IO space). */
- if (rc != -ENODEV && rc != -ENOMEM)
- return rc;
-
- rc = virtio_pci_modern_probe(vp_dev);
+ if (rc == -ENODEV || rc == -ENOMEM)
+ rc = virtio_pci_modern_probe(vp_dev);
if (rc)
goto err_probe;
} else {
rc = virtio_pci_modern_probe(vp_dev);
- if (rc != -ENODEV)
- return rc;
-
- rc = virtio_pci_legacy_probe(vp_dev);
+ if (rc == -ENODEV)
+ rc = virtio_pci_legacy_probe(vp_dev);
if (rc)
goto err_probe;
}
--
MST
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 15
0
[PATCH v2 1/3] virtio_pci: use put_device instead of kfree
...gt;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_disable_device(pci_dev);
>> err_enable_device:
>> --
>> 2.9.4
>
> I'd prefer something like the below.
>
> --->
>
> virtio_pci: don't kfree device on register failure
>
> Signed-off-by: Michael S. Tsirkin <mst at redhat.co...
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 15
1
[PATCH v2 1/3] virtio_pci: use put_device instead of kfree
...>> - 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_disable_device(pci_dev);
> >> err_enable_device:
> >> --
> >> 2.9.4
> >
> > I'd prefer something like the below.
> >
> > --->
> >
> > virtio_pci: don't kfree device on register failure
> >
>...
2017 Dec 15
1
[PATCH v2 1/3] virtio_pci: use put_device instead of kfree
...>> - 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_disable_device(pci_dev);
> >> err_enable_device:
> >> --
> >> 2.9.4
> >
> > I'd prefer something like the below.
> >
> > --->
> >
> > virtio_pci: don't kfree device on register failure
> >
>...
2015 Jan 21
14
[PATCH pre-squash 00/14] virtio 1.0: virtio-pci fixup
This is just the full patchset reposted with fixups in correct order,
before squashing them.
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:
git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git virtio-next
2015 Jan 21
14
[PATCH pre-squash 00/14] virtio 1.0: virtio-pci fixup
This is just the full patchset reposted with fixups in correct order,
before squashing them.
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:
git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git virtio-next
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:
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 +-
2015 Jun 24
1
[PATCH] virtio-pci: alloc only resources actually used.
..._regions(pci_dev, "virtio-pci");
- if (rc)
- goto err_request_regions;
-
if (force_legacy) {
rc = virtio_pci_legacy_probe(vp_dev);
/* Also try modern mode if we can't map BAR0 (no IO space). */
@@ -543,8 +539,6 @@ err_register:
else
virtio_pci_modern_remove(vp_dev);
err_probe:
- pci_release_regions(pci_dev);
-err_request_regions:
pci_disable_device(pci_dev);
err_enable_device:
kfree(vp_dev);
@@ -562,7 +556,6 @@ static void virtio_pci_remove(struct pci_dev *pci_dev)
else
virtio_pci_modern_remove(vp_dev);
- pci_release_regions(pci_dev);
pci_disable_device(pc...