search for: dev_set_nam

Displaying 20 results from an estimated 141 matches for "dev_set_nam".

Did you mean: dev_set_name
2020 Mar 04
1
[PATCH V5 3/5] vDPA: introduce vDPA bus
...; + > + vdev->dev.bus = &vdpa_bus; > + vdev->dev.parent = parent; > + vdev->dev.release = vdpa_release_dev; > + > + device_initialize(&vdev->dev); > + > + vdev->index = err; > + vdev->dma_dev = dma_dev; > + vdev->config = config; > + > + dev_set_name(&vdev->dev, "vdpa%u", vdev->index); Probably shouldn't ignore the error for dev_set_name ? err = dev_set_name() if (err) { put_device(&vdev->dev); return ERR_PTR(err); } Jason
2019 Jun 03
2
[PATCH v3 2/8] s390/cio: introduce DMA pools to cio
...; > >> + sch->dev.coherent_dma_mask = DMA_BIT_MASK(31); > >> + sch->dev.dma_mask = &sch->dev.coherent_dma_mask; > >> return sch; > >> > >> err: > >> @@ -899,6 +903,8 @@ static int __init setup_css(int nr) > >> dev_set_name(&css->device, "css%x", nr); > >> css->device.groups = cssdev_attr_groups; > >> css->device.release = channel_subsystem_release; > > > > ...and 64 bit here. > > and here. /* * We currently allocate notifier bits with this (usi...
2019 Jun 03
2
[PATCH v3 2/8] s390/cio: introduce DMA pools to cio
...; > >> + sch->dev.coherent_dma_mask = DMA_BIT_MASK(31); > >> + sch->dev.dma_mask = &sch->dev.coherent_dma_mask; > >> return sch; > >> > >> err: > >> @@ -899,6 +903,8 @@ static int __init setup_css(int nr) > >> dev_set_name(&css->device, "css%x", nr); > >> css->device.groups = cssdev_attr_groups; > >> css->device.release = channel_subsystem_release; > > > > ...and 64 bit here. > > and here. /* * We currently allocate notifier bits with this (usi...
2012 May 03
1
[PATCH 2/2] virtio: Use ida to allocate virtio index
...int register_virtio_device(struct virtio_device *dev) dev->dev.bus = &virtio_bus; /* Assign a unique device index and hence name. */ - dev->index = dev_index++; + err = ida_simple_get(&virtio_index_ida, 0, 0, GFP_KERNEL); + if (err < 0) + goto out; + + dev->index = err; dev_set_name(&dev->dev, "virtio%u", dev->index); /* We always start by resetting the device, in case a previous @@ -208,6 +213,7 @@ int register_virtio_device(struct virtio_device *dev) /* device_register() causes the bus infrastructure to look for a * matching driver. */ err = d...
2012 May 03
1
[PATCH 2/2] virtio: Use ida to allocate virtio index
...int register_virtio_device(struct virtio_device *dev) dev->dev.bus = &virtio_bus; /* Assign a unique device index and hence name. */ - dev->index = dev_index++; + err = ida_simple_get(&virtio_index_ida, 0, 0, GFP_KERNEL); + if (err < 0) + goto out; + + dev->index = err; dev_set_name(&dev->dev, "virtio%u", dev->index); /* We always start by resetting the device, in case a previous @@ -208,6 +213,7 @@ int register_virtio_device(struct virtio_device *dev) /* device_register() causes the bus infrastructure to look for a * matching driver. */ err = d...
2020 Feb 11
1
[PATCH V2 5/5] vdpasim: vDPA device simulator
...vdpasim_dev_init(void) > +{ > + struct device *dev; > + int ret = 0; > + > + vdpasim_dev = kzalloc(sizeof(*vdpasim_dev), GFP_KERNEL); > + if (!vdpasim_dev) > + return -ENOMEM; > + > + dev = &vdpasim_dev->dev; > + dev->release = vdpasim_device_release; > + dev_set_name(dev, "%s", VDPASIM_NAME); > + > + ret = device_register(&vdpasim_dev->dev); > + if (ret) > + goto err_register; > + > + if (!vdpasim_create()) > + goto err_register; Wrong error unwind here too > + return 0; > + > +err_register: > + kfree(vdpas...
2020 Aug 05
2
[PATCH v2 19/24] vdpa: make sure set_features in invoked for legacy
.../vdpa.c > +++ b/drivers/vdpa/vdpa.c > @@ -96,6 +96,7 @@ struct vdpa_device *__vdpa_alloc_device(struct device *parent, > vdev->dev.release = vdpa_release_dev; > vdev->index = err; > vdev->config = config; > + vdev->features_valid = false; > > err = dev_set_name(&vdev->dev, "vdpa%u", vdev->index); > if (err) > diff --git a/include/linux/vdpa.h b/include/linux/vdpa.h > index 239db794357c..29b8296f1414 100644 > --- a/include/linux/vdpa.h > +++ b/include/linux/vdpa.h > @@ -33,12 +33,14 @@ struct vdpa_notification_area...
2020 Aug 05
2
[PATCH v2 19/24] vdpa: make sure set_features in invoked for legacy
.../vdpa.c > +++ b/drivers/vdpa/vdpa.c > @@ -96,6 +96,7 @@ struct vdpa_device *__vdpa_alloc_device(struct device *parent, > vdev->dev.release = vdpa_release_dev; > vdev->index = err; > vdev->config = config; > + vdev->features_valid = false; > > err = dev_set_name(&vdev->dev, "vdpa%u", vdev->index); > if (err) > diff --git a/include/linux/vdpa.h b/include/linux/vdpa.h > index 239db794357c..29b8296f1414 100644 > --- a/include/linux/vdpa.h > +++ b/include/linux/vdpa.h > @@ -33,12 +33,14 @@ struct vdpa_notification_area...
2019 Jun 03
5
[PATCH v3 2/8] s390/cio: introduce DMA pools to cio
...dev); It might be helpful to add a comment why you use 31 bit here... > + sch->dev.coherent_dma_mask = DMA_BIT_MASK(31); > + sch->dev.dma_mask = &sch->dev.coherent_dma_mask; > return sch; > > err: > @@ -899,6 +903,8 @@ static int __init setup_css(int nr) > dev_set_name(&css->device, "css%x", nr); > css->device.groups = cssdev_attr_groups; > css->device.release = channel_subsystem_release; ...and 64 bit here. > + css->device.coherent_dma_mask = DMA_BIT_MASK(64); > + css->device.dma_mask = &css->device.coherent...
2019 Jun 03
5
[PATCH v3 2/8] s390/cio: introduce DMA pools to cio
...dev); It might be helpful to add a comment why you use 31 bit here... > + sch->dev.coherent_dma_mask = DMA_BIT_MASK(31); > + sch->dev.dma_mask = &sch->dev.coherent_dma_mask; > return sch; > > err: > @@ -899,6 +903,8 @@ static int __init setup_css(int nr) > dev_set_name(&css->device, "css%x", nr); > css->device.groups = cssdev_attr_groups; > css->device.release = channel_subsystem_release; ...and 64 bit here. > + css->device.coherent_dma_mask = DMA_BIT_MASK(64); > + css->device.dma_mask = &css->device.coherent...
2012 Apr 20
1
DAHDI-Linux 2.6.1, 2.5.1 and DAHDI-Tools 2.6.1, 2.5.1 Now Available
...bad refcount xpp: Don't deactivate XPDs on unregistration xpp: handle failures during dahdi_register_device() xpp: reset Astribank SPI busses xpp: FXS: better power-down to lower noise A parent-less device should not crash dahdi remove a duplicate dev_set_name() xpp: FXS: atomic vbat_h power handling xpp: FXS: added a 'lower_ringing_noise' parameter Shaun Ruffell (30): wctdm24xxp: FXS on-hook transmission timer incorrect. wct4xxp: VPM module creates noise on alternate channels on E1 spans. wctdm24xxp:...
2012 Apr 20
1
DAHDI-Linux 2.6.1, 2.5.1 and DAHDI-Tools 2.6.1, 2.5.1 Now Available
...bad refcount xpp: Don't deactivate XPDs on unregistration xpp: handle failures during dahdi_register_device() xpp: reset Astribank SPI busses xpp: FXS: better power-down to lower noise A parent-less device should not crash dahdi remove a duplicate dev_set_name() xpp: FXS: atomic vbat_h power handling xpp: FXS: added a 'lower_ringing_noise' parameter Shaun Ruffell (30): wctdm24xxp: FXS on-hook transmission timer incorrect. wct4xxp: VPM module creates noise on alternate channels on E1 spans. wctdm24xxp:...
2019 Jun 03
0
[PATCH v3 2/8] s390/cio: introduce DMA pools to cio
...ev.coherent_dma_mask = DMA_BIT_MASK(31); > > >> + sch->dev.dma_mask = &sch->dev.coherent_dma_mask; > > >> return sch; > > >> > > >> err: > > >> @@ -899,6 +903,8 @@ static int __init setup_css(int nr) > > >> dev_set_name(&css->device, "css%x", nr); > > >> css->device.groups = cssdev_attr_groups; > > >> css->device.release = channel_subsystem_release; > > > > > > ...and 64 bit here. > > > > and here. > > /* > *...
2020 Aug 03
0
[PATCH v2 19/24] vdpa: make sure set_features in invoked for legacy
...3738c..7105265e4793 100644 --- a/drivers/vdpa/vdpa.c +++ b/drivers/vdpa/vdpa.c @@ -96,6 +96,7 @@ struct vdpa_device *__vdpa_alloc_device(struct device *parent, vdev->dev.release = vdpa_release_dev; vdev->index = err; vdev->config = config; + vdev->features_valid = false; err = dev_set_name(&vdev->dev, "vdpa%u", vdev->index); if (err) diff --git a/include/linux/vdpa.h b/include/linux/vdpa.h index 239db794357c..29b8296f1414 100644 --- a/include/linux/vdpa.h +++ b/include/linux/vdpa.h @@ -33,12 +33,14 @@ struct vdpa_notification_area { * @dma_dev: the actual dev...
2020 Aug 05
0
[PATCH v3 19/38] vdpa: make sure set_features is invoked for legacy
...3738c..7105265e4793 100644 --- a/drivers/vdpa/vdpa.c +++ b/drivers/vdpa/vdpa.c @@ -96,6 +96,7 @@ struct vdpa_device *__vdpa_alloc_device(struct device *parent, vdev->dev.release = vdpa_release_dev; vdev->index = err; vdev->config = config; + vdev->features_valid = false; err = dev_set_name(&vdev->dev, "vdpa%u", vdev->index); if (err) diff --git a/include/linux/vdpa.h b/include/linux/vdpa.h index 239db794357c..29b8296f1414 100644 --- a/include/linux/vdpa.h +++ b/include/linux/vdpa.h @@ -33,12 +33,14 @@ struct vdpa_notification_area { * @dma_dev: the actual dev...
2020 Aug 05
0
[PATCH v2 19/24] vdpa: make sure set_features in invoked for legacy
...vers/vdpa/vdpa.c > > @@ -96,6 +96,7 @@ struct vdpa_device *__vdpa_alloc_device(struct device *parent, > > vdev->dev.release = vdpa_release_dev; > > vdev->index = err; > > vdev->config = config; > > + vdev->features_valid = false; > > err = dev_set_name(&vdev->dev, "vdpa%u", vdev->index); > > if (err) > > diff --git a/include/linux/vdpa.h b/include/linux/vdpa.h > > index 239db794357c..29b8296f1414 100644 > > --- a/include/linux/vdpa.h > > +++ b/include/linux/vdpa.h > > @@ -33,12 +33,14 @@...
2019 Jun 13
0
[PATCH 02/22] mm: remove the struct hmm_device infrastructure
...->minor = find_first_zero_bit(hmm_device_mask, HMM_DEVICE_MAX); - if (hmm_device->minor >= HMM_DEVICE_MAX) { - spin_unlock(&hmm_device_lock); - kfree(hmm_device); - return ERR_PTR(-EBUSY); - } - set_bit(hmm_device->minor, hmm_device_mask); - spin_unlock(&hmm_device_lock); - - dev_set_name(&hmm_device->device, "hmm_device%d", hmm_device->minor); - hmm_device->device.devt = MKDEV(MAJOR(hmm_device_devt), - hmm_device->minor); - hmm_device->device.release = hmm_device_release; - dev_set_drvdata(&hmm_device->device, drvdata); - hmm_device->devi...
2014 Oct 05
0
[PATCH 05/16] virtio: defer config changed notifications
...o_device *dev = dev_to_virtio(_d); struct virtio_driver *drv = drv_to_virtio(dev->dev.driver); + virtio_config_disable(dev); + drv->remove(dev); /* Driver should have reset device. */ @@ -211,6 +249,10 @@ int register_virtio_device(struct virtio_device *dev) dev->index = err; dev_set_name(&dev->dev, "virtio%u", dev->index); + spin_lock_init(&dev->config_lock); + dev->config_enabled = false; + dev->config_changed = false; + /* We always start by resetting the device, in case a previous * driver messed it up. This also tests that code path a l...
2014 Oct 06
0
[PATCH v2 04/15] virtio: defer config changed notifications
...o_device *dev = dev_to_virtio(_d); struct virtio_driver *drv = drv_to_virtio(dev->dev.driver); + virtio_config_disable(dev); + drv->remove(dev); /* Driver should have reset device. */ @@ -211,6 +251,10 @@ int register_virtio_device(struct virtio_device *dev) dev->index = err; dev_set_name(&dev->dev, "virtio%u", dev->index); + spin_lock_init(&dev->config_lock); + dev->config_enabled = false; + dev->config_changed = false; + /* We always start by resetting the device, in case a previous * driver messed it up. This also tests that code path a l...
2023 Feb 16
0
[PATCH v2] vhost/vdpa: Add MSI translation tables to iommu for software-managed MSI
...ain, dma_dev); > +err_alloc_domain: > iommu_domain_free(v->domain); > return ret; > } > @@ -1385,6 +1436,8 @@ static int vhost_vdpa_probe(struct vdpa_device *vdpa) > goto err; > } > > + vhost_iotlb_init(&v->resv_iotlb, 0, 0); > + > r = dev_set_name(&v->dev, "vhost-vdpa-%u", minor); > if (r) > goto err; We need clean resv_iotlb during release(). Other looks good. Thanks