Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1739222 > unrolled thread

Re: [PATCH 2/2] pci: Expose offset, stride, and VF device ID via sysfs

Started byBjorn Helgaas <helgaas@kernel.org>
First post2017-09-25 21:00 +0200
Last post2017-09-25 21:00 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH 2/2] pci: Expose offset, stride, and VF device ID via  sysfs Bjorn Helgaas <helgaas@kernel.org> - 2017-09-25 21:00 +0200

#1739222 — Re: [PATCH 2/2] pci: Expose offset, stride, and VF device ID via sysfs

FromBjorn Helgaas <helgaas@kernel.org>
Date2017-09-25 21:00 +0200
SubjectRe: [PATCH 2/2] pci: Expose offset, stride, and VF device ID via sysfs
Message-ID<utGLL-1Ok-3@gated-at.bofh.it>
Hi Filippo,

On Mon, Aug 28, 2017 at 03:38:50PM +0200, Filippo Sironi wrote:
> +static ssize_t sriov_vf_did_show(struct device *dev,
> +				 struct device_attribute *attr,
> +				 char *buf)
> +{
> +	struct pci_dev *pdev = to_pci_dev(dev);
> +
> +	return sprintf(buf, "%x\n", pdev->sriov->vf_did);
> +}

What does the vf_did part look like in sysfs?  Do we have a directory with
both "device" and "vf_did" in it?  If so, why do we have both and do we
need both?  Could we put the vf_did in the "device" file?

>  static ssize_t sriov_drivers_autoprobe_show(struct device *dev,
>  					    struct device_attribute *attr,
>  					    char *buf)
> @@ -676,6 +703,9 @@ static struct device_attribute sriov_totalvfs_attr = __ATTR_RO(sriov_totalvfs);
>  static struct device_attribute sriov_numvfs_attr =
>  		__ATTR(sriov_numvfs, (S_IRUGO|S_IWUSR|S_IWGRP),
>  		       sriov_numvfs_show, sriov_numvfs_store);
> +static struct device_attribute sriov_offset_attr = __ATTR_RO(sriov_offset);
> +static struct device_attribute sriov_stride_attr = __ATTR_RO(sriov_stride);
> +static struct device_attribute sriov_vf_did_attr = __ATTR_RO(sriov_vf_did);
>  static struct device_attribute sriov_drivers_autoprobe_attr =
>  		__ATTR(sriov_drivers_autoprobe, (S_IRUGO|S_IWUSR|S_IWGRP),
>  		       sriov_drivers_autoprobe_show, sriov_drivers_autoprobe_store);
> @@ -1744,6 +1774,9 @@ static struct attribute_group pci_dev_hp_attr_group = {
>  static struct attribute *sriov_dev_attrs[] = {
>  	&sriov_totalvfs_attr.attr,
>  	&sriov_numvfs_attr.attr,
> +	&sriov_offset_attr.attr,
> +	&sriov_stride_attr.attr,
> +	&sriov_vf_did_attr.attr,
>  	&sriov_drivers_autoprobe_attr.attr,
>  	NULL,
>  };
> -- 
> 2.7.4
> 

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web