search for: get_device

Displaying 20 results from an estimated 130 matches for "get_device".

Did you mean: net_device
2007 Feb 02
0
[PATCH] [Xm-TEST] Fix XAPI test case 02
...,13 +4,14 @@ # Author: Stefan Berger <stefanb@us.ibm.com> # Tests related to SR, VDI, VBD +# Based on the ''C'' code. # # Used methods: # SR: get_by_name_label, get_VDIs # # VDI: create, get_name_label, destroy # -# VBD: create, get_driver, get_mode, get_VM, get_VDI, get_device +# VBD: create, get_driver, get_mode, get_VM, get_VDI, get_device, get_type # # VM: get_VBDs @@ -43,15 +44,17 @@ vdi_rec = { ''name_label'' : "My disk", ''sector_size'' : 512, ''type'' : 0,...
2017 Dec 01
3
[PATCH] virtio: release virtio index when fail to device_register
...k > - vop does a free on the embedding structure, which is a big no-no > > Thoughts? Sorry to relay late and thanks for your review. Do you mean the "extra reference to the struct device" caused by the following code? err = device_register(&dev->dev); device_add(dev) get_device(dev) If I'm understand right, I think there is no extra reference if we fail virtio_register_device, because if device_register we don't get a reference. -- Thanks weiping
2017 Dec 01
3
[PATCH] virtio: release virtio index when fail to device_register
...k > - vop does a free on the embedding structure, which is a big no-no > > Thoughts? Sorry to relay late and thanks for your review. Do you mean the "extra reference to the struct device" caused by the following code? err = device_register(&dev->dev); device_add(dev) get_device(dev) If I'm understand right, I think there is no extra reference if we fail virtio_register_device, because if device_register we don't get a reference. -- Thanks weiping
2018 Apr 20
2
virtio remoteproc device
...=> platform-dev. */ if (!vdev->dev.parent || !vdev->dev.parent->parent) goto free_buf; buf->dev = vdev->dev.parent->parent; /* Increase device refcnt to avoid freeing it */ get_device(buf->dev); buf->buf = dma_alloc_coherent(buf->dev, buf_size, &buf->dma, GFP_KERNEL); } Added here: commit 1b6370463e88b0c1c317de16d7b962acc1dab4f2 Author: Sjur Br?ndeland <sjur.brandeland at stericsson.com&g...
2018 Apr 20
2
virtio remoteproc device
...=> platform-dev. */ if (!vdev->dev.parent || !vdev->dev.parent->parent) goto free_buf; buf->dev = vdev->dev.parent->parent; /* Increase device refcnt to avoid freeing it */ get_device(buf->dev); buf->buf = dma_alloc_coherent(buf->dev, buf_size, &buf->dma, GFP_KERNEL); } Added here: commit 1b6370463e88b0c1c317de16d7b962acc1dab4f2 Author: Sjur Br?ndeland <sjur.brandeland at stericsson.com&g...
2017 Jul 14
0
[PATCH 13/27] daemon: Reimplement ‘list_ldm_(volumes|partitions)’ APIs in OCaml.
...;yajl/yajl_tree.h> @@ -47,87 +46,6 @@ optgroup_ldm_available (void) return prog_exists (str_ldmtool); } -static int -glob_errfunc (const char *epath, int eerrno) -{ - fprintf (stderr, "glob: failure reading %s: %s\n", epath, strerror (eerrno)); - return 1; -} - -static char ** -get_devices (const char *pattern) -{ - CLEANUP_FREE_STRINGSBUF DECLARE_STRINGSBUF (ret); - glob_t devs; - int err; - size_t i; - - memset (&devs, 0, sizeof devs); - - err = glob (pattern, GLOB_ERR, glob_errfunc, &devs); - if (err == GLOB_NOSPACE) { - reply_with_error ("glob: returned GL...
2016 Jan 14
1
[PATCH] virtio_pci: fix use after free on release
...n.c index 36205c2..f6bed86 100644 --- a/drivers/virtio/virtio_pci_common.c +++ b/drivers/virtio/virtio_pci_common.c @@ -545,6 +545,7 @@ err_enable_device: static void virtio_pci_remove(struct pci_dev *pci_dev) { struct virtio_pci_device *vp_dev = pci_get_drvdata(pci_dev); + struct device *dev = get_device(&vp_dev->vdev.dev); unregister_virtio_device(&vp_dev->vdev); @@ -554,6 +555,7 @@ static void virtio_pci_remove(struct pci_dev *pci_dev) virtio_pci_modern_remove(vp_dev); pci_disable_device(pci_dev); + put_device(dev); } static struct pci_driver virtio_pci_driver = { -...
2016 Jan 14
1
[PATCH] virtio_pci: fix use after free on release
...n.c index 36205c2..f6bed86 100644 --- a/drivers/virtio/virtio_pci_common.c +++ b/drivers/virtio/virtio_pci_common.c @@ -545,6 +545,7 @@ err_enable_device: static void virtio_pci_remove(struct pci_dev *pci_dev) { struct virtio_pci_device *vp_dev = pci_get_drvdata(pci_dev); + struct device *dev = get_device(&vp_dev->vdev.dev); unregister_virtio_device(&vp_dev->vdev); @@ -554,6 +555,7 @@ static void virtio_pci_remove(struct pci_dev *pci_dev) virtio_pci_modern_remove(vp_dev); pci_disable_device(pci_dev); + put_device(dev); } static struct pci_driver virtio_pci_driver = { -...
2018 Apr 23
3
virtio remoteproc device
...if (!vdev->dev.parent || !vdev->dev.parent->parent) > > goto free_buf; > > buf->dev = vdev->dev.parent->parent; > > > > /* Increase device refcnt to avoid freeing it */ > > get_device(buf->dev); > > buf->buf = dma_alloc_coherent(buf->dev, buf_size, &buf->dma, > > GFP_KERNEL); > > } > > > > Added here: > > commit 1b6370463e88b0c1c317de16d7b962acc1dab4f...
2018 Apr 23
3
virtio remoteproc device
...if (!vdev->dev.parent || !vdev->dev.parent->parent) > > goto free_buf; > > buf->dev = vdev->dev.parent->parent; > > > > /* Increase device refcnt to avoid freeing it */ > > get_device(buf->dev); > > buf->buf = dma_alloc_coherent(buf->dev, buf_size, &buf->dma, > > GFP_KERNEL); > > } > > > > Added here: > > commit 1b6370463e88b0c1c317de16d7b962acc1dab4f...
2012 Jan 24
1
[PATCH 0/5] Get rid of get_driver() and put_driver()
Greg: This patch series removes the get_driver() and put_driver() routines from the kernel. Those routines don''t do anything useful. Their comments say that they increment and decrement the driver''s reference count, just like get_device()/put_device() and a lot of other utility routines. But a struct driver is _not_ like a struct device! It resembles a piece of code more than a piece of data -- it acts as an encapsulation of a driver. Incrementing its refcount doesn''t have much meaning because a driver''s lifet...
2018 Apr 21
2
[PATCH 1/6] virtio_console: don't tie bufs to a vq
....parent->parent) > + if (!vdev->dev.parent || !vdev->dev.parent->parent) > goto free_buf; > - buf->dev = vq->vdev->dev.parent->parent; > + buf->dev = vdev->dev.parent->parent; > > /* Increase device refcnt to avoid freeing it */ > get_device(buf->dev); > @@ -838,7 +838,7 @@ static ssize_t port_fops_write(struct file *filp, const char __user *ubuf, > > count = min((size_t)(32 * 1024), count); > > - buf = alloc_buf(port->out_vq, count, 0); > + buf = alloc_buf(port->portdev->vdev, count, 0); > if (...
2018 Apr 21
2
[PATCH 1/6] virtio_console: don't tie bufs to a vq
....parent->parent) > + if (!vdev->dev.parent || !vdev->dev.parent->parent) > goto free_buf; > - buf->dev = vq->vdev->dev.parent->parent; > + buf->dev = vdev->dev.parent->parent; > > /* Increase device refcnt to avoid freeing it */ > get_device(buf->dev); > @@ -838,7 +838,7 @@ static ssize_t port_fops_write(struct file *filp, const char __user *ubuf, > > count = min((size_t)(32 * 1024), count); > > - buf = alloc_buf(port->out_vq, count, 0); > + buf = alloc_buf(port->portdev->vdev, count, 0); > if (...
2018 Jun 01
2
[PATCH v3] virtio_pci: support enabling VFs
...tio_pci_common.c index 48d4d1cf1cb6..1d4467b2dc31 100644 --- a/drivers/virtio/virtio_pci_common.c +++ b/drivers/virtio/virtio_pci_common.c @@ -577,6 +577,8 @@ static void virtio_pci_remove(struct pci_dev *pci_dev) struct virtio_pci_device *vp_dev = pci_get_drvdata(pci_dev); struct device *dev = get_device(&vp_dev->vdev.dev); + pci_disable_sriov(pci_dev); + unregister_virtio_device(&vp_dev->vdev); if (vp_dev->ioaddr) @@ -588,6 +590,33 @@ static void virtio_pci_remove(struct pci_dev *pci_dev) put_device(dev); } +static int virtio_pci_sriov_configure(struct pci_dev *pci_de...
2018 Jun 01
2
[PATCH v3] virtio_pci: support enabling VFs
...tio_pci_common.c index 48d4d1cf1cb6..1d4467b2dc31 100644 --- a/drivers/virtio/virtio_pci_common.c +++ b/drivers/virtio/virtio_pci_common.c @@ -577,6 +577,8 @@ static void virtio_pci_remove(struct pci_dev *pci_dev) struct virtio_pci_device *vp_dev = pci_get_drvdata(pci_dev); struct device *dev = get_device(&vp_dev->vdev.dev); + pci_disable_sriov(pci_dev); + unregister_virtio_device(&vp_dev->vdev); if (vp_dev->ioaddr) @@ -588,6 +590,33 @@ static void virtio_pci_remove(struct pci_dev *pci_dev) put_device(dev); } +static int virtio_pci_sriov_configure(struct pci_dev *pci_de...
2018 Jun 01
3
[PATCH v2] virtio_pci: support enabling VFs
...tio_pci_common.c index 48d4d1cf1cb6..1d4467b2dc31 100644 --- a/drivers/virtio/virtio_pci_common.c +++ b/drivers/virtio/virtio_pci_common.c @@ -577,6 +577,8 @@ static void virtio_pci_remove(struct pci_dev *pci_dev) struct virtio_pci_device *vp_dev = pci_get_drvdata(pci_dev); struct device *dev = get_device(&vp_dev->vdev.dev); + pci_disable_sriov(pci_dev); + unregister_virtio_device(&vp_dev->vdev); if (vp_dev->ioaddr) @@ -588,6 +590,33 @@ static void virtio_pci_remove(struct pci_dev *pci_dev) put_device(dev); } +static int virtio_pci_sriov_configure(struct pci_dev *pci_de...
2018 Jun 01
3
[PATCH v2] virtio_pci: support enabling VFs
...tio_pci_common.c index 48d4d1cf1cb6..1d4467b2dc31 100644 --- a/drivers/virtio/virtio_pci_common.c +++ b/drivers/virtio/virtio_pci_common.c @@ -577,6 +577,8 @@ static void virtio_pci_remove(struct pci_dev *pci_dev) struct virtio_pci_device *vp_dev = pci_get_drvdata(pci_dev); struct device *dev = get_device(&vp_dev->vdev.dev); + pci_disable_sriov(pci_dev); + unregister_virtio_device(&vp_dev->vdev); if (vp_dev->ioaddr) @@ -588,6 +590,33 @@ static void virtio_pci_remove(struct pci_dev *pci_dev) put_device(dev); } +static int virtio_pci_sriov_configure(struct pci_dev *pci_de...
2018 Jun 05
2
[virtio-dev] Re: [PATCH v3] virtio_pci: support enabling VFs
...100644 > > --- a/drivers/virtio/virtio_pci_common.c > > +++ b/drivers/virtio/virtio_pci_common.c > > @@ -577,6 +577,8 @@ static void virtio_pci_remove(struct pci_dev *pci_dev) > > struct virtio_pci_device *vp_dev = pci_get_drvdata(pci_dev); > > struct device *dev = get_device(&vp_dev->vdev.dev); > > > > + pci_disable_sriov(pci_dev); > > + > > unregister_virtio_device(&vp_dev->vdev); > > > > if (vp_dev->ioaddr) > > @@ -588,6 +590,33 @@ static void virtio_pci_remove(struct pci_dev *pci_dev) > > put...
2006 Aug 25
3
Network interface fails after kernel upgrade
Hi Yum has just updated 5 of my Linux boxes running CentOS 4.3 to the 2.6.9-42 kernel. All is well on four of the boxes, but on the fifth the network card (eth0) will not work. I've downgraded the kernel to the previous version and the network card works fine again. I've tried removing and re-installing the new kernel, but the network card won't work with it. The details of the
2018 Jun 06
2
[virtio-dev] Re: [PATCH v3] virtio_pci: support enabling VFs
...rtio_pci_common.c > > > > +++ b/drivers/virtio/virtio_pci_common.c > > > > @@ -577,6 +577,8 @@ static void virtio_pci_remove(struct pci_dev *pci_dev) > > > > struct virtio_pci_device *vp_dev = pci_get_drvdata(pci_dev); > > > > struct device *dev = get_device(&vp_dev->vdev.dev); > > > > > > > > + pci_disable_sriov(pci_dev); > > > > + > > > > unregister_virtio_device(&vp_dev->vdev); > > > > > > > > if (vp_dev->ioaddr) > > > > @@ -588,6 +590,33 @@...