[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 01/39] esp: Handle CMD_BUSRESET by resetting the SCSI bus
From: |
Paolo Bonzini |
Subject: |
[PULL 01/39] esp: Handle CMD_BUSRESET by resetting the SCSI bus |
Date: |
Thu, 1 Sep 2022 20:23:51 +0200 |
From: John Millikin <john@john-millikin.com>
Per investigation on the linked ticket, SunOS issues a SCSI bus reset
to the ESP as part of its boot sequence. If this ESP command doesn't
cause devices to assert sense flag UNIT ATTENTION, SunOS will consider
the CD-ROM device to be non-compliant with Common Command Set (CCS).
In this condition, the SunOS installer's early userspace doesn't set
the installation source location to sr0 and the miniroot copy fails.
Signed-off-by: John Millikin <john@john-millikin.com>
Suggested-by: Bill Paul <noisetube@gmail.com>
Buglink: https://gitlab.com/qemu-project/qemu/-/issues/1127
Message-Id: <20220817053846.699310-1-john@john-millikin.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
hw/scsi/esp.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/hw/scsi/esp.c b/hw/scsi/esp.c
index 2d3c649567..c799c19bd4 100644
--- a/hw/scsi/esp.c
+++ b/hw/scsi/esp.c
@@ -939,6 +939,11 @@ static void esp_soft_reset(ESPState *s)
esp_hard_reset(s);
}
+static void esp_bus_reset(ESPState *s)
+{
+ qbus_reset_all(BUS(&s->bus));
+}
+
static void parent_esp_reset(ESPState *s, int irq, int level)
{
if (level) {
@@ -1067,6 +1072,7 @@ void esp_reg_write(ESPState *s, uint32_t saddr, uint64_t
val)
break;
case CMD_BUSRESET:
trace_esp_mem_writeb_cmd_bus_reset(val);
+ esp_bus_reset(s);
if (!(s->wregs[ESP_CFG1] & CFG1_RESREPT)) {
s->rregs[ESP_RINTR] |= INTR_RST;
esp_raise_irq(s);
--
2.37.2
- [PULL 00/39] i386, SCSI, build system changes for 2022-09-01, Paolo Bonzini, 2022/09/01
- [PULL 01/39] esp: Handle CMD_BUSRESET by resetting the SCSI bus,
Paolo Bonzini <=
- [PULL 03/39] scsi: Reject commands if the CDB length exceeds buf_len, Paolo Bonzini, 2022/09/01
- [PULL 04/39] i386: reset KVM nested state upon CPU reset, Paolo Bonzini, 2022/09/01
- [PULL 02/39] scsi: Add buf_len parameter to scsi_req_new(), Paolo Bonzini, 2022/09/01
- [PULL 06/39] configure: improve error for ucontext coroutine backend, Paolo Bonzini, 2022/09/01
- [PULL 05/39] i386: do kvm_put_msr_feature_control() first thing when vCPU is reset, Paolo Bonzini, 2022/09/01
- [PULL 07/39] meson: be strict for boolean options, Paolo Bonzini, 2022/09/01
- [PULL 08/39] meson: remove dead code, Paolo Bonzini, 2022/09/01
- [PULL 11/39] tests/tcg: x86_64: improve consistency with i386, Paolo Bonzini, 2022/09/01
- [PULL 10/39] KVM: dirty ring: add missing memory barrier, Paolo Bonzini, 2022/09/01
- [PULL 09/39] meson: remove dead assignments, Paolo Bonzini, 2022/09/01