On 8/26/26 5:11 PM, Eric Farman wrote:


On 8/11/26 10:46 AM, [email protected] wrote:
From: Jared Rossi <[email protected]>

[...]
diff --git a/pc-bios/s390-ccw/virtio-scsi.c b/pc-bios/s390-ccw/virtio-scsi.c
index 9ea00c6fe6..095d7ac430 100644
--- a/pc-bios/s390-ccw/virtio-scsi.c
+++ b/pc-bios/s390-ccw/virtio-scsi.c
@@ -16,6 +16,7 @@
  #include "scsi.h"
  #include "virtio-scsi.h"
  #include "virtio-ccw.h"
+#include "virtio-pci.h"
  #include "s390-time.h"
  #include "helper.h"
  @@ -479,7 +480,16 @@ static int virtio_scsi_setup(VDev *vdev)
    int virtio_scsi_setup_device(VDev *vdev)
  {
-    virtio_ccw_setup(vdev);
+    switch (vdev->ipl_type) {
+    case S390_IPL_TYPE_CCW:
+        virtio_ccw_setup(vdev);
+        break;
+    case S390_IPL_TYPE_PCI:
+        virtio_pci_setup(vdev);
+        break;

Why was/is the return code from virtio_*_setup discarded? Shouldn't we do -something- if it's nonzero instead of continuing on?

Besides that, this looks good to me.


Unfortunately I don’t have a good answer for that.  That is just how it has
always been and so I didn’t change it; however, in the same vein as the
discussion with Matt about clarifying the IPLB length definitions from the
other day, now would be a good time to update it rather than continuing
existing bad practices.

I’ll propagate the return code on error in the next version.

Regards,
Jared Rossi

Reply via email to