search for: device_create_file

Displaying 20 results from an estimated 110 matches for "device_create_file".

2011 Jun 24
1
[PATCH 1/2] xen: Populate xenbus device attributes
The xenbus bus type uses device_create_file to assign all used device attributes. However it does not remove them when the device goes away. This patch uses the dev_attrs field of the bus type to specify default attributes for all devices. Signed-off-by: Bastian Blank <waldi at debian.org> --- drivers/xen/xenbus/xenbus_probe.c...
2011 Jun 24
1
[PATCH 1/2] xen: Populate xenbus device attributes
The xenbus bus type uses device_create_file to assign all used device attributes. However it does not remove them when the device goes away. This patch uses the dev_attrs field of the bus type to specify default attributes for all devices. Signed-off-by: Bastian Blank <waldi at debian.org> --- drivers/xen/xenbus/xenbus_probe.c...
2011 Jun 24
1
[PATCH 1/2] xen: Populate xenbus device attributes
The xenbus bus type uses device_create_file to assign all used device attributes. However it does not remove them when the device goes away. This patch uses the dev_attrs field of the bus type to specify default attributes for all devices. Signed-off-by: Bastian Blank <waldi at debian.org> --- drivers/xen/xenbus/xenbus_probe.c...
2016 Aug 17
0
[PATCH 09/15] virtio-blk: Pass attribute group to device_add_disk
...r_group; if (!vdev->config->get) { dev_err(&vdev->dev, "%s failure: config access disabled\n", @@ -719,19 +740,14 @@ static int virtblk_probe(struct virtio_device *vdev) virtio_device_ready(vdev); - device_add_disk(&vdev->dev, vblk->disk, NULL); - err = device_create_file(disk_to_dev(vblk->disk), &dev_attr_serial); - if (err) - goto out_del_disk; - if (virtio_has_feature(vdev, VIRTIO_BLK_F_CONFIG_WCE)) - err = device_create_file(disk_to_dev(vblk->disk), - &dev_attr_cache_type_rw); + attr_group = &virtblk_attr_group_rw; else - err = dev...
2010 May 24
1
mISDN compiling error
...ware/mISDN/sysfs_obj.c:139: error: (Each undeclared identifier is reported only once /usr/src/mISDN-1_1_9_2/drivers/isdn/hardware/mISDN/sysfs_obj.c:139: error: for each function it appears in.) /usr/src/mISDN-1_1_9_2/drivers/isdn/hardware/mISDN/sysfs_obj.c:149: warning: ignoring return value of ?device_create_file?, declared with attribute warn_unused_result /usr/src/mISDN-1_1_9_2/drivers/isdn/hardware/mISDN/sysfs_obj.c:150: warning: ignoring return value of ?device_create_file?, declared with attribute warn_unused_result /usr/src/mISDN-1_1_9_2/drivers/isdn/hardware/mISDN/sysfs_obj.c:151: warning: ignori...
2016 Jun 30
1
[PATCH v2 04/12] axonrom: Generate uevent after attribute available
...if (bank->irq_id == NO_IRQ) { > @@ -262,6 +262,7 @@ static int axon_ram_probe(struct platform_device *device) > rc = -EFAULT; > goto failed; > } > + disk_gen_uevents(bank->disk); I assume you are doing this after: rc = device_create_file(&device->dev, &dev_attr_ecc); ...so that userspace gets notified of the new attribute, but this attribute is on the parent device, not the disk itself. Instead I think this attribute should simply be registered before the call to add_disk(). Then the KOBJ_ADD event for the disk comes...
2016 Jun 30
1
[PATCH v2 04/12] axonrom: Generate uevent after attribute available
...if (bank->irq_id == NO_IRQ) { > @@ -262,6 +262,7 @@ static int axon_ram_probe(struct platform_device *device) > rc = -EFAULT; > goto failed; > } > + disk_gen_uevents(bank->disk); I assume you are doing this after: rc = device_create_file(&device->dev, &dev_attr_ecc); ...so that userspace gets notified of the new attribute, but this attribute is on the parent device, not the disk itself. Instead I think this attribute should simply be registered before the call to add_disk(). Then the KOBJ_ADD event for the disk comes...
2012 Jul 04
1
[PATCH] virtio-blk: allow toggling host cache between writeback and writethrough
...host, the guest should obey */ > if (virtio_has_feature(vdev, VIRTIO_BLK_F_RO)) > @@ -553,6 +627,14 @@ static int __devinit virtblk_probe(struct virtio_device *vdev) > if (err) > goto out_del_disk; > > + if (virtio_has_feature(vdev, VIRTIO_BLK_F_CONFIG_WCE)) > + err = device_create_file(disk_to_dev(vblk->disk), > + &dev_attr_cache_type_rw); > + else > + err = device_create_file(disk_to_dev(vblk->disk), > + &dev_attr_cache_type_ro); > + if (err) > + goto out_del_disk; > return 0; > > out_del_disk: > @@ -655,7 +737,7 @@ st...
2012 Jul 04
1
[PATCH] virtio-blk: allow toggling host cache between writeback and writethrough
...host, the guest should obey */ > if (virtio_has_feature(vdev, VIRTIO_BLK_F_RO)) > @@ -553,6 +627,14 @@ static int __devinit virtblk_probe(struct virtio_device *vdev) > if (err) > goto out_del_disk; > > + if (virtio_has_feature(vdev, VIRTIO_BLK_F_CONFIG_WCE)) > + err = device_create_file(disk_to_dev(vblk->disk), > + &dev_attr_cache_type_rw); > + else > + err = device_create_file(disk_to_dev(vblk->disk), > + &dev_attr_cache_type_ro); > + if (err) > + goto out_del_disk; > return 0; > > out_del_disk: > @@ -655,7 +737,7 @@ st...
2010 Jun 18
4
[PATCH 1/2] Add 'serial' attribute to virtio-blk devices
...BYTES, PAGE_SIZE)); +} +DEVICE_ATTR(serial, S_IRUGO, virtblk_serial_show, NULL); + static int __devinit virtblk_probe(struct virtio_device *vdev) { struct virtio_blk *vblk; @@ -445,8 +470,15 @@ static int __devinit virtblk_probe(struct virtio_device *vdev) add_disk(vblk->disk); + err = device_create_file(disk_to_dev(vblk->disk), &dev_attr_serial); + if (err) + goto out_del_disk; + return 0; +out_del_disk: + del_gendisk(vblk->disk); + blk_cleanup_queue(vblk->disk->queue); out_put_disk: put_disk(vblk->disk); out_mempool: -- 1.6.3.3
2010 Jun 18
4
[PATCH 1/2] Add 'serial' attribute to virtio-blk devices
...BYTES, PAGE_SIZE)); +} +DEVICE_ATTR(serial, S_IRUGO, virtblk_serial_show, NULL); + static int __devinit virtblk_probe(struct virtio_device *vdev) { struct virtio_blk *vblk; @@ -445,8 +470,15 @@ static int __devinit virtblk_probe(struct virtio_device *vdev) add_disk(vblk->disk); + err = device_create_file(disk_to_dev(vblk->disk), &dev_attr_serial); + if (err) + goto out_del_disk; + return 0; +out_del_disk: + del_gendisk(vblk->disk); + blk_cleanup_queue(vblk->disk->queue); out_put_disk: put_disk(vblk->disk); out_mempool: -- 1.6.3.3
2008 Nov 21
22
[PATCH 0/13 v7] PCI: Linux kernel SR-IOV support
Greetings, Following patches are intended to support SR-IOV capability in the Linux kernel. With these patches, people can turn a PCI device with the capability into multiple ones from software perspective, which will benefit KVM and achieve other purposes such as QoS, security, and etc. The Physical Function and Virtual Function drivers using the SR-IOV APIs will come soon! Major changes from
2008 Nov 21
22
[PATCH 0/13 v7] PCI: Linux kernel SR-IOV support
Greetings, Following patches are intended to support SR-IOV capability in the Linux kernel. With these patches, people can turn a PCI device with the capability into multiple ones from software perspective, which will benefit KVM and achieve other purposes such as QoS, security, and etc. The Physical Function and Virtual Function drivers using the SR-IOV APIs will come soon! Major changes from
2008 Nov 21
22
[PATCH 0/13 v7] PCI: Linux kernel SR-IOV support
Greetings, Following patches are intended to support SR-IOV capability in the Linux kernel. With these patches, people can turn a PCI device with the capability into multiple ones from software perspective, which will benefit KVM and achieve other purposes such as QoS, security, and etc. The Physical Function and Virtual Function drivers using the SR-IOV APIs will come soon! Major changes from
2016 Jul 01
1
[PATCH v2 00/12] gendisk: Generate uevent after attribute available
On Wed, 06/29 23:38, Christoph Hellwig wrote: > On Thu, Jun 30, 2016 at 02:35:54PM +0800, Fam Zheng wrote: > > also more code and less flexible IMO. For example, we need at least two > > variants, for attribute_group and device_attribute separately, right? > > Yes, or maybe just a calling convention that just passes both. OK, I can look into that, but I'm not sure about
2016 Jul 01
1
[PATCH v2 00/12] gendisk: Generate uevent after attribute available
On Wed, 06/29 23:38, Christoph Hellwig wrote: > On Thu, Jun 30, 2016 at 02:35:54PM +0800, Fam Zheng wrote: > > also more code and less flexible IMO. For example, we need at least two > > variants, for attribute_group and device_attribute separately, right? > > Yes, or maybe just a calling convention that just passes both. OK, I can look into that, but I'm not sure about
2006 Jun 30
0
[PATCH][BLKBACK] Clean code by VBD_SHOW macro in xenbus.c
This patch is cleaning code in xenbus.c by VBD_SHOW macro. VBD_SHOW macro can be applied show functions with corresponded to ''physical_devices'' and ''mode'' attributes. And corresponding ''device_create_file'' and ''device_remove_file'' function can be inserted into ''xenvbd_sysfs_addif'' and ''xenvbd_sysfs_delif functions'' too. So, this patch transfer code based on above reasons. Thereby, code will be clear. Thanks, Satoshi UCHIDA _________...
2014 Oct 06
0
[PATCH v2 12/15] virtio_blk: enable VQs early
...00644 --- a/drivers/block/virtio_blk.c +++ b/drivers/block/virtio_blk.c @@ -719,6 +719,8 @@ static int virtblk_probe(struct virtio_device *vdev) if (!err && opt_io_size) blk_queue_io_opt(q, blk_size * opt_io_size); + virtio_enable_vqs_early(vdev); + add_disk(vblk->disk); err = device_create_file(disk_to_dev(vblk->disk), &dev_attr_serial); if (err) -- MST
2014 Oct 06
0
[PATCH v2 12/15] virtio_blk: enable VQs early
...00644 --- a/drivers/block/virtio_blk.c +++ b/drivers/block/virtio_blk.c @@ -719,6 +719,8 @@ static int virtblk_probe(struct virtio_device *vdev) if (!err && opt_io_size) blk_queue_io_opt(q, blk_size * opt_io_size); + virtio_enable_vqs_early(vdev); + add_disk(vblk->disk); err = device_create_file(disk_to_dev(vblk->disk), &dev_attr_serial); if (err) -- MST
2008 Oct 21
16
[PATCH 0/15 v5] PCI: Linux kernel SR-IOV support
Greetings, Following patches are intended to support SR-IOV capability in the Linux kernel. With these patches, people can turn a PCI device with the capability into multiple ones from software perspective, which will benefit KVM and achieve other purposes such as QoS, security, and etc. Major changes between v4 -> v5: 1, remove interfaces for PF driver to create sysfs entries (Matthew