On Wed, Mar 01, 2017 at 01:45:33PM +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. Let me make sure I understand this series. Some scsi controllers have hardware specific mechanisms for finding the number of luns (usb-msc, megasas, pvscsi) and some controllers use a generic REPORT LUNS mechanism (virtio-scsi, esp-scsi, usb-uas, mpt-scsi, lsi-scsi). The basic difficulty with implementing REPORT LUNS in seabios is that the code needs a "struct drive_s" to issue the REPORT LUNS command, but since the drive parameters (or even the number of drives) aren't known, a dummy "lun0" drive_s must be created just for REPORT LUNS. Thus the series breaks the driver xxx_add_lun() functions into xxx_init_lun() and xxx_add_lun() so that a dummy lun0 can be created. An additional complexity is that the REPORT LUNS mechanism is broken in current QEMU on lsi-scsi and mpt-scsi. Your goal is to add support for "Hyper-V VMBus SCSI" which also requires REPORT LUNS. Is the above correct? -Kevin _______________________________________________ SeaBIOS mailing list [email protected] https://www.coreboot.org/mailman/listinfo/seabios
