[SeaBIOS] [PATCH v2 0/9] add support for generic lun enumeration

Roman Kagan posted 9 patches 6 years, 12 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/seabios tags/patchew/20170426141809.12661-1-rkagan@virtuozzo.com
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(-)
[SeaBIOS] [PATCH v2 0/9] add support for generic lun enumeration
Posted by Roman Kagan 6 years, 12 months ago
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@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


_______________________________________________
SeaBIOS mailing list
SeaBIOS@seabios.org
https://mail.coreboot.org/mailman/listinfo/seabios
Re: [SeaBIOS] [PATCH v2 0/9] add support for generic lun enumeration
Posted by Kevin O'Connor 6 years, 11 months ago
On Wed, Apr 26, 2017 at 05:18:00PM +0300, Roman Kagan wrote:
> 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.

Thanks.  I committed this series.

-Kevin

_______________________________________________
SeaBIOS mailing list
SeaBIOS@seabios.org
https://mail.coreboot.org/mailman/listinfo/seabios