vio-vscsi: added a proper lun parser

SCSI specification allows LUN to be specified in different formats,
the first 2 bits in 8 bytes LUN define the exact format. At the moment
QEMU uses only 2 formats: 00b for LUN<255 and 01b for bigger LUNs, both
are 2 bytes long and big endian.

However the existing SLOF code treats LUN as a 8 bytes big endian value
what is incorrect. The patch fixes this by adding a function which
parses LUN and returns an error if the format is not supported.

Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
1 file changed