From: David Hildenbrand Date: Wed, 18 Jun 2014 12:16:44 +0000 (+0200) Subject: pc-bios/s390-ccw: virtio_load_direct() can't load max number of sectors X-Git-Tag: v2.1.0-rc0~33^2~3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=554f80896dbdc6ce5bb01eab9659facf05ccf168;p=thirdparty%2Fqemu.git pc-bios/s390-ccw: virtio_load_direct() can't load max number of sectors The number of sectors to read is given by the last 16 bit of rec_list2. 1 is added in order to get to the real number of sectors to read (0x0000 -> read 1 block). For now, the maximum number (0xffff) led to 0 sectors being read. This fixes a bug where a large initrd (62MB) could not be ipled anymore. Signed-off-by: David Hildenbrand Signed-off-by: Jens Freimann Reviewed-by: Cornelia Huck Reviewed-by: Alexander Graf Signed-off-by: Cornelia Huck --- diff --git a/pc-bios/s390-ccw/virtio.c b/pc-bios/s390-ccw/virtio.c index a46914dd68f..bbb3c4f36d7 100644 --- a/pc-bios/s390-ccw/virtio.c +++ b/pc-bios/s390-ccw/virtio.c @@ -240,7 +240,7 @@ unsigned long virtio_load_direct(ulong rec_list1, ulong rec_list2, { u8 status; int sec = rec_list1; - int sec_num = (((rec_list2 >> 32)+ 1) & 0xffff); + int sec_num = ((rec_list2 >> 32) & 0xffff) + 1; int sec_len = rec_list2 >> 48; ulong addr = (ulong)load_addr;