Displaying 20 results from an estimated 41 matches for "__attr_ro".
2013 Oct 08
0
[PATCH 5/8] virtio: convert bus code to use dev_groups
...odalias);
+
static ssize_t features_show(struct device *_d,
struct device_attribute *attr, char *buf)
{
@@ -47,14 +55,17 @@ static ssize_t features_show(struct device *_d,
len += sprintf(buf+len, "\n");
return len;
}
-static struct device_attribute virtio_dev_attrs[] = {
- __ATTR_RO(device),
- __ATTR_RO(vendor),
- __ATTR_RO(status),
- __ATTR_RO(modalias),
- __ATTR_RO(features),
- __ATTR_NULL
+static DEVICE_ATTR_RO(features);
+
+static struct attribute *virtio_dev_attrs[] = {
+ &dev_attr_device.attr,
+ &dev_attr_vendor.attr,
+ &dev_attr_status.attr,
+ &dev_attr_...
2013 Oct 08
0
[PATCH 5/8] virtio: convert bus code to use dev_groups
...odalias);
+
static ssize_t features_show(struct device *_d,
struct device_attribute *attr, char *buf)
{
@@ -47,14 +55,17 @@ static ssize_t features_show(struct device *_d,
len += sprintf(buf+len, "\n");
return len;
}
-static struct device_attribute virtio_dev_attrs[] = {
- __ATTR_RO(device),
- __ATTR_RO(vendor),
- __ATTR_RO(status),
- __ATTR_RO(modalias),
- __ATTR_RO(features),
- __ATTR_NULL
+static DEVICE_ATTR_RO(features);
+
+static struct attribute *virtio_dev_attrs[] = {
+ &dev_attr_device.attr,
+ &dev_attr_vendor.attr,
+ &dev_attr_status.attr,
+ &dev_attr_...
2013 Oct 17
0
patch "virtio: convert bus code to use dev_groups" added to driver-core tree
...odalias);
+
static ssize_t features_show(struct device *_d,
struct device_attribute *attr, char *buf)
{
@@ -47,14 +55,17 @@ static ssize_t features_show(struct device *_d,
len += sprintf(buf+len, "\n");
return len;
}
-static struct device_attribute virtio_dev_attrs[] = {
- __ATTR_RO(device),
- __ATTR_RO(vendor),
- __ATTR_RO(status),
- __ATTR_RO(modalias),
- __ATTR_RO(features),
- __ATTR_NULL
+static DEVICE_ATTR_RO(features);
+
+static struct attribute *virtio_dev_attrs[] = {
+ &dev_attr_device.attr,
+ &dev_attr_vendor.attr,
+ &dev_attr_status.attr,
+ &dev_attr_...
2013 Oct 17
0
patch "virtio: convert bus code to use dev_groups" added to driver-core tree
...odalias);
+
static ssize_t features_show(struct device *_d,
struct device_attribute *attr, char *buf)
{
@@ -47,14 +55,17 @@ static ssize_t features_show(struct device *_d,
len += sprintf(buf+len, "\n");
return len;
}
-static struct device_attribute virtio_dev_attrs[] = {
- __ATTR_RO(device),
- __ATTR_RO(vendor),
- __ATTR_RO(status),
- __ATTR_RO(modalias),
- __ATTR_RO(features),
- __ATTR_NULL
+static DEVICE_ATTR_RO(features);
+
+static struct attribute *virtio_dev_attrs[] = {
+ &dev_attr_device.attr,
+ &dev_attr_vendor.attr,
+ &dev_attr_status.attr,
+ &dev_attr_...
2011 Jun 24
1
[PATCH 1/2] xen: Populate xenbus device attributes
...struct device *dev,
+ struct device_attribute *attr, char *buf)
{
return sprintf(buf, "xen:%s\n", to_xenbus_device(dev)->devicetype);
}
-static DEVICE_ATTR(modalias, S_IRUSR | S_IRGRP | S_IROTH, xendev_show_modalias, NULL);
+
+struct device_attribute xenbus_dev_attrs[] = {
+ __ATTR_RO(nodename),
+ __ATTR_RO(devtype),
+ __ATTR_RO(modalias),
+ __ATTR_NULL
+};
+EXPORT_SYMBOL_GPL(xenbus_dev_attrs);
int xenbus_probe_node(struct xen_bus_type *bus,
const char *type,
@@ -449,25 +454,7 @@ int xenbus_probe_node(struct xen_bus_type *bus,
if (err)
goto fail;
- err = devic...
2011 Jun 24
1
[PATCH 1/2] xen: Populate xenbus device attributes
...struct device *dev,
+ struct device_attribute *attr, char *buf)
{
return sprintf(buf, "xen:%s\n", to_xenbus_device(dev)->devicetype);
}
-static DEVICE_ATTR(modalias, S_IRUSR | S_IRGRP | S_IROTH, xendev_show_modalias, NULL);
+
+struct device_attribute xenbus_dev_attrs[] = {
+ __ATTR_RO(nodename),
+ __ATTR_RO(devtype),
+ __ATTR_RO(modalias),
+ __ATTR_NULL
+};
+EXPORT_SYMBOL_GPL(xenbus_dev_attrs);
int xenbus_probe_node(struct xen_bus_type *bus,
const char *type,
@@ -449,25 +454,7 @@ int xenbus_probe_node(struct xen_bus_type *bus,
if (err)
goto fail;
- err = devic...
2011 Jun 24
1
[PATCH 1/2] xen: Populate xenbus device attributes
...struct device *dev,
+ struct device_attribute *attr, char *buf)
{
return sprintf(buf, "xen:%s\n", to_xenbus_device(dev)->devicetype);
}
-static DEVICE_ATTR(modalias, S_IRUSR | S_IRGRP | S_IROTH, xendev_show_modalias, NULL);
+
+struct device_attribute xenbus_dev_attrs[] = {
+ __ATTR_RO(nodename),
+ __ATTR_RO(devtype),
+ __ATTR_RO(modalias),
+ __ATTR_NULL
+};
+EXPORT_SYMBOL_GPL(xenbus_dev_attrs);
int xenbus_probe_node(struct xen_bus_type *bus,
const char *type,
@@ -449,25 +454,7 @@ int xenbus_probe_node(struct xen_bus_type *bus,
if (err)
goto fail;
- err = devic...
2007 Apr 18
0
[RFC/PATCH LGUEST X86_64 09/13] lguest64 devices
...const char *buf, size_t count)
+{
+ struct lguest_device *dev = container_of(_dev,struct lguest_device,dev);
+ if (sscanf(buf, "%hi", &lguest_devices[dev->index].status) != 1)
+ return -EINVAL;
+ return count;
+}
+static struct device_attribute lguest_dev_attrs[] = {
+ __ATTR_RO(type),
+ __ATTR_RO(features),
+ __ATTR_RO(pfn),
+ __ATTR(status, 0644, status_show, status_store),
+ __ATTR_NULL
+};
+
+static int lguest_dev_match(struct device *_dev, struct device_driver *_drv)
+{
+ struct lguest_device *dev = container_of(_dev,struct lguest_device,dev);
+ struct lguest_driver *...
2007 Apr 18
0
[RFC/PATCH LGUEST X86_64 09/13] lguest64 devices
...const char *buf, size_t count)
+{
+ struct lguest_device *dev = container_of(_dev,struct lguest_device,dev);
+ if (sscanf(buf, "%hi", &lguest_devices[dev->index].status) != 1)
+ return -EINVAL;
+ return count;
+}
+static struct device_attribute lguest_dev_attrs[] = {
+ __ATTR_RO(type),
+ __ATTR_RO(features),
+ __ATTR_RO(pfn),
+ __ATTR(status, 0644, status_show, status_store),
+ __ATTR_NULL
+};
+
+static int lguest_dev_match(struct device *_dev, struct device_driver *_drv)
+{
+ struct lguest_device *dev = container_of(_dev,struct lguest_device,dev);
+ struct lguest_driver *...
2007 Sep 24
3
[PATCH 0/3] virtio implementation (draft VI)
I'm not reposting the drivers this time since they haven't changed
significantly. See http://lguest.ozlabs.org/patches for the whole
thing, from new-io.patch onwards).
Changes since last version:
- Switch to our own bus implementation, rather than relying on
an implementation-specific bus to back this up.
- Make virtio_config_ops much higher-level, don't assume layout
of
2007 Sep 24
3
[PATCH 0/3] virtio implementation (draft VI)
I'm not reposting the drivers this time since they haven't changed
significantly. See http://lguest.ozlabs.org/patches for the whole
thing, from new-io.patch onwards).
Changes since last version:
- Switch to our own bus implementation, rather than relying on
an implementation-specific bus to back this up.
- Make virtio_config_ops much higher-level, don't assume layout
of
2014 Jan 16
0
[PATCH net-next v4 6/6] virtio-net: initial rx sysfs support, export mergeable rx buffer size
...ev_rx_queue_index(queue);
+ struct ewma *avg;
+
+ BUG_ON(queue_index >= vi->max_queue_pairs);
+ avg = &vi->rq[queue_index].mrg_avg_pkt_len;
+ return sprintf(buf, "%u\n", get_mergeable_buf_len(avg));
+}
+
+static struct rx_queue_attribute mergeable_rx_buffer_size_attribute =
+ __ATTR_RO(mergeable_rx_buffer_size);
+
+static struct attribute *virtio_net_mrg_rx_attrs[] = {
+ &mergeable_rx_buffer_size_attribute.attr,
+ NULL
+};
+
+static const struct attribute_group virtio_net_mrg_rx_group = {
+ .name = "virtio_net",
+ .attrs = virtio_net_mrg_rx_attrs
+};
+#endif
+
stat...
2007 May 09
1
[patch 2/9] lguest: the guest code
...const char *buf, size_t count)
+{
+ struct lguest_device *dev = container_of(_dev,struct lguest_device,dev);
+ if (sscanf(buf, "%hi", &lguest_devices[dev->index].status) != 1)
+ return -EINVAL;
+ return count;
+}
+static struct device_attribute lguest_dev_attrs[] = {
+ __ATTR_RO(type),
+ __ATTR_RO(features),
+ __ATTR_RO(pfn),
+ __ATTR(status, 0644, status_show, status_store),
+ __ATTR_NULL
+};
+
+static int lguest_dev_match(struct device *_dev, struct device_driver *_drv)
+{
+ struct lguest_device *dev = container_of(_dev,struct lguest_device,dev);
+ struct lguest_driver *...
2007 May 09
1
[patch 2/9] lguest: the guest code
...const char *buf, size_t count)
+{
+ struct lguest_device *dev = container_of(_dev,struct lguest_device,dev);
+ if (sscanf(buf, "%hi", &lguest_devices[dev->index].status) != 1)
+ return -EINVAL;
+ return count;
+}
+static struct device_attribute lguest_dev_attrs[] = {
+ __ATTR_RO(type),
+ __ATTR_RO(features),
+ __ATTR_RO(pfn),
+ __ATTR(status, 0644, status_show, status_store),
+ __ATTR_NULL
+};
+
+static int lguest_dev_match(struct device *_dev, struct device_driver *_drv)
+{
+ struct lguest_device *dev = container_of(_dev,struct lguest_device,dev);
+ struct lguest_driver *...
2007 Apr 18
1
[PATCH 0/8] lguest
As promised to Andrew, and with much thanks to Andi Kleen for feedback,
this is the new series of lguest patches.
Main change is the move to drivers/lguest (for future non-i386
expansion), but lots of cleanups driven by Andi's feedback and the
documentation effort (which made me examine every line of code).
It's not perfect, but it's definitely useful.
Cheers,
Rusty.
List of
2007 Apr 18
1
[PATCH 0/8] lguest
As promised to Andrew, and with much thanks to Andi Kleen for feedback,
this is the new series of lguest patches.
Main change is the move to drivers/lguest (for future non-i386
expansion), but lots of cleanups driven by Andi's feedback and the
documentation effort (which made me examine every line of code).
It's not perfect, but it's definitely useful.
Cheers,
Rusty.
List of
2014 Jan 16
0
[PATCH net-next v3 5/5] virtio-net: initial rx sysfs support, export mergeable rx buffer size
...start = read_seqcount_begin(&rq->sysfs_seq);
+ avg = rq->mrg_avg_pkt_len;
+ } while (read_seqcount_retry(&rq->sysfs_seq, start));
+ return sprintf(buf, "%u\n", get_mergeable_buf_len(&avg));
+}
+
+static struct rx_queue_attribute mergeable_rx_buffer_size_attribute =
+ __ATTR_RO(mergeable_rx_buffer_size);
+
+static struct attribute *virtio_net_mrg_rx_attrs[] = {
+ &mergeable_rx_buffer_size_attribute.attr,
+ NULL
+};
+
+static const struct attribute_group virtio_net_mrg_rx_group = {
+ .name = "virtio_net",
+ .attrs = virtio_net_mrg_rx_attrs
+};
+#endif
+
stat...
2008 Sep 27
0
[PATCH 4/9] dom0 PCI: support SR-IOV capability
...iner_of(kobj, struct pci_iov, kobj);
+
+ numvfs = simple_strtoll(buf, NULL, 0);
+
+ mutex_lock(&iov->mutex);
+ rc = iov_set_numvfs(iov, numvfs);
+ mutex_unlock(&iov->mutex);
+
+ return rc ? rc : count;
+}
+
+
+static struct iov_attr iov_attr[] = {
+ __ATTR_RO(totalvfs),
+ __ATTR_RO(initialvfs),
+ __ATTR(numvfs, S_IWUSR | S_IRUGO, numvfs_show, numvfs_store),
+ __ATTR(enable, S_IWUSR | S_IRUGO, is_enabled_show, is_enabled_store),
+};
+
+static ssize_t vf_show(struct kobject *kobj, struct iov_attr *attr,
+ ch...
2014 Jan 16
2
[PATCH net-next v3 5/5] virtio-net: initial rx sysfs support, export mergeable rx buffer size
...->sysfs_seq);
> + avg = rq->mrg_avg_pkt_len;
> + } while (read_seqcount_retry(&rq->sysfs_seq, start));
> + return sprintf(buf, "%u\n", get_mergeable_buf_len(&avg));
> +}
> +
> +static struct rx_queue_attribute mergeable_rx_buffer_size_attribute =
> + __ATTR_RO(mergeable_rx_buffer_size);
> +
> +static struct attribute *virtio_net_mrg_rx_attrs[] = {
> + &mergeable_rx_buffer_size_attribute.attr,
> + NULL
> +};
> +
> +static const struct attribute_group virtio_net_mrg_rx_group = {
> + .name = "virtio_net",
> + .attrs...
2014 Jan 16
2
[PATCH net-next v3 5/5] virtio-net: initial rx sysfs support, export mergeable rx buffer size
...->sysfs_seq);
> + avg = rq->mrg_avg_pkt_len;
> + } while (read_seqcount_retry(&rq->sysfs_seq, start));
> + return sprintf(buf, "%u\n", get_mergeable_buf_len(&avg));
> +}
> +
> +static struct rx_queue_attribute mergeable_rx_buffer_size_attribute =
> + __ATTR_RO(mergeable_rx_buffer_size);
> +
> +static struct attribute *virtio_net_mrg_rx_attrs[] = {
> + &mergeable_rx_buffer_size_attribute.attr,
> + NULL
> +};
> +
> +static const struct attribute_group virtio_net_mrg_rx_group = {
> + .name = "virtio_net",
> + .attrs...