From 9caa19be0e534c687081fbdfcd301406e728c98c Mon Sep 17 00:00:00 2001 From: Sam Eiderman Date: Wed, 12 Jun 2019 12:37:04 +0300 Subject: geometry: Apply LCHS values for boot devices Boot devices which use overriden LCHS values are: * ata * ahci * scsi * esp * lsi * megasas * mpt * pvscsi * virtio * virtio-blk We use these values in get_translation() and setup_translation() by introducing a new translation type: "TRANSLATION_MACHINE". We treat this translation as TRANSLATION_NONE in fill_ata_edd(), although this does not really matter since now the translation between physical and logical geometry does not exist. Reviewed-by: Karl Heubaum Reviewed-by: Arbel Moshe Signed-off-by: Sam Eiderman Message-Id: <20190612093704.47175-6-shmuel.eiderman@oracle.com> Signed-off-by: Gerd Hoffmann --- src/hw/esp-scsi.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/hw/esp-scsi.c') diff --git a/src/hw/esp-scsi.c b/src/hw/esp-scsi.c index ffd86d0..cc25f22 100644 --- a/src/hw/esp-scsi.c +++ b/src/hw/esp-scsi.c @@ -181,6 +181,8 @@ esp_scsi_add_lun(u32 lun, struct drive_s *tmpl_drv) char *name = znprintf(MAXDESCSIZE, "esp %pP %d:%d", llun->pci, llun->target, llun->lun); + boot_lchs_find_scsi_device(llun->pci, llun->target, llun->lun, + &(llun->drive.lchs)); int prio = bootprio_find_scsi_device(llun->pci, llun->target, llun->lun); int ret = scsi_drive_setup(&llun->drive, name, prio); free(name); -- cgit v1.1