]> xenbits.xensource.com Git - people/andrewcoop/seabios.git/commit
blockcmd: start REPORT_LUNS with the smallest buffer
authorRoman Kagan <rkagan@virtuozzo.com>
Thu, 8 Jun 2017 09:58:07 +0000 (12:58 +0300)
committerKevin O'Connor <kevin@koconnor.net>
Mon, 12 Jun 2017 19:01:31 +0000 (15:01 -0400)
commit6345621ded7fe999084501ba9382913b079acc9c
tree5f1ffe7562c4e3958861578c5f4ab3a960f074c9
parentdee3c1535d5550fab914cd181cbb02741d749e2a
blockcmd: start REPORT_LUNS with the smallest buffer

A number of emulated SCSI devices in QEMU incorrectly return an error
to REPORT_LUNS command when the size of the data returned is smaller
than the allocation length passed in.

To work it around, start with the smallest allocation length possible:
for 1 entry.  This is a slight pessimization because it would require
another REPORT_LUNS iteration if the target has more than a single LUN,
but this appears to have negligible impact on boot times, and makes
REPORT_LUNS enumeration work for more QEMU devices (lsi53c895a,
mptsas1068).

Reported-by: Maciej Józefczyk <maciej.jozefczyk@corp.ovh.com>
Signed-off-by: Roman Kagan <rkagan@virtuozzo.com>
src/hw/blockcmd.c