]> xenbits.xensource.com Git - seabios.git/commit
mpt-scsi: try to enumerate luns with REPORT LUNS
authorRoman Kagan <rkagan@virtuozzo.com>
Wed, 26 Apr 2017 14:18:07 +0000 (17:18 +0300)
committerKevin O'Connor <kevin@koconnor.net>
Tue, 2 May 2017 23:57:04 +0000 (19:57 -0400)
commitcf480dd3edd851db8ad62342937e25c064960b31
treefe359656716dc20e9d4c0531204b7f563a14b4ae
parent0a6e0a8ddd3b3654e772268050be4fbee0d88a08
mpt-scsi: try to enumerate luns with REPORT LUNS

Enumerate active luns with REPORT LUNS and, if that fails[*], fall back
to sequentially enumerating them up to (arbitrarily chosen) #8.

Note that this patch also makes mpt_scsi_cmd accept luns other than 0;
I've no idea what was the original motivation not to, and what can break
due to this change (nothing broke in my basic tests with QEMU).

[*] in current QEMU, REPORT LUNS does fail in mptsas1068 because the
returned data is smaller than the allocation length which is (wrongly)
considered an underflow.

Signed-off-by: Roman Kagan <rkagan@virtuozzo.com>
src/hw/mpt-scsi.c