X-Git-Url: https://repo.jachan.dev/qemu.git/blobdiff_plain/7b6badb6a93956e83135a9b7017997cad6ea7faf..2899f41eef2806cf8eb119811c9d6fcf15ce80f6:/pc-bios/s390-ccw/virtio-scsi.c diff --git a/pc-bios/s390-ccw/virtio-scsi.c b/pc-bios/s390-ccw/virtio-scsi.c index f61ecf0205..4fe4b9d261 100644 --- a/pc-bios/s390-ccw/virtio-scsi.c +++ b/pc-bios/s390-ccw/virtio-scsi.c @@ -9,6 +9,7 @@ * directory. */ +#include "libc.h" #include "s390-ccw.h" #include "virtio.h" #include "scsi.h" @@ -222,7 +223,8 @@ static void virtio_scsi_locate_device(VDev *vdev) for (target = 0; target <= vdev->config.scsi.max_target; target++) { sdev->channel = channel; - sdev->target = target; /* sdev->lun will be 0 here */ + sdev->target = target; + sdev->lun = 0; /* LUN has to be 0 for REPORT LUNS */ if (!scsi_report_luns(vdev, data, sizeof(data))) { if (resp.response == VIRTIO_SCSI_S_BAD_TARGET) { continue;