Commit 38150be8 authored by Maxim Samoylov's avatar Maxim Samoylov Committed by Cornelia Huck
Browse files

pc-bios/s390-ccw: Always adjust virtio sector count



Let's always adjust the sector number to be read using the current
virtio block size value.

This prepares for the implementation of IPL from ISO-9660 media.

Signed-off-by: default avatarMaxim Samoylov <max7255@linux.vnet.ibm.com>
Reviewed-by: default avatarDavid Hildenbrand <dahi@linux.vnet.ibm.com>
Reviewed-by: default avatarCornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: default avatarCornelia Huck <cornelia.huck@de.ibm.com>
parent 4c292a00
Loading
Loading
Loading
Loading
+1 −6
Original line number Diff line number Diff line
@@ -199,14 +199,9 @@ extern int virtio_read_many(ulong sector, void *load_addr, int sec_num);

#define VIRTIO_SECTOR_SIZE 512

static inline ulong virtio_eckd_sector_adjust(ulong sector)
{
     return sector * (virtio_get_block_size() / VIRTIO_SECTOR_SIZE);
}

static inline ulong virtio_sector_adjust(ulong sector)
{
    return virtio_disk_is_eckd() ? virtio_eckd_sector_adjust(sector) : sector;
    return sector * (virtio_get_block_size() / VIRTIO_SECTOR_SIZE);
}

#endif /* VIRTIO_H */