mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 23:32:14 +00:00
enable virtio_net to return bus_info in ethtool -i consistent with emulated NICs
Add a new .bus_name to virtio_config_ops then modify virtio_net to call through to it in an ethtool .get_drvinfo routine to report bus_info in ethtool -i output which is consistent with other emulated NICs and the output of lspci. Signed-off-by: Rick Jones <rick.jones2@hp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
64882709ef
commit
66846048f5
6 changed files with 55 additions and 0 deletions
|
@ -361,7 +361,12 @@ static int vm_find_vqs(struct virtio_device *vdev, unsigned nvqs,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static const char *vm_bus_name(struct virtio_device *vdev)
|
||||
{
|
||||
struct virtio_mmio_device *vm_dev = to_virtio_mmio_device(vdev);
|
||||
|
||||
return vm_dev->pdev->name;
|
||||
}
|
||||
|
||||
static struct virtio_config_ops virtio_mmio_config_ops = {
|
||||
.get = vm_get,
|
||||
|
@ -373,6 +378,7 @@ static struct virtio_config_ops virtio_mmio_config_ops = {
|
|||
.del_vqs = vm_del_vqs,
|
||||
.get_features = vm_get_features,
|
||||
.finalize_features = vm_finalize_features,
|
||||
.bus_name = vm_bus_name,
|
||||
};
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue