[SeaBIOS] [PATCH v2 0/9] add support for generic lun enumeration
Roman Kagan
rkagan at virtuozzo.com
Wed Apr 26 16:18:00 CEST 2017
A number of SCSI drivers currently only see luns #0 in their targets.
This may be a problem when drives have to be assigned bigger lun
numbers, e.g. because the storage controllers don't provide enough
target numbers to accomodate all drives.
(In particular, I'm about to submit a driver for Hyper-V VMBus SCSI
controller which is limited to 2 targets only).
This series adds generic SCSI lun enumeration (either via REPORT LUNS
command or sequentially trying every lun), and makes the respective
drivers use it.
Note that the series has only been minimally tested against a recent QEMU.
Roman Kagan (9):
blockcmd: accept only disks and CD-ROMs
blockcmd: generic SCSI luns enumeration
virtio-scsi: enumerate luns with REPORT LUNS
esp-scsi: enumerate luns with REPORT LUNS
usb-uas: enumerate luns with REPORT LUNS
pvscsi: fix the comment about lun enumeration
mpt-scsi: try to enumerate luns with REPORT LUNS
lsi-scsi: reset in case of a serious problem
lsi-scsi: try to enumerate luns with REPORT LUNS
Signed-off-by: Roman Kagan <rkagan at virtuozzo.com>
---
v1 -> v2:
- use malloc_tmp instead of malloc_high
- format the retry logic as a regular while{} loop
- I left the interface as in v1 as the alternatives looked heavier
- patches 1,3-9 are unchanged
src/hw/blockcmd.h | 4 +++
src/hw/blockcmd.c | 97 ++++++++++++++++++++++++++++++++++++++++++++++++++++
src/hw/esp-scsi.c | 35 +++++++++++++------
src/hw/lsi-scsi.c | 39 +++++++++++++++------
src/hw/mpt-scsi.c | 40 ++++++++++++++--------
src/hw/pvscsi.c | 2 +-
src/hw/usb-uas.c | 45 +++++++++++++++---------
src/hw/virtio-scsi.c | 38 +++++++++++++-------
8 files changed, 236 insertions(+), 64 deletions(-)
--
2.9.3
More information about the SeaBIOS
mailing list