pc-bios/s390-ccw: support all virtio block size
commit92cb05574b7bd489be81f9c58497dc7dfe5d8859
authorEugene (jno) Dvurechenski <jno@linux.vnet.ibm.com>
Fri, 29 Aug 2014 09:01:36 +0000 (29 11:01 +0200)
committerChristian Borntraeger <borntraeger@de.ibm.com>
Mon, 1 Sep 2014 07:23:02 +0000 (1 09:23 +0200)
tree4bbca10d0e306d41bb576c8aa59062271c9d551a
parent159855f098489160df9cb13ce1667a4d6dd76895
pc-bios/s390-ccw: support all virtio block size

The block size value may be given "as is" OR as a base value and
a shift count (exponent). So, we have to use calculation to get
the proper number in the code.

The main expression reads as
        (blk_cfg.blk_size << blk_cfg.physical_block_exp)

E.g., various combinations between blk_size=1/physical_block_exp=12
and blk_size=4096/physical_block_exp=0 are valid for 4K blocks.

Signed-off-by: Eugene (jno) Dvurechenski <jno@linux.vnet.ibm.com>
Acked-by: Christian Borntraeger <borntraeger@de.ibm.com>
Reviewed-by: David Hildenbrand <dahi@linux.vnet.ibm.com>
Signed-off-by: Jens Freimann <jfrei@linux.vnet.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
pc-bios/s390-ccw/virtio.c