[SeaBIOS] [PATCH v3 3/3] esp-scsi: handle non-DMA SCSI commands with no data phase

2023-08-07 Thread Mark Cave-Ayland
-scsi state machine so that in the case where there is no data phase, we immediately execute CMD_ICCS instead of waiting for STAT_TC to be set which will never happen with a non-DMA CMD_SELATN command. Signed-off-by: Mark Cave-Ayland --- src/hw/esp-scsi.c | 11 ++- 1 file changed, 10

[SeaBIOS] [PATCH v3 2/3] esp-scsi: check for INTR_BS/INTR_FC instead of STAT_TC for command completion

2023-08-07 Thread Mark Cave-Ayland
bits have already been set by a previous ESP command. [1] "NCR 53C94, 53C95, 53C96 Advanced SCSI Controller" NCR_53C94_53C95_53C96_Data_Sheet_Feb90.pdf Signed-off-by: Mark Cave-Ayland Reviewed-by: Paolo Bonzini --- src/hw/esp-scsi.c | 36 ++-- 1 file c

[SeaBIOS] [PATCH v3 1/3] esp-scsi: flush FIFO before sending SCSI command

2023-08-07 Thread Mark Cave-Ayland
The ESP FIFO is used as a buffer for DMA requests and so isn't guaranteed to be empty in the case of SCSI errors or a mixed DMA/non-DMA request. Flush the FIFO before sending a SCSI command to guarantee that it is correctly positioned at the start of the FIFO. Signed-off-by: Mark Cave-Ayland

[SeaBIOS] [PATCH v3 0/3] esp-scsi: fix reliance on QEMU ESP SCSI implementation bugs

2023-08-07 Thread Mark Cave-Ayland
ESP SCSI emulation. Signed-off-by: Mark Cave-Ayland v3: - Add R-B tags for patches 1 and 2 from Paolo - Add patch 3 to handle another bug to be fixed in QEMU's ESP emulation v2: - Fix typo in patch 2 commit message - Add reference to datasheet in patch 2 commit message as requested by Paul Mark

[SeaBIOS] Re: [PATCH v2 0/2] esp-scsi: fix reliance on QEMU ESP SCSI implementation bugs

2023-08-07 Thread Mark Cave-Ayland
On 02/08/2023 10:48, Mark Cave-Ayland wrote: Whilst trying to improve QEMU's ESP SCSI implementation with regard to the NCR datasheet, I noticed that SeaBIOS would fail to boot one of my Debian test images with my patches applied. Further investigation revealed that the SeaBIOS esp-scsi driver

[SeaBIOS] [PATCH v2 2/2] esp-scsi: check for INTR_BS/INTR_FC instead of STAT_TC for command completion

2023-08-02 Thread Mark Cave-Ayland
bits have already been set by a previous ESP command. [1] "NCR 53C94, 53C95, 53C96 Advanced SCSI Controller" NCR_53C94_53C95_53C96_Data_Sheet_Feb90.pdf Signed-off-by: Mark Cave-Ayland --- src/hw/esp-scsi.c | 36 ++-- 1 file changed, 22 insertions(+), 14

[SeaBIOS] [PATCH v2 1/2] esp-scsi: flush FIFO before sending SCSI command

2023-08-02 Thread Mark Cave-Ayland
The ESP FIFO is used as a buffer for DMA requests and so isn't guaranteed to be empty in the case of SCSI errors or a mixed DMA/non-DMA request. Flush the FIFO before sending a SCSI command to guarantee that it is correctly positioned at the start of the FIFO. Signed-off-by: Mark Cave-Ayland

[SeaBIOS] [PATCH v2 0/2] esp-scsi: fix reliance on QEMU ESP SCSI implementation bugs

2023-08-02 Thread Mark Cave-Ayland
ESP SCSI emulation. Signed-off-by: Mark Cave-Ayland v2: - Fix typo in patch 2 commit message - Add reference to datasheet in patch 2 commit message as requested by Paul Mark Cave-Ayland (2): esp-scsi: flush FIFO before sending SCSI command esp-scsi: check for INTR_BS/INTR_FC instead

[SeaBIOS] Re: [PATCH 2/2] esp-scsi: check for INTR_BS/INTR_FC instead of STAT_TC for command completion

2023-08-02 Thread Mark Cave-Ayland
On 01/08/2023 03:07, Paul Menzel wrote: Dear Mark, Am 30.07.23 um 10:56 schrieb Mark Cave-Ayland: On 30/07/2023 08:47, Paul Menzel wrote: [Cc: +Paolo as original author of the driver] […] Am 29.07.23 um 15:04 schrieb Mark Cave-Ayland: The ESP SELATN command used to send SCSI commands

[SeaBIOS] Re: [PATCH 2/2] esp-scsi: check for INTR_BS/INTR_FC instead of STAT_TC for command completion

2023-07-30 Thread Mark Cave-Ayland
On 30/07/2023 08:47, Paul Menzel wrote: [Cc: +Paolo as original author of the driver] Dear Mark, Thank you for your patch. Am 29.07.23 um 15:04 schrieb Mark Cave-Ayland: The ESP SELATN command used to send SCSI commands from the ESP to thes SCSI bus s/thes/the/ Ooops indeed, just

[SeaBIOS] [PATCH 2/2] esp-scsi: check for INTR_BS/INTR_FC instead of STAT_TC for command completion

2023-07-29 Thread Mark Cave-Ayland
have already been set by a previous ESP command. Signed-off-by: Mark Cave-Ayland --- src/hw/esp-scsi.c | 36 ++-- 1 file changed, 22 insertions(+), 14 deletions(-) diff --git a/src/hw/esp-scsi.c b/src/hw/esp-scsi.c index e4815aa..2d2d915 100644 --- a/src/hw/esp

[SeaBIOS] [PATCH 1/2] esp-scsi: flush FIFO before sending SCSI command

2023-07-29 Thread Mark Cave-Ayland
The ESP FIFO is used as a buffer for DMA requests and so isn't guaranteed to be empty in the case of SCSI errors or a mixed DMA/non-DMA request. Flush the FIFO before sending a SCSI command to guarantee that it is correctly positioned at the start of the FIFO. Signed-off-by: Mark Cave-Ayland

[SeaBIOS] [PATCH 0/2] esp-scsi: fix reliance on QEMU ESP SCSI implementation bugs

2023-07-29 Thread Mark Cave-Ayland
ESP SCSI emulation. Signed-off-by: Mark Cave-Ayland Mark Cave-Ayland (2): esp-scsi: flush FIFO before sending SCSI command esp-scsi: check for INTR_BS/INTR_FC instead of STAT_TC for command completion src/hw/esp-scsi.c | 38 +- 1 file changed, 25