search for: out_set_drvdata

Displaying 20 results from an estimated 46 matches for "out_set_drvdata".

2011 Jan 05
3
[PATCH] virtio-pci: add softlinks between virtio and pci
....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, &pci_dev->dev.kobj, + "bus_device"); + if (err)...
2011 Jan 05
3
[PATCH] virtio-pci: add softlinks between virtio and pci
....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, &pci_dev->dev.kobj, + "bus_device"); + if (err)...
2009 Apr 27
0
[PATCH 8/8] virtio_pci: optional MSI-X support
...bsystem_vendor; vp_dev->vdev.id.device = pci_dev->subsystem_device; - /* register a handler for the queue with the PCI device's interrupt */ - err = request_irq(vp_dev->pci_dev->irq, vp_interrupt, IRQF_SHARED, - dev_name(&vp_dev->vdev.dev), vp_dev); - if (err) - goto out_set_drvdata; - /* finally register the virtio device */ err = register_virtio_device(&vp_dev->vdev); if (err) - goto out_req_irq; + goto out_set_drvdata; return 0; -out_req_irq: - free_irq(pci_dev->irq, vp_dev); out_set_drvdata: pci_set_drvdata(pci_dev, NULL); pci_iounmap(pci_dev,...
2009 Apr 27
0
[PATCH 8/8] virtio_pci: optional MSI-X support
...bsystem_vendor; vp_dev->vdev.id.device = pci_dev->subsystem_device; - /* register a handler for the queue with the PCI device's interrupt */ - err = request_irq(vp_dev->pci_dev->irq, vp_interrupt, IRQF_SHARED, - dev_name(&vp_dev->vdev.dev), vp_dev); - if (err) - goto out_set_drvdata; - /* finally register the virtio device */ err = register_virtio_device(&vp_dev->vdev); if (err) - goto out_req_irq; + goto out_set_drvdata; return 0; -out_req_irq: - free_irq(pci_dev->irq, vp_dev); out_set_drvdata: pci_set_drvdata(pci_dev, NULL); pci_iounmap(pci_dev,...
2009 May 07
1
[PATCH 3/3] virtio_pci: optional MSI-X support
...bsystem_vendor; vp_dev->vdev.id.device = pci_dev->subsystem_device; - /* register a handler for the queue with the PCI device's interrupt */ - err = request_irq(vp_dev->pci_dev->irq, vp_interrupt, IRQF_SHARED, - dev_name(&vp_dev->vdev.dev), vp_dev); - if (err) - goto out_set_drvdata; - /* finally register the virtio device */ err = register_virtio_device(&vp_dev->vdev); if (err) - goto out_req_irq; + goto out_set_drvdata; return 0; -out_req_irq: - free_irq(pci_dev->irq, vp_dev); out_set_drvdata: pci_set_drvdata(pci_dev, NULL); pci_iounmap(pci_dev,...
2009 May 07
1
[PATCH 3/3] virtio_pci: optional MSI-X support
...bsystem_vendor; vp_dev->vdev.id.device = pci_dev->subsystem_device; - /* register a handler for the queue with the PCI device's interrupt */ - err = request_irq(vp_dev->pci_dev->irq, vp_interrupt, IRQF_SHARED, - dev_name(&vp_dev->vdev.dev), vp_dev); - if (err) - goto out_set_drvdata; - /* finally register the virtio device */ err = register_virtio_device(&vp_dev->vdev); if (err) - goto out_req_irq; + goto out_set_drvdata; return 0; -out_req_irq: - free_irq(pci_dev->irq, vp_dev); out_set_drvdata: pci_set_drvdata(pci_dev, NULL); pci_iounmap(pci_dev,...
2013 Nov 25
1
[PATCH] virtio: pci: remove unnecessary pci_set_drvdata()
...| 2 -- 1 file changed, 2 deletions(-) diff --git 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_se...
2013 Nov 25
1
[PATCH] virtio: pci: remove unnecessary pci_set_drvdata()
...| 2 -- 1 file changed, 2 deletions(-) diff --git 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_se...
2009 May 13
1
[PATCHv5 3/3] virtio_pci: optional MSI-X support
...bsystem_vendor; vp_dev->vdev.id.device = pci_dev->subsystem_device; - /* register a handler for the queue with the PCI device's interrupt */ - err = request_irq(vp_dev->pci_dev->irq, vp_interrupt, IRQF_SHARED, - dev_name(&vp_dev->vdev.dev), vp_dev); - if (err) - goto out_set_drvdata; - /* finally register the virtio device */ err = register_virtio_device(&vp_dev->vdev); if (err) - goto out_req_irq; + goto out_set_drvdata; return 0; -out_req_irq: - free_irq(pci_dev->irq, vp_dev); out_set_drvdata: pci_set_drvdata(pci_dev, NULL); pci_iounmap(pci_dev,...
2009 May 13
1
[PATCHv5 3/3] virtio_pci: optional MSI-X support
...bsystem_vendor; vp_dev->vdev.id.device = pci_dev->subsystem_device; - /* register a handler for the queue with the PCI device's interrupt */ - err = request_irq(vp_dev->pci_dev->irq, vp_interrupt, IRQF_SHARED, - dev_name(&vp_dev->vdev.dev), vp_dev); - if (err) - goto out_set_drvdata; - /* finally register the virtio device */ err = register_virtio_device(&vp_dev->vdev); if (err) - goto out_req_irq; + goto out_set_drvdata; return 0; -out_req_irq: - free_irq(pci_dev->irq, vp_dev); out_set_drvdata: pci_set_drvdata(pci_dev, NULL); pci_iounmap(pci_dev,...
2009 May 14
1
[PATCHv6 4/4] virtio_pci: optional MSI-X support
...bsystem_vendor; vp_dev->vdev.id.device = pci_dev->subsystem_device; - /* register a handler for the queue with the PCI device's interrupt */ - err = request_irq(vp_dev->pci_dev->irq, vp_interrupt, IRQF_SHARED, - dev_name(&vp_dev->vdev.dev), vp_dev); - if (err) - goto out_set_drvdata; - /* finally register the virtio device */ err = register_virtio_device(&vp_dev->vdev); if (err) - goto out_req_irq; + goto out_set_drvdata; return 0; -out_req_irq: - free_irq(pci_dev->irq, vp_dev); out_set_drvdata: pci_set_drvdata(pci_dev, NULL); pci_iounmap(pci_dev,...
2009 May 14
1
[PATCHv6 4/4] virtio_pci: optional MSI-X support
...bsystem_vendor; vp_dev->vdev.id.device = pci_dev->subsystem_device; - /* register a handler for the queue with the PCI device's interrupt */ - err = request_irq(vp_dev->pci_dev->irq, vp_interrupt, IRQF_SHARED, - dev_name(&vp_dev->vdev.dev), vp_dev); - if (err) - goto out_set_drvdata; - /* finally register the virtio device */ err = register_virtio_device(&vp_dev->vdev); if (err) - goto out_req_irq; + goto out_set_drvdata; return 0; -out_req_irq: - free_irq(pci_dev->irq, vp_dev); out_set_drvdata: pci_set_drvdata(pci_dev, NULL); pci_iounmap(pci_dev,...
2007 Nov 10
2
[PATCH] Change virtio_pci to use a shared memory area for config
...dev->config_len = ioread32(vp_dev->ioaddr + VIRTIO_PCI_CONFIG_LEN); + if (vp_dev->config_len) { + /* round up to nearest page size to ensure proper alignment */ + vp_dev->config = kzalloc(PAGE_ALIGN(vp_dev->config_len), + GFP_KERNEL); + if (vp_dev->config == NULL) + goto out_set_drvdata; + + /* tell the host about our config space */ + iowrite32(virt_to_phys(vp_dev->config) >> PAGE_SHIFT, + vp_dev->ioaddr + VIRTIO_PCI_CONFIG_PFN); + } else + vp_dev->config = NULL; + /* register a handler for the queue with the PCI device's interrupt */ err = request_i...
2007 Nov 10
2
[PATCH] Change virtio_pci to use a shared memory area for config
...dev->config_len = ioread32(vp_dev->ioaddr + VIRTIO_PCI_CONFIG_LEN); + if (vp_dev->config_len) { + /* round up to nearest page size to ensure proper alignment */ + vp_dev->config = kzalloc(PAGE_ALIGN(vp_dev->config_len), + GFP_KERNEL); + if (vp_dev->config == NULL) + goto out_set_drvdata; + + /* tell the host about our config space */ + iowrite32(virt_to_phys(vp_dev->config) >> PAGE_SHIFT, + vp_dev->ioaddr + VIRTIO_PCI_CONFIG_PFN); + } else + vp_dev->config = NULL; + /* register a handler for the queue with the PCI device's interrupt */ err = request_i...
2014 Dec 08
0
[PATCH v2 08/10] virtio_pci: split out legacy device support
..._vendor; - vp_dev->vdev.id.device = pci_dev->subsystem_device; - - vp_dev->config_vector = vp_config_vector; - vp_dev->setup_vq = setup_vq; - vp_dev->del_vq = del_vq; - - /* finally register the virtio device */ - err = register_virtio_device(&vp_dev->vdev); - if (err) - goto out_set_drvdata; - - return 0; - -out_set_drvdata: - pci_iounmap(pci_dev, vp_dev->ioaddr); -out_req_regions: - pci_release_regions(pci_dev); -out_enable_device: - pci_disable_device(pci_dev); -out: - kfree(vp_dev); - return err; -} - -static void virtio_pci_remove(struct pci_dev *pci_dev) -{ - struct virtio_pci...
2014 Dec 08
0
[PATCH v2 08/10] virtio_pci: split out legacy device support
..._vendor; - vp_dev->vdev.id.device = pci_dev->subsystem_device; - - vp_dev->config_vector = vp_config_vector; - vp_dev->setup_vq = setup_vq; - vp_dev->del_vq = del_vq; - - /* finally register the virtio device */ - err = register_virtio_device(&vp_dev->vdev); - if (err) - goto out_set_drvdata; - - return 0; - -out_set_drvdata: - pci_iounmap(pci_dev, vp_dev->ioaddr); -out_req_regions: - pci_release_regions(pci_dev); -out_enable_device: - pci_disable_device(pci_dev); -out: - kfree(vp_dev); - return err; -} - -static void virtio_pci_remove(struct pci_dev *pci_dev) -{ - struct virtio_pci...
2014 Dec 08
0
[PATCH 8/9] virtio_pci: split out legacy device support
..._vendor; - vp_dev->vdev.id.device = pci_dev->subsystem_device; - - vp_dev->config_vector = vp_config_vector; - vp_dev->setup_vq = setup_vq; - vp_dev->del_vq = del_vq; - - /* finally register the virtio device */ - err = register_virtio_device(&vp_dev->vdev); - if (err) - goto out_set_drvdata; - - return 0; - -out_set_drvdata: - pci_iounmap(pci_dev, vp_dev->ioaddr); -out_req_regions: - pci_release_regions(pci_dev); -out_enable_device: - pci_disable_device(pci_dev); -out: - kfree(vp_dev); - return err; -} - -static void virtio_pci_remove(struct pci_dev *pci_dev) -{ - struct virtio_pci...
2014 Dec 08
0
[PATCH 8/9] virtio_pci: split out legacy device support
..._vendor; - vp_dev->vdev.id.device = pci_dev->subsystem_device; - - vp_dev->config_vector = vp_config_vector; - vp_dev->setup_vq = setup_vq; - vp_dev->del_vq = del_vq; - - /* finally register the virtio device */ - err = register_virtio_device(&vp_dev->vdev); - if (err) - goto out_set_drvdata; - - return 0; - -out_set_drvdata: - pci_iounmap(pci_dev, vp_dev->ioaddr); -out_req_regions: - pci_release_regions(pci_dev); -out_enable_device: - pci_disable_device(pci_dev); -out: - kfree(vp_dev); - return err; -} - -static void virtio_pci_remove(struct pci_dev *pci_dev) -{ - struct virtio_pci...
2007 Dec 21
0
[kvm-devel] [Virtio-for-kvm] [PATCH 05/13] [Mostly resend] virtio additions
...vp_dev->vdev.id.device = pci_dev->subsystem_device; + + /* register a handler for the queue with the PCI device's interrupt */ + err = request_irq(vp_dev->pci_dev->irq, vp_interrupt, IRQF_SHARED, + vp_dev->vdev.dev.bus_id, vp_dev); + if (err) + goto out_set_drvdata; + + /* finally register the virtio device */ + err = register_virtio_device(&vp_dev->vdev); + if (err) + goto out_req_irq; + + return 0; + +out_req_irq: + free_irq(pci_dev->irq, vp_dev); +out_set_drvdata: + pci_set_drvdata(pci_dev, NULL); + pci_iounmap(pci_dev...
2007 Dec 21
0
[kvm-devel] [Virtio-for-kvm] [PATCH 05/13] [Mostly resend] virtio additions
...vp_dev->vdev.id.device = pci_dev->subsystem_device; + + /* register a handler for the queue with the PCI device's interrupt */ + err = request_irq(vp_dev->pci_dev->irq, vp_interrupt, IRQF_SHARED, + vp_dev->vdev.dev.bus_id, vp_dev); + if (err) + goto out_set_drvdata; + + /* finally register the virtio device */ + err = register_virtio_device(&vp_dev->vdev); + if (err) + goto out_req_irq; + + return 0; + +out_req_irq: + free_irq(pci_dev->irq, vp_dev); +out_set_drvdata: + pci_set_drvdata(pci_dev, NULL); + pci_iounmap(pci_dev...