Displaying 20 results from an estimated 202 matches for "virtio_pci_prob".
Did you mean:
virtio_pci_probe
2017 Dec 14
4
[PATCH v2 1/3] virtio_pci: use put_device instead of kfree
...anged, 9 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/virtio/virtio_pci_common.c b/drivers/virtio/virtio_pci_common.c
> index 1c4797e..91d20f7 100644
> --- a/drivers/virtio/virtio_pci_common.c
> +++ b/drivers/virtio/virtio_pci_common.c
> @@ -551,16 +551,17 @@ static int virtio_pci_probe(struct pci_dev *pci_dev,
> 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_mo...
2017 Dec 14
4
[PATCH v2 1/3] virtio_pci: use put_device instead of kfree
...anged, 9 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/virtio/virtio_pci_common.c b/drivers/virtio/virtio_pci_common.c
> index 1c4797e..91d20f7 100644
> --- a/drivers/virtio/virtio_pci_common.c
> +++ b/drivers/virtio/virtio_pci_common.c
> @@ -551,16 +551,17 @@ static int virtio_pci_probe(struct pci_dev *pci_dev,
> 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_mo...
2017 Dec 15
0
[PATCH v2 1/3] virtio_pci: use put_device instead of kfree
...8 deletions(-)
>>
>> diff --git a/drivers/virtio/virtio_pci_common.c b/drivers/virtio/virtio_pci_common.c
>> index 1c4797e..91d20f7 100644
>> --- a/drivers/virtio/virtio_pci_common.c
>> +++ b/drivers/virtio/virtio_pci_common.c
>> @@ -551,16 +551,17 @@ static int virtio_pci_probe(struct pci_dev *pci_dev,
>> pci_set_master(pci_dev);
>>
>> rc = register_virtio_device(&vp_dev->vdev);
>> - if (rc)
>> - goto err_register;
>> + if (rc) {
>> + if (vp_dev->ioaddr)
>> +...
2014 Sep 05
2
[PATCH] virtio: pci: Use SIMPLE_DEV_PM_OPS macro
...SET_SYSTEM_SLEEP_PM_OPS(virtio_pci_freeze, virtio_pci_restore)
-};
#endif
+static SIMPLE_DEV_PM_OPS(virtio_pci_pm_ops, virtio_pci_freeze,
+ virtio_pci_restore);
+
static struct pci_driver virtio_pci_driver = {
.name = "virtio-pci",
.id_table = virtio_pci_id_table,
.probe = virtio_pci_probe,
.remove = virtio_pci_remove,
-#ifdef CONFIG_PM_SLEEP
.driver.pm = &virtio_pci_pm_ops,
-#endif
};
module_pci_driver(virtio_pci_driver);
--
2.0.0
2014 Sep 05
2
[PATCH] virtio: pci: Use SIMPLE_DEV_PM_OPS macro
...SET_SYSTEM_SLEEP_PM_OPS(virtio_pci_freeze, virtio_pci_restore)
-};
#endif
+static SIMPLE_DEV_PM_OPS(virtio_pci_pm_ops, virtio_pci_freeze,
+ virtio_pci_restore);
+
static struct pci_driver virtio_pci_driver = {
.name = "virtio-pci",
.id_table = virtio_pci_id_table,
.probe = virtio_pci_probe,
.remove = virtio_pci_remove,
-#ifdef CONFIG_PM_SLEEP
.driver.pm = &virtio_pci_pm_ops,
-#endif
};
module_pci_driver(virtio_pci_driver);
--
2.0.0
2017 Dec 15
1
[PATCH v2 1/3] virtio_pci: use put_device instead of kfree
...> >> diff --git a/drivers/virtio/virtio_pci_common.c b/drivers/virtio/virtio_pci_common.c
> >> index 1c4797e..91d20f7 100644
> >> --- a/drivers/virtio/virtio_pci_common.c
> >> +++ b/drivers/virtio/virtio_pci_common.c
> >> @@ -551,16 +551,17 @@ static int virtio_pci_probe(struct pci_dev *pci_dev,
> >> pci_set_master(pci_dev);
> >>
> >> rc = register_virtio_device(&vp_dev->vdev);
> >> - if (rc)
> >> - goto err_register;
> >> + if (rc) {
> >> + if (vp_dev...
2017 Dec 15
1
[PATCH v2 1/3] virtio_pci: use put_device instead of kfree
...> >> diff --git a/drivers/virtio/virtio_pci_common.c b/drivers/virtio/virtio_pci_common.c
> >> index 1c4797e..91d20f7 100644
> >> --- a/drivers/virtio/virtio_pci_common.c
> >> +++ b/drivers/virtio/virtio_pci_common.c
> >> @@ -551,16 +551,17 @@ static int virtio_pci_probe(struct pci_dev *pci_dev,
> >> pci_set_master(pci_dev);
> >>
> >> rc = register_virtio_device(&vp_dev->vdev);
> >> - if (rc)
> >> - goto err_register;
> >> + if (rc) {
> >> + if (vp_dev...
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
2017 Dec 20
0
[PATCH v4 2/4] virtio_pci: don't kfree device on register failure
...2 deletions(-)
diff --git a/drivers/virtio/virtio_pci_common.c b/drivers/virtio/virtio_pci_common.c
index 1c4797e..48d4d1c 100644
--- a/drivers/virtio/virtio_pci_common.c
+++ b/drivers/virtio/virtio_pci_common.c
@@ -513,7 +513,7 @@ static void virtio_pci_release_dev(struct device *_d)
static int virtio_pci_probe(struct pci_dev *pci_dev,
const struct pci_device_id *id)
{
- struct virtio_pci_device *vp_dev;
+ struct virtio_pci_device *vp_dev, *reg_dev = NULL;
int rc;
/* allocate our structure and fill it out */
@@ -551,6 +551,7 @@ static int virtio_pci_probe(struct pci_dev *pci_dev,
pci_set...
2017 Dec 21
0
[PATCH v5 2/4] virtio_pci: don't kfree device on register failure
...2 deletions(-)
diff --git a/drivers/virtio/virtio_pci_common.c b/drivers/virtio/virtio_pci_common.c
index 1c4797e..48d4d1c 100644
--- a/drivers/virtio/virtio_pci_common.c
+++ b/drivers/virtio/virtio_pci_common.c
@@ -513,7 +513,7 @@ static void virtio_pci_release_dev(struct device *_d)
static int virtio_pci_probe(struct pci_dev *pci_dev,
const struct pci_device_id *id)
{
- struct virtio_pci_device *vp_dev;
+ struct virtio_pci_device *vp_dev, *reg_dev = NULL;
int rc;
/* allocate our structure and fill it out */
@@ -551,6 +551,7 @@ static int virtio_pci_probe(struct pci_dev *pci_dev,
pci_set...
2016 Nov 24
2
[PATCH] virtio_mmio: Set dev.release() to avoid warning
From: Yuan Liu <liuyuan at google.com>
Fix a warning thrown from virtio_mmio_remove():
Device 'virtio0' does not have a release() function
The fix is according to virtio_pci_probe() of
drivers/virtio/virtio_pci_common.c
Signed-off-by: Yuan Liu <liuyuan at google.com>
---
drivers/virtio/virtio_mmio.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/virtio/virtio_mmio.c b/drivers/virtio/virtio_mmio.c
index 48bfea9..d47a2fc 100644
--- a/drivers/virtio/virt...
2016 Nov 24
2
[PATCH] virtio_mmio: Set dev.release() to avoid warning
From: Yuan Liu <liuyuan at google.com>
Fix a warning thrown from virtio_mmio_remove():
Device 'virtio0' does not have a release() function
The fix is according to virtio_pci_probe() of
drivers/virtio/virtio_pci_common.c
Signed-off-by: Yuan Liu <liuyuan at google.com>
---
drivers/virtio/virtio_mmio.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/virtio/virtio_mmio.c b/drivers/virtio/virtio_mmio.c
index 48bfea9..d47a2fc 100644
--- a/drivers/virtio/virt...
2017 Dec 20
8
[PATCH v4 0/4] use put_device to cleanup resource
Hi,
The main change is split device_register into 2 sperate calls:
device_initalize() and device_add, and then the caller can use
put_device safety when fail to register_virtio_device.
v3->v4:
* split device_register into device_initialize and devicea_add that
the caller can always use put_device when fail to register virtio
device.
v2->v3:
* virtio: add new helper do get
2017 Dec 20
8
[PATCH v4 0/4] use put_device to cleanup resource
Hi,
The main change is split device_register into 2 sperate calls:
device_initalize() and device_add, and then the caller can use
put_device safety when fail to register_virtio_device.
v3->v4:
* split device_register into device_initialize and devicea_add that
the caller can always use put_device when fail to register virtio
device.
v2->v3:
* virtio: add new helper do get
2011 Jan 05
3
[PATCH] virtio-pci: add softlinks between virtio and pci
...nclude <linux/virtio_pci.h>
#include <linux/highmem.h>
#include <linux/spinlock.h>
+#include <linux/sysfs.h>
MODULE_AUTHOR("Anthony Liguori <aliguori at us.ibm.com>");
MODULE_DESCRIPTION("virtio-pci");
@@ -667,8 +668,21 @@ static int __devinit virtio_pci_probe(struct pci_dev *pci_dev,
if (err)
goto out_set_drvdata;
- return 0;
+ err = sysfs_create_link(&pci_dev->dev.kobj, &vp_dev->vdev.dev.kobj,
+ "virtio_device");
+ if (err)
+ goto out_register_device;
+
+ err = sysfs_create_link(&vp_dev->vdev.dev.kobj, &pc...
2011 Jan 05
3
[PATCH] virtio-pci: add softlinks between virtio and pci
...nclude <linux/virtio_pci.h>
#include <linux/highmem.h>
#include <linux/spinlock.h>
+#include <linux/sysfs.h>
MODULE_AUTHOR("Anthony Liguori <aliguori at us.ibm.com>");
MODULE_DESCRIPTION("virtio-pci");
@@ -667,8 +668,21 @@ static int __devinit virtio_pci_probe(struct pci_dev *pci_dev,
if (err)
goto out_set_drvdata;
- return 0;
+ err = sysfs_create_link(&pci_dev->dev.kobj, &vp_dev->vdev.dev.kobj,
+ "virtio_device");
+ if (err)
+ goto out_register_device;
+
+ err = sysfs_create_link(&vp_dev->vdev.dev.kobj, &pc...
2017 Dec 12
1
[PATCH 1/3] virtio_pci: use put_device instead of kfree
...anged, 9 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/virtio/virtio_pci_common.c b/drivers/virtio/virtio_pci_common.c
> index 1c4797e..91d20f7 100644
> --- a/drivers/virtio/virtio_pci_common.c
> +++ b/drivers/virtio/virtio_pci_common.c
> @@ -551,16 +551,17 @@ static int virtio_pci_probe(struct pci_dev *pci_dev,
> 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_mo...
2017 Dec 12
1
[PATCH 1/3] virtio_pci: use put_device instead of kfree
...anged, 9 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/virtio/virtio_pci_common.c b/drivers/virtio/virtio_pci_common.c
> index 1c4797e..91d20f7 100644
> --- a/drivers/virtio/virtio_pci_common.c
> +++ b/drivers/virtio/virtio_pci_common.c
> @@ -551,16 +551,17 @@ static int virtio_pci_probe(struct pci_dev *pci_dev,
> 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_mo...
2012 May 19
0
Notes on libguestfs on Fedora/ARM
...he virtio-pci driver doesn't
work on ARM. The characteristic stack trace starts with:
[ 4.841052] [<c0230a08>] (vp_reset+0x14/0x64) from [<c022fa48>] (register_virtio_device+0x4c/0x94)
[ 4.844047] [<c022fa48>] (register_virtio_device+0x4c/0x94) from [<c04277bc>] (virtio_pci_probe+0x100/0x168)
[ 4.846966] [<c04277bc>] (virtio_pci_probe+0x100/0x168) from [<c02138e0>] (pci_device_probe+0x90/0x120)
[ 4.850258] [<c02138e0>] (pci_device_probe+0x90/0x120) from [<c025fe98>] (driver_probe_device+0x148/0x2c4)
(Note that you cannot work around this by c...