mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 09:43:56 -06:00
esp: Handle CMD_BUSRESET by resetting the SCSI bus
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>
This commit is contained in:
parent
e93ded1bf6
commit
c6e51f1bb2
1 changed files with 6 additions and 0 deletions
|
@ -939,6 +939,11 @@ static void esp_soft_reset(ESPState *s)
|
||||||
esp_hard_reset(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)
|
static void parent_esp_reset(ESPState *s, int irq, int level)
|
||||||
{
|
{
|
||||||
if (level) {
|
if (level) {
|
||||||
|
@ -1067,6 +1072,7 @@ void esp_reg_write(ESPState *s, uint32_t saddr, uint64_t val)
|
||||||
break;
|
break;
|
||||||
case CMD_BUSRESET:
|
case CMD_BUSRESET:
|
||||||
trace_esp_mem_writeb_cmd_bus_reset(val);
|
trace_esp_mem_writeb_cmd_bus_reset(val);
|
||||||
|
esp_bus_reset(s);
|
||||||
if (!(s->wregs[ESP_CFG1] & CFG1_RESREPT)) {
|
if (!(s->wregs[ESP_CFG1] & CFG1_RESREPT)) {
|
||||||
s->rregs[ESP_RINTR] |= INTR_RST;
|
s->rregs[ESP_RINTR] |= INTR_RST;
|
||||||
esp_raise_irq(s);
|
esp_raise_irq(s);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue