[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 40/42] esp: add trivial implementation of the ESP_RFLAGS regis
From: |
Mark Cave-Ayland |
Subject: |
[PATCH v2 40/42] esp: add trivial implementation of the ESP_RFLAGS register |
Date: |
Tue, 9 Feb 2021 19:30:16 +0000 |
The bottom 5 bits contain the number of bytes remaining in the FIFO which is
trivial to implement with Fifo8 (the remaining bits are unimplemented and left
as 0 for now).
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
---
hw/scsi/esp.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/hw/scsi/esp.c b/hw/scsi/esp.c
index 9dd9947307..1f01f2314b 100644
--- a/hw/scsi/esp.c
+++ b/hw/scsi/esp.c
@@ -825,6 +825,10 @@ uint64_t esp_reg_read(ESPState *s, uint32_t saddr)
val = s->rregs[saddr];
}
break;
+ case ESP_RFLAGS:
+ /* Bottom 5 bits indicate number of bytes in FIFO */
+ val = fifo8_num_used(&s->fifo);
+ break;
default:
val = s->rregs[saddr];
break;
--
2.20.1
- [PATCH v2 33/42] esp: defer command completion interrupt on incoming data transfers, (continued)
- [PATCH v2 33/42] esp: defer command completion interrupt on incoming data transfers, Mark Cave-Ayland, 2021/02/09
- [PATCH v2 35/42] esp: raise interrupt after every non-DMA byte transferred to the FIFO, Mark Cave-Ayland, 2021/02/09
- [PATCH v2 37/42] esp: transition to message out phase after SATN and stop command, Mark Cave-Ayland, 2021/02/09
- [PATCH v2 36/42] esp: add maxlen parameter to get_cmd(), Mark Cave-Ayland, 2021/02/09
- [PATCH v2 38/42] esp: convert ti_buf from array to Fifo8, Mark Cave-Ayland, 2021/02/09
- [PATCH v2 39/42] esp: convert cmdbuf from array to Fifo8, Mark Cave-Ayland, 2021/02/09
- [PATCH v2 40/42] esp: add trivial implementation of the ESP_RFLAGS register,
Mark Cave-Ayland <=
- [PATCH v2 41/42] esp: implement non-DMA transfers in PDMA mode, Mark Cave-Ayland, 2021/02/09
- [PATCH v2 42/42] esp: add support for unaligned accesses, Mark Cave-Ayland, 2021/02/09
- Re: [PATCH v2 00/42] esp: consolidate PDMA transfer buffers and other fixes, Philippe Mathieu-Daudé, 2021/02/23