search for: attr_group

Displaying 19 results from an estimated 19 matches for "attr_group".

2016 Aug 18
1
[PATCH 11/15] zram: Pass attribute group to device_add_disk
...10 @@ static int zram_add(void) > zram->disk->queue->limits.discard_zeroes_data = 0; > queue_flag_set_unlocked(QUEUE_FLAG_DISCARD, zram->disk->queue); > > - device_add_disk(NULL, zram->disk, NULL); > + ret = device_add_disk(NULL, zram->disk, &zram_disk_attr_group); > > - ret = sysfs_create_group(&disk_to_dev(zram->disk)->kobj, > - &zram_disk_attr_group); > if (ret < 0) { > - pr_err("Error creating sysfs group for device %d\n", > - device_id); > + pr_err("Error creating disk %d\n", device_...
2016 Aug 17
0
[PATCH 09/15] virtio-blk: Pass attribute group to device_add_disk
...44); +static struct attribute *virtblk_attrs_ro[] = { + &dev_attr_serial.attr, + &dev_attr_cache_type_ro.attr, + NULL +}; + +static struct attribute *virtblk_attrs_rw[] = { + &dev_attr_serial.attr, + &dev_attr_cache_type_rw.attr, + NULL +}; + +static struct attribute_group virtblk_attr_group_ro = { + .attrs = virtblk_attrs_ro, +}; + +static struct attribute_group virtblk_attr_group_rw = { + .attrs = virtblk_attrs_rw, +}; + static int virtblk_probe(struct virtio_device *vdev) { struct virtio_blk *vblk; @@ -560,6 +580,7 @@ static int virtblk_probe(struct virtio_device *vdev) u32...
2016 Aug 18
1
[PATCH 11/15] zram: Pass attribute group to device_add_disk
...10 @@ static int zram_add(void) > zram->disk->queue->limits.discard_zeroes_data = 0; > queue_flag_set_unlocked(QUEUE_FLAG_DISCARD, zram->disk->queue); > > - device_add_disk(NULL, zram->disk, NULL); > + ret = device_add_disk(NULL, zram->disk, &zram_disk_attr_group); > > - ret = sysfs_create_group(&disk_to_dev(zram->disk)->kobj, > - &zram_disk_attr_group); > if (ret < 0) { > - pr_err("Error creating sysfs group for device %d\n", > - device_id); > + pr_err("Error creating disk %d\n", device_...
2013 Aug 12
1
[PATCH v2 1/7] Intel MIC Host Driver for X100 family.
...is MIC device. > + * @mmio: MMIO bar information. > + * @pdev: The PCI device structure. > + * @family: The MIC family to which this device belongs. > + * @ops: MIC HW specific operations. > + * @id: The unique device id for this MIC device. > + * @stepping: Stepping ID. > + * @attr_group: Sysfs attribute group. > + * @sdev: Device for sysfs entries. > + * @aper: Aperture bar information. > + */ > +struct mic_device { > + char name[20]; The name can be in the struct device (it should be the same, right?) > + struct mic_mw mmio; > + struct pci_dev *pdev; Isn...
2013 Aug 12
1
[PATCH v2 1/7] Intel MIC Host Driver for X100 family.
...is MIC device. > + * @mmio: MMIO bar information. > + * @pdev: The PCI device structure. > + * @family: The MIC family to which this device belongs. > + * @ops: MIC HW specific operations. > + * @id: The unique device id for this MIC device. > + * @stepping: Stepping ID. > + * @attr_group: Sysfs attribute group. > + * @sdev: Device for sysfs entries. > + * @aper: Aperture bar information. > + */ > +struct mic_device { > + char name[20]; The name can be in the struct device (it should be the same, right?) > + struct mic_mw mmio; > + struct pci_dev *pdev; Isn...
2016 Aug 17
20
[PATCH 00/15] Fix issue with KOBJ_ADD uevent versus disk attributes
...g device hotplug, udev may fail to find certain attributes, such as serial or wwn, of the disk. As a result the /dev/disk/by-id entries are not created. The cause is device_add_disk emits the uevent before returning, and the callers have to create sysfs entries after that. The fix here is to pass attr_groups from callers to device_add_disk, so it can be added before KOBJ_ADD. Also add basic error handling around device_add_disk code, (or add FIXME comment where work is left). Fam Zheng (15): disk: Drop add_disk in favor of device_add_disk genhd: Return error from register_disk() genhd: Return...
2016 Aug 17
20
[PATCH 00/15] Fix issue with KOBJ_ADD uevent versus disk attributes
...g device hotplug, udev may fail to find certain attributes, such as serial or wwn, of the disk. As a result the /dev/disk/by-id entries are not created. The cause is device_add_disk emits the uevent before returning, and the callers have to create sysfs entries after that. The fix here is to pass attr_groups from callers to device_add_disk, so it can be added before KOBJ_ADD. Also add basic error handling around device_add_disk code, (or add FIXME comment where work is left). Fam Zheng (15): disk: Drop add_disk in favor of device_add_disk genhd: Return error from register_disk() genhd: Return...
2013 Aug 08
0
[PATCH v2 1/7] Intel MIC Host Driver for X100 family.
.... + * + * @name: Unique name for this MIC device. + * @mmio: MMIO bar information. + * @pdev: The PCI device structure. + * @family: The MIC family to which this device belongs. + * @ops: MIC HW specific operations. + * @id: The unique device id for this MIC device. + * @stepping: Stepping ID. + * @attr_group: Sysfs attribute group. + * @sdev: Device for sysfs entries. + * @aper: Aperture bar information. + */ +struct mic_device { + char name[20]; + struct mic_mw mmio; + struct pci_dev *pdev; + enum mic_hw_family family; + struct mic_hw_ops *ops; + int id; + enum mic_stepping stepping; + struct attribut...
2013 Sep 05
0
[PATCH RESEND v3 1/7] Intel MIC Host Driver for X100 family.
...vice - MIC device information for each card. + * + * @mmio: MMIO bar information. + * @aper: Aperture bar information. + * @family: The MIC family to which this device belongs. + * @ops: MIC HW specific operations. + * @id: The unique device id for this MIC device. + * @stepping: Stepping ID. + * @attr_group: Pointer to list of sysfs attribute groups. + * @sdev: Device for sysfs entries. + */ +struct mic_device { + struct mic_mw mmio; + struct mic_mw aper; + enum mic_hw_family family; + struct mic_hw_ops *ops; + int id; + enum mic_stepping stepping; + const struct attribute_group **attr_group; + struct...
2013 Jul 25
0
[PATCH 1/5] Intel MIC Host Driver for X100 family.
...ccess to mic_device. + * @family: The MIC family to which this device belongs. + * @ops: MIC HW specific operations. + * @intr_ops: HW specific interrupt operations. + * @smpt_ops: Hardware specific SMPT operations. + * @id: The unique device id for this MIC device. + * @stepping: Stepping ID. + * @attr_group: Sysfs attribute group. + * @dev: Device for sysfs entries. + * @aper: Aperture bar information. + * @smpt: MIC SMPT information. + * @intr_info: H/W specific interrupt information. + * @cmdline: Kernel command line. + * @ipaddr: IP address for this device. + * @firmware: Firmware file name. + * @r...
2013 Aug 08
10
[PATCH v2 0/7] Enable Drivers for Intel MIC X100 Coprocessors.
ChangeLog: ========= v1 => v2: a) License wording cleanup, sysfs ABI documentation, patch 1 refactoring into 3 smaller patches and function renames, as per feedback from Greg Kroah-Hartman. b) Use VRINGH infrastructure for accessing virtio rings from the host in patch 5, as per feedback from Michael S. Tsirkin. v1: Initial post @ https://lkml.org/lkml/2013/7/24/810 Description:
2013 Aug 08
10
[PATCH v2 0/7] Enable Drivers for Intel MIC X100 Coprocessors.
ChangeLog: ========= v1 => v2: a) License wording cleanup, sysfs ABI documentation, patch 1 refactoring into 3 smaller patches and function renames, as per feedback from Greg Kroah-Hartman. b) Use VRINGH infrastructure for accessing virtio rings from the host in patch 5, as per feedback from Michael S. Tsirkin. v1: Initial post @ https://lkml.org/lkml/2013/7/24/810 Description:
2016 Aug 17
0
[PATCH 15/15] block: Add FIXME comment to handle device_add_disk error
.../aoe/aoeblk.c b/drivers/block/aoe/aoeblk.c index d1b7541..6e7a128 100644 --- a/drivers/block/aoe/aoeblk.c +++ b/drivers/block/aoe/aoeblk.c @@ -412,6 +412,7 @@ aoeblk_gdalloc(void *vp) spin_unlock_irqrestore(&d->lock, flags); + /* FIXME: handle error. */ device_add_disk(NULL, gd, &attr_group); aoedisk_add_debugfs(d); diff --git a/drivers/block/ataflop.c b/drivers/block/ataflop.c index 0587aa36..f3a2974 100644 --- a/drivers/block/ataflop.c +++ b/drivers/block/ataflop.c @@ -1969,6 +1969,7 @@ static int __init atari_floppy_init (void) if (!unit[i].disk->queue) goto Enomem;...
2013 Sep 05
16
[PATCH RESEND v3 0/7] Enable Drivers for Intel MIC X100 Coprocessors.
ChangeLog: ========= v2 => v3: a) Patch 1 data structure cleanups, header file include cleanups, IDA interface reuse and switching to device_create_with_groups(..) as per feedback from Greg Kroah-Hartman. b) Patch 7 signal documentation, sleep workaround removal and sysfs access API cleanups as per feedback from Michael S. Tsirkin. v1 => v2: @ http://lwn.net/Articles/563131/ a)
2013 Sep 05
16
[PATCH RESEND v3 0/7] Enable Drivers for Intel MIC X100 Coprocessors.
ChangeLog: ========= v2 => v3: a) Patch 1 data structure cleanups, header file include cleanups, IDA interface reuse and switching to device_create_with_groups(..) as per feedback from Greg Kroah-Hartman. b) Patch 7 signal documentation, sleep workaround removal and sysfs access API cleanups as per feedback from Michael S. Tsirkin. v1 => v2: @ http://lwn.net/Articles/563131/ a)
2013 Aug 21
10
[PATCH v3 0/7] Enable Drivers for Intel MIC X100 Coprocessors.
ChangeLog: ========= v2 => v3: a) Patch 1 data structure cleanups, header file include cleanups, IDA interface reuse and switching to device_create_with_groups(..) as per feedback from Greg Kroah-Hartman. b) Patch 7 signal documentation, sleep workaround removal and sysfs access API cleanups as per feedback from Michael S. Tsirkin. v1 => v2: @ http://lwn.net/Articles/563131/ a)
2013 Aug 21
10
[PATCH v3 0/7] Enable Drivers for Intel MIC X100 Coprocessors.
ChangeLog: ========= v2 => v3: a) Patch 1 data structure cleanups, header file include cleanups, IDA interface reuse and switching to device_create_with_groups(..) as per feedback from Greg Kroah-Hartman. b) Patch 7 signal documentation, sleep workaround removal and sysfs access API cleanups as per feedback from Michael S. Tsirkin. v1 => v2: @ http://lwn.net/Articles/563131/ a)
2013 Jul 25
16
[PATCH 0/5] Enable Drivers for Intel MIC X100 Coprocessors.
An Intel MIC X100 device is a PCIe form factor add-in coprocessor card based on the Intel Many Integrated Core (MIC) architecture that runs a Linux OS. It is a PCIe endpoint in a platform and therefore implements the three required standard address spaces i.e. configuration, memory and I/O. The host OS loads a device driver as is typical for PCIe devices. The card itself runs a bootstrap after
2013 Jul 25
16
[PATCH 0/5] Enable Drivers for Intel MIC X100 Coprocessors.
An Intel MIC X100 device is a PCIe form factor add-in coprocessor card based on the Intel Many Integrated Core (MIC) architecture that runs a Linux OS. It is a PCIe endpoint in a platform and therefore implements the three required standard address spaces i.e. configuration, memory and I/O. The host OS loads a device driver as is typical for PCIe devices. The card itself runs a bootstrap after