Skip to content

Commit 971bedc

Browse files
cohuckmstsirkin
authored andcommitted
virtio-ccw: wire up ->bus_name callback
Return the bus id of the ccw proxy device. This makes 'ethtool -i' show a more useful value than 'virtio' in the bus-info field. Acked-by: Halil Pasic <pasic@linux.ibm.com> Signed-off-by: Cornelia Huck <cohuck@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
1 parent 3438b2c commit 971bedc

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

drivers/s390/virtio/virtio_ccw.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -975,6 +975,13 @@ static void virtio_ccw_set_status(struct virtio_device *vdev, u8 status)
975975
kfree(ccw);
976976
}
977977

978+
static const char *virtio_ccw_bus_name(struct virtio_device *vdev)
979+
{
980+
struct virtio_ccw_device *vcdev = to_vc_device(vdev);
981+
982+
return dev_name(&vcdev->cdev->dev);
983+
}
984+
978985
static const struct virtio_config_ops virtio_ccw_config_ops = {
979986
.get_features = virtio_ccw_get_features,
980987
.finalize_features = virtio_ccw_finalize_features,
@@ -985,6 +992,7 @@ static const struct virtio_config_ops virtio_ccw_config_ops = {
985992
.reset = virtio_ccw_reset,
986993
.find_vqs = virtio_ccw_find_vqs,
987994
.del_vqs = virtio_ccw_del_vqs,
995+
.bus_name = virtio_ccw_bus_name,
988996
};
989997

990998

0 commit comments

Comments
 (0)