[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 01/88] esp: don't clear cmdfifo when esp_select() fails in get_cm
|
From: |
Mark Cave-Ayland |
|
Subject: |
[PATCH 01/88] esp: don't clear cmdfifo when esp_select() fails in get_cmd() |
|
Date: |
Fri, 12 Jan 2024 12:52:53 +0000 |
The FIFO contents should not be affected if the target selection fails.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
---
hw/scsi/esp.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/hw/scsi/esp.c b/hw/scsi/esp.c
index 3a1c9f7c3b..68d07edc05 100644
--- a/hw/scsi/esp.c
+++ b/hw/scsi/esp.c
@@ -252,11 +252,9 @@ static uint32_t get_cmd(ESPState *s, uint32_t maxlen)
fifo8_push_all(&s->cmdfifo, buf, dmalen);
} else {
if (esp_select(s) < 0) {
- fifo8_reset(&s->cmdfifo);
return -1;
}
esp_raise_drq(s);
- fifo8_reset(&s->cmdfifo);
return 0;
}
} else {
@@ -271,7 +269,6 @@ static uint32_t get_cmd(ESPState *s, uint32_t maxlen)
trace_esp_get_cmd(dmalen, target);
if (esp_select(s) < 0) {
- fifo8_reset(&s->cmdfifo);
return -1;
}
return dmalen;
--
2.39.2
- [PATCH 00/88] esp: rework ESP emulation to use a SCSI phase-based state machine, Mark Cave-Ayland, 2024/01/12
- [PATCH 02/88] esp: move existing request cancel check into esp_select(), Mark Cave-Ayland, 2024/01/12
- [PATCH 04/88] esp: remove FIFO clear from esp_select(), Mark Cave-Ayland, 2024/01/12
- [PATCH 06/88] esp: update esp_set_tc() to set STAT_TC flag, Mark Cave-Ayland, 2024/01/12
- [PATCH 05/88] esp: move esp_select() to ESP selection commands from get_cmd(), Mark Cave-Ayland, 2024/01/12
- [PATCH 01/88] esp: don't clear cmdfifo when esp_select() fails in get_cmd(),
Mark Cave-Ayland <=
- [PATCH 03/88] esp.c: add FIFO wraparound support to esp_fifo_pop_buf(), Mark Cave-Ayland, 2024/01/12
- [PATCH 07/88] esp: start removal of manual STAT_TC setting when transfer counter reaches zero, Mark Cave-Ayland, 2024/01/12
- [PATCH 08/88] esp: move command execution logic to new esp_run_cmd() function, Mark Cave-Ayland, 2024/01/12
- [PATCH 09/88] esp: update TC check logic in do_dma_pdma_cb() to check for TC == 0, Mark Cave-Ayland, 2024/01/12
- [PATCH 10/88] esp: move buffer and TC logic into separate to/from device paths in esp_do_dma(), Mark Cave-Ayland, 2024/01/12
- [PATCH 11/88] esp.c: remove unused case from esp_pdma_read(), Mark Cave-Ayland, 2024/01/12
- [PATCH 12/88] esp.c: don't accumulate directly into cmdfifo, Mark Cave-Ayland, 2024/01/12
- [PATCH 13/88] esp.c: decrement the TC during MESSAGE OUT and COMMAND phases, Mark Cave-Ayland, 2024/01/12
- [PATCH 14/88] esp.c: introduce esp_set_phase() helper function, Mark Cave-Ayland, 2024/01/12