提交 e3f74b84 编写于 作者: S Stephen Hemminger 提交者: David S. Miller

hv_netvsc: report vmbus name in ethtool

Make netvsc on vmbus behave more like PCI.
Signed-off-by: NStephen Hemminger <sthemmin@microsoft.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 6c4c137e
...@@ -734,8 +734,12 @@ int netvsc_recv_callback(struct hv_device *device_obj, ...@@ -734,8 +734,12 @@ int netvsc_recv_callback(struct hv_device *device_obj,
static void netvsc_get_drvinfo(struct net_device *net, static void netvsc_get_drvinfo(struct net_device *net,
struct ethtool_drvinfo *info) struct ethtool_drvinfo *info)
{ {
struct net_device_context *net_device_ctx = netdev_priv(net);
struct hv_device *dev = net_device_ctx->device_ctx;
strlcpy(info->driver, KBUILD_MODNAME, sizeof(info->driver)); strlcpy(info->driver, KBUILD_MODNAME, sizeof(info->driver));
strlcpy(info->fw_version, "N/A", sizeof(info->fw_version)); strlcpy(info->fw_version, "N/A", sizeof(info->fw_version));
strlcpy(info->bus_info, vmbus_dev_name(dev), sizeof(info->bus_info));
} }
static void netvsc_get_channels(struct net_device *net, static void netvsc_get_channels(struct net_device *net,
......
...@@ -1114,6 +1114,13 @@ int __must_check __vmbus_driver_register(struct hv_driver *hv_driver, ...@@ -1114,6 +1114,13 @@ int __must_check __vmbus_driver_register(struct hv_driver *hv_driver,
const char *mod_name); const char *mod_name);
void vmbus_driver_unregister(struct hv_driver *hv_driver); void vmbus_driver_unregister(struct hv_driver *hv_driver);
static inline const char *vmbus_dev_name(const struct hv_device *device_obj)
{
const struct kobject *kobj = &device_obj->device.kobj;
return kobj->name;
}
void vmbus_hvsock_device_unregister(struct vmbus_channel *channel); void vmbus_hvsock_device_unregister(struct vmbus_channel *channel);
int vmbus_allocate_mmio(struct resource **new, struct hv_device *device_obj, int vmbus_allocate_mmio(struct resource **new, struct hv_device *device_obj,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册