pc-bios/s390-ccw: Add virtio-net driver code

The driver provides the recv() and send() functions which will
be required by SLOF's libnet code for receiving and sending
packets.

Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-Id: <1499863793-18627-11-git-send-email-thuth@redhat.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
This commit is contained in:
Thomas Huth 2017-07-12 14:49:52 +02:00 committed by Christian Borntraeger
parent 3e4415a751
commit 00dde1e60d
4 changed files with 151 additions and 3 deletions

View file

@ -266,6 +266,11 @@ void virtio_setup_ccw(VDev *vdev)
run_ccw(vdev, CCW_CMD_VDEV_RESET, NULL, 0);
switch (vdev->senseid.cu_model) {
case VIRTIO_ID_NET:
vdev->nr_vqs = 2;
vdev->cmd_vr_idx = 0;
cfg_size = sizeof(vdev->config.net);
break;
case VIRTIO_ID_BLOCK:
vdev->nr_vqs = 1;
vdev->cmd_vr_idx = 0;