[PATCH v2 2/4] uio_hv_generic: make ring buffer attribute for primary channel
Stephen Hemminger
stephen at networkplumber.org
Mon Apr 16 18:19:25 UTC 2018
The primary channel also needs a ring buffer attribute. This allows
application to check if kernel supports uio sub channels, and also
makes all channels use consistent API.
Signed-off-by: Stephen Hemminger <sthemmin at microsoft.com>
---
drivers/uio/uio_hv_generic.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/uio/uio_hv_generic.c b/drivers/uio/uio_hv_generic.c
index 7ff659dff11d..972a42dd2a46 100644
--- a/drivers/uio/uio_hv_generic.c
+++ b/drivers/uio/uio_hv_generic.c
@@ -326,6 +326,11 @@ hv_uio_probe(struct hv_device *dev,
vmbus_set_chn_rescind_callback(dev->channel, hv_uio_rescind);
vmbus_set_sc_create_callback(dev->channel, hv_uio_new_channel);
+ ret = sysfs_create_bin_file(&dev->channel->kobj, &ring_buffer_bin_attr);
+ if (ret)
+ dev_notice(&dev->device,
+ "sysfs create ring bin file failed; %d\n", ret);
+
hv_set_drvdata(dev, pdata);
return 0;
--
2.17.0
More information about the devel
mailing list