|
|
0727d3 |
From 8b05a4aa32e5ae6cdbc16a5350f6df35d2d79efc Mon Sep 17 00:00:00 2001
|
|
|
0727d3 |
From: Thomas Huth <thuth@redhat.com>
|
|
|
0727d3 |
Date: Fri, 8 Jul 2022 12:29:50 +0200
|
|
|
0727d3 |
Subject: [PATCH 35/37] pc-bios/s390-ccw/virtio: Beautify the code for reading
|
|
|
0727d3 |
virtqueue configuration
|
|
|
0727d3 |
|
|
|
0727d3 |
RH-Author: Thomas Huth <thuth@redhat.com>
|
|
|
0727d3 |
RH-MergeRequest: 198: pc-bios/s390-ccw: Fix boot from disks with 4k sectors that do not have the typical DASD geometry
|
|
|
0727d3 |
RH-Commit: [7/9] 52fb7fee7d7c46397f32e35bd5f92f82616dfb5c
|
|
|
0727d3 |
RH-Bugzilla: 2098076
|
|
|
0727d3 |
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
0727d3 |
RH-Acked-by: David Hildenbrand <david@redhat.com>
|
|
|
0727d3 |
RH-Acked-by: Cornelia Huck <cohuck@redhat.com>
|
|
|
0727d3 |
|
|
|
0727d3 |
Bugzilla: http://bugzilla.redhat.com/2098076
|
|
|
0727d3 |
|
|
|
0727d3 |
commit 070824885741f5d2a66626d3c4ecb2773c8e0552
|
|
|
0727d3 |
Author: Thomas Huth <thuth@redhat.com>
|
|
|
0727d3 |
Date: Mon Jul 4 13:18:59 2022 +0200
|
|
|
0727d3 |
|
|
|
0727d3 |
pc-bios/s390-ccw/virtio: Beautify the code for reading virtqueue configuration
|
|
|
0727d3 |
|
|
|
0727d3 |
It looks nicer if we separate the run_ccw() from the IPL_assert()
|
|
|
0727d3 |
statement, and the error message should talk about "virtio device"
|
|
|
0727d3 |
instead of "block device", since this code is nowadays used for
|
|
|
0727d3 |
non-block (i.e. network) devices, too.
|
|
|
0727d3 |
|
|
|
0727d3 |
Message-Id: <20220704111903.62400-9-thuth@redhat.com>
|
|
|
0727d3 |
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
|
|
|
0727d3 |
Reviewed-by: Eric Farman <farman@linux.ibm.com>
|
|
|
0727d3 |
Signed-off-by: Thomas Huth <thuth@redhat.com>
|
|
|
0727d3 |
|
|
|
0727d3 |
Signed-off-by: Thomas Huth <thuth@redhat.com>
|
|
|
0727d3 |
---
|
|
|
0727d3 |
pc-bios/s390-ccw/virtio.c | 5 ++---
|
|
|
0727d3 |
1 file changed, 2 insertions(+), 3 deletions(-)
|
|
|
0727d3 |
|
|
|
0727d3 |
diff --git a/pc-bios/s390-ccw/virtio.c b/pc-bios/s390-ccw/virtio.c
|
|
|
0727d3 |
index d8c2b52710..f37510f312 100644
|
|
|
0727d3 |
--- a/pc-bios/s390-ccw/virtio.c
|
|
|
0727d3 |
+++ b/pc-bios/s390-ccw/virtio.c
|
|
|
0727d3 |
@@ -289,9 +289,8 @@ void virtio_setup_ccw(VDev *vdev)
|
|
|
0727d3 |
.num = 0,
|
|
|
0727d3 |
};
|
|
|
0727d3 |
|
|
|
0727d3 |
- IPL_assert(
|
|
|
0727d3 |
- run_ccw(vdev, CCW_CMD_READ_VQ_CONF, &config, sizeof(config), false) == 0,
|
|
|
0727d3 |
- "Could not get block device VQ configuration");
|
|
|
0727d3 |
+ rc = run_ccw(vdev, CCW_CMD_READ_VQ_CONF, &config, sizeof(config), false);
|
|
|
0727d3 |
+ IPL_assert(rc == 0, "Could not get virtio device VQ configuration");
|
|
|
0727d3 |
info.num = config.num;
|
|
|
0727d3 |
vring_init(&vdev->vrings[i], &info;;
|
|
|
0727d3 |
vdev->vrings[i].schid = vdev->schid;
|
|
|
0727d3 |
--
|
|
|
0727d3 |
2.35.3
|
|
|
0727d3 |
|