#
6d97f5ac |
| 12-Jan-2024 |
Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> |
esp.c: remove do_cmd from ESPState
Now that the accumulation of the CDB is handled by SCSI phase, there is no need for a separate variable to control it.
Signed-off-by: Mark Cave-Ayland <mark.cave-
esp.c: remove do_cmd from ESPState
Now that the accumulation of the CDB is handled by SCSI phase, there is no need for a separate variable to control it.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Tested-by: Helge Deller <deller@gmx.de> Tested-by: Thomas Huth <thuth@redhat.com> Message-Id: <20240112125420.514425-46-mark.cave-ayland@ilande.co.uk> Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
show more ...
|
#
df91fd4e |
| 12-Jan-2024 |
Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> |
esp.c: convert esp_reg_write() do_cmd path to check for SCSI phase instead
Currently do_cmd is used to determine whether MESSAGE OUT and COMMAND phase data is being accumulated in cmdfifo. Update es
esp.c: convert esp_reg_write() do_cmd path to check for SCSI phase instead
Currently do_cmd is used to determine whether MESSAGE OUT and COMMAND phase data is being accumulated in cmdfifo. Update esp_do_dma() to check directly for these two SCSI phases instead.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Tested-by: Helge Deller <deller@gmx.de> Tested-by: Thomas Huth <thuth@redhat.com> Message-Id: <20240112125420.514425-45-mark.cave-ayland@ilande.co.uk> Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
show more ...
|
#
83e803de |
| 12-Jan-2024 |
Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> |
esp.c: convert esp_do_nodma() do_cmd path to check for SCSI phase instead
Currently do_cmd is used to determine whether MESSAGE OUT and COMMAND phase data is being accumulated in cmdfifo. Update esp
esp.c: convert esp_do_nodma() do_cmd path to check for SCSI phase instead
Currently do_cmd is used to determine whether MESSAGE OUT and COMMAND phase data is being accumulated in cmdfifo. Update esp_do_dma() to check directly for these two SCSI phases instead.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Tested-by: Helge Deller <deller@gmx.de> Tested-by: Thomas Huth <thuth@redhat.com> Message-Id: <20240112125420.514425-44-mark.cave-ayland@ilande.co.uk> Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
show more ...
|
#
e8c84b19 |
| 12-Jan-2024 |
Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> |
esp.c: convert do_dma_pdma_cb() do_cmd path to check for SCSI phase instead
Currently do_cmd is used to determine whether MESSAGE OUT and COMMAND phase data is being accumulated in cmdfifo. Update e
esp.c: convert do_dma_pdma_cb() do_cmd path to check for SCSI phase instead
Currently do_cmd is used to determine whether MESSAGE OUT and COMMAND phase data is being accumulated in cmdfifo. Update esp_do_dma() to check directly for these two SCSI phases instead.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Tested-by: Helge Deller <deller@gmx.de> Tested-by: Thomas Huth <thuth@redhat.com> Message-Id: <20240112125420.514425-43-mark.cave-ayland@ilande.co.uk> Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
show more ...
|
#
ad2725af |
| 12-Jan-2024 |
Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> |
esp.c: convert esp_do_dma() do_cmd path to check for SCSI phase instead
Currently do_cmd is used to determine whether MESSAGE OUT and COMMAND phase data is being accumulated in cmdfifo. Update esp_d
esp.c: convert esp_do_dma() do_cmd path to check for SCSI phase instead
Currently do_cmd is used to determine whether MESSAGE OUT and COMMAND phase data is being accumulated in cmdfifo. Update esp_do_dma() to check directly for these two SCSI phases instead.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Tested-by: Helge Deller <deller@gmx.de> Tested-by: Thomas Huth <thuth@redhat.com> Message-Id: <20240112125420.514425-42-mark.cave-ayland@ilande.co.uk> Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
show more ...
|
#
9d1aa52b |
| 12-Jan-2024 |
Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> |
esp.c: convert esp_do_nodma() to switch statement based upon SCSI phase
Currently only the DATA IN and DATA OUT phases are supported.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
esp.c: convert esp_do_nodma() to switch statement based upon SCSI phase
Currently only the DATA IN and DATA OUT phases are supported.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Tested-by: Helge Deller <deller@gmx.de> Tested-by: Thomas Huth <thuth@redhat.com> Message-Id: <20240112125420.514425-41-mark.cave-ayland@ilande.co.uk> Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
show more ...
|
#
844b3a84 |
| 12-Jan-2024 |
Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> |
esp.c: convert do_dma_pdma_db() to switch statement based upon SCSI phase
Currently only the DATA IN and DATA OUT phases are supported.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.u
esp.c: convert do_dma_pdma_db() to switch statement based upon SCSI phase
Currently only the DATA IN and DATA OUT phases are supported.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Tested-by: Helge Deller <deller@gmx.de> Tested-by: Thomas Huth <thuth@redhat.com> Message-Id: <20240112125420.514425-40-mark.cave-ayland@ilande.co.uk> Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
show more ...
|
#
1454dc76 |
| 12-Jan-2024 |
Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> |
esp.c: convert esp_do_dma() to switch statement based upon SCSI phase
Currently only the DATA IN and DATA OUT phases are supported.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> T
esp.c: convert esp_do_dma() to switch statement based upon SCSI phase
Currently only the DATA IN and DATA OUT phases are supported.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Tested-by: Helge Deller <deller@gmx.de> Tested-by: Thomas Huth <thuth@redhat.com> Message-Id: <20240112125420.514425-39-mark.cave-ayland@ilande.co.uk> Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
show more ...
|
#
5a83e83e |
| 12-Jan-2024 |
Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> |
esp.c: introduce esp_get_phase() function
Make use of this new function in all places where the SCSI phase bits are manually masked from the ESP_RSTAT register.
Signed-off-by: Mark Cave-Ayland <mar
esp.c: introduce esp_get_phase() function
Make use of this new function in all places where the SCSI phase bits are manually masked from the ESP_RSTAT register.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Tested-by: Helge Deller <deller@gmx.de> Tested-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-Id: <20240112125420.514425-38-mark.cave-ayland@ilande.co.uk> Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
show more ...
|
#
66fd5657 |
| 12-Jan-2024 |
Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> |
esp.c: remove s_without_satn_pdma_cb() PDMA callback
This can now be handled by the existing do_dma_pdma_cb() function.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Tested-by: He
esp.c: remove s_without_satn_pdma_cb() PDMA callback
This can now be handled by the existing do_dma_pdma_cb() function.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Tested-by: Helge Deller <deller@gmx.de> Tested-by: Thomas Huth <thuth@redhat.com> Message-Id: <20240112125420.514425-37-mark.cave-ayland@ilande.co.uk> Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
show more ...
|
#
1b2e34ca |
| 12-Jan-2024 |
Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> |
esp.c: move end of SCSI transfer check after TC adjustment in do_dma_pdma_cb()
Now it is possible to move the end of SCSI transfer check to after the TC adjustment in do_dma_pdma_cb() when transferr
esp.c: move end of SCSI transfer check after TC adjustment in do_dma_pdma_cb()
Now it is possible to move the end of SCSI transfer check to after the TC adjustment in do_dma_pdma_cb() when transferring data from the device without triggering an assert() in the SCSI code. This brings this check in line with all the others in esp_do_dma() and do_dma_pdma_cb().
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Tested-by: Helge Deller <deller@gmx.de> Tested-by: Thomas Huth <thuth@redhat.com> Message-Id: <20240112125420.514425-36-mark.cave-ayland@ilande.co.uk> Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
show more ...
|
#
4460b86a |
| 12-Jan-2024 |
Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> |
esp.c: update esp_do_dma() bypass if async_len is zero to include non-zero transfer check
In the PDMA case the last transfer from the device to the FIFO has occurred (async_len is zero) but esp_do_d
esp.c: update esp_do_dma() bypass if async_len is zero to include non-zero transfer check
In the PDMA case the last transfer from the device to the FIFO has occurred (async_len is zero) but esp_do_dma() is still being called to drain the remaining FIFO contents.
The additional non-zero transfer check ensures that we still defer the SCSI layer in the case where we are waiting for data for a TI command or a DMA enable signal.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Tested-by: Helge Deller <deller@gmx.de> Tested-by: Thomas Huth <thuth@redhat.com> Message-Id: <20240112125420.514425-35-mark.cave-ayland@ilande.co.uk> Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
show more ...
|
#
3c7f3c8b |
| 12-Jan-2024 |
Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> |
esp.c: copy logic for do_cmd transfers from do_dma_pdma_cb() to esp_do_dma()
This is so that PDMA transfers can be performend by esp_do_dma() as well as do_dma_pdma_cb().
Signed-off-by: Mark Cave-A
esp.c: copy logic for do_cmd transfers from do_dma_pdma_cb() to esp_do_dma()
This is so that PDMA transfers can be performend by esp_do_dma() as well as do_dma_pdma_cb().
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Tested-by: Helge Deller <deller@gmx.de> Tested-by: Thomas Huth <thuth@redhat.com> Message-Id: <20240112125420.514425-34-mark.cave-ayland@ilande.co.uk> Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
show more ...
|
#
19e9afb1 |
| 12-Jan-2024 |
Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> |
esp.c: copy PDMA logic for transfers to device from do_dma_pdma_cb() to esp_do_dma()
This is so that PDMA transfers can be performend by esp_do_dma() as well as do_dma_pdma_cb().
Signed-off-by: Mar
esp.c: copy PDMA logic for transfers to device from do_dma_pdma_cb() to esp_do_dma()
This is so that PDMA transfers can be performend by esp_do_dma() as well as do_dma_pdma_cb().
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Tested-by: Helge Deller <deller@gmx.de> Tested-by: Thomas Huth <thuth@redhat.com> Message-Id: <20240112125420.514425-33-mark.cave-ayland@ilande.co.uk> Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
show more ...
|
#
004826d0 |
| 12-Jan-2024 |
Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> |
esp.c: rename esp_dma_done() to esp_dma_ti_check()
This is because a single DMA request can be transferred using multiple TI commands, and so a TC equal to zero may not represent the completion of t
esp.c: rename esp_dma_done() to esp_dma_ti_check()
This is because a single DMA request can be transferred using multiple TI commands, and so a TC equal to zero may not represent the completion of the SCSI DMA command.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Tested-by: Helge Deller <deller@gmx.de> Tested-by: Thomas Huth <thuth@redhat.com> Message-Id: <20240112125420.514425-32-mark.cave-ayland@ilande.co.uk> Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
show more ...
|
#
af74b3c1 |
| 12-Jan-2024 |
Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> |
esp.c: move TC and FIFO check logic into esp_dma_done()
This helps simplify the existing implementation.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Tested-by: Helge Deller <del
esp.c: move TC and FIFO check logic into esp_dma_done()
This helps simplify the existing implementation.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Tested-by: Helge Deller <deller@gmx.de> Tested-by: Thomas Huth <thuth@redhat.com> Message-Id: <20240112125420.514425-31-mark.cave-ayland@ilande.co.uk> Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
show more ...
|
#
cb988199 |
| 12-Jan-2024 |
Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> |
esp.c: fix premature end of phase logic esp_command_complete
There are two cases here: the first is when the TI command underflows, in which case we raise INTR_BS to indicate an early change of phas
esp.c: fix premature end of phase logic esp_command_complete
There are two cases here: the first is when the TI command underflows, in which case we raise INTR_BS to indicate an early change of phase, and the second is when the TI command overflows because the host requested a transfer for more data than is available. In the latter case force TC to zero so that the TI completion logic executes correctly.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Tested-by: Helge Deller <deller@gmx.de> Tested-by: Thomas Huth <thuth@redhat.com> Message-Id: <20240112125420.514425-30-mark.cave-ayland@ilande.co.uk> Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
show more ...
|
#
e4e166c8 |
| 12-Jan-2024 |
Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> |
esp.c: consolidate async_len and TC == 0 checks in do_dma_pdma_cb() and esp_do_dma()
Ensure that the async_len checks for requesting data from the SCSI layer and the TC == 0 checks to detect the end
esp.c: consolidate async_len and TC == 0 checks in do_dma_pdma_cb() and esp_do_dma()
Ensure that the async_len checks for requesting data from the SCSI layer and the TC == 0 checks to detect the end of the DMA transfer are consistent in both do_dma_pdma_cb() and esp_do_dma(). In particular this involves adding the check to see if the FIFO is at its low threshold since PDMA and mixed DMA and non-DMA requests can leave data remaining in the FIFO.
At the same time update all the comments so that they are also consistent between all similar code paths.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Tested-by: Helge Deller <deller@gmx.de> Tested-by: Thomas Huth <thuth@redhat.com> Message-Id: <20240112125420.514425-29-mark.cave-ayland@ilande.co.uk> Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
show more ...
|
#
a79e767a |
| 12-Jan-2024 |
Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> |
esp.c: update end of transfer logic at the end of esp_transfer_data()
Since esp_dma_done() is called in both cases, and ti_size cannot be zero (otherwise esp_command_complete() would have been calle
esp.c: update end of transfer logic at the end of esp_transfer_data()
Since esp_dma_done() is called in both cases, and ti_size cannot be zero (otherwise esp_command_complete() would have been called instead), replace the conditional logic with a single call to esp_dma_done().
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Tested-by: Helge Deller <deller@gmx.de> Tested-by: Thomas Huth <thuth@redhat.com> Message-Id: <20240112125420.514425-28-mark.cave-ayland@ilande.co.uk> Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
show more ...
|
#
fe082b54 |
| 12-Jan-2024 |
Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> |
esp.c: remove unneeded if() check in esp_transfer_data()
The following ti_cmd checks ensure that only DMA and non-DMA TI commmands will can call into the esp_do_dma() and esp_do_nodma() callbacks.
esp.c: remove unneeded if() check in esp_transfer_data()
The following ti_cmd checks ensure that only DMA and non-DMA TI commmands will can call into the esp_do_dma() and esp_do_nodma() callbacks.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Tested-by: Helge Deller <deller@gmx.de> Tested-by: Thomas Huth <thuth@redhat.com> Message-Id: <20240112125420.514425-27-mark.cave-ayland@ilande.co.uk> Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
show more ...
|
#
81ed2ed3 |
| 12-Jan-2024 |
Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> |
esp.c: remove unaligned adjustment in do_dma_pdma_cb() to device path
With the latest changes this condition cannot occur anymore and so the logic can be completely removed.
Signed-off-by: Mark Cav
esp.c: remove unaligned adjustment in do_dma_pdma_cb() to device path
With the latest changes this condition cannot occur anymore and so the logic can be completely removed.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Tested-by: Helge Deller <deller@gmx.de> Tested-by: Thomas Huth <thuth@redhat.com> Message-Id: <20240112125420.514425-26-mark.cave-ayland@ilande.co.uk> Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
show more ...
|
#
12486e4f |
| 12-Jan-2024 |
Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> |
esp.c: remove TC adjustment in esp_do_dma() from device path
Now that the TC is updated for each PDMA access (rather than once the FIFO is full) there is no need to adjust the TC at start of each DM
esp.c: remove TC adjustment in esp_do_dma() from device path
Now that the TC is updated for each PDMA access (rather than once the FIFO is full) there is no need to adjust the TC at start of each DMA transfer if the FIFO is not empty.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Tested-by: Helge Deller <deller@gmx.de> Tested-by: Thomas Huth <thuth@redhat.com> Message-Id: <20240112125420.514425-25-mark.cave-ayland@ilande.co.uk> Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
show more ...
|
#
fabcba49 |
| 12-Jan-2024 |
Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> |
esp.c: don't immediately raise INTR_BS if SCSI data needed in esp_do_dma()
In the case when more data is requested from the SCSI layer during a DMA data transfer from a device, don't immediately fal
esp.c: don't immediately raise INTR_BS if SCSI data needed in esp_do_dma()
In the case when more data is requested from the SCSI layer during a DMA data transfer from a device, don't immediately fall through to the TC check logic. Otherwise when TC is zero INTR_BS will be raised immediately rather than when the next set of SCSI data is ready.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Tested-by: Helge Deller <deller@gmx.de> Tested-by: Thomas Huth <thuth@redhat.com> Message-Id: <20240112125420.514425-24-mark.cave-ayland@ilande.co.uk> Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
show more ...
|
#
68ef41fb |
| 12-Jan-2024 |
Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> |
esp.c: ensure that the PDMA callback is called for every device read
Rather than wait for the FIFO to fill up before calling the PDMA callback, push that logic directly into the from_device logic in
esp.c: ensure that the PDMA callback is called for every device read
Rather than wait for the FIFO to fill up before calling the PDMA callback, push that logic directly into the from_device logic in do_dma_pdma_cb().
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Tested-by: Helge Deller <deller@gmx.de> Tested-by: Thomas Huth <thuth@redhat.com> Message-Id: <20240112125420.514425-23-mark.cave-ayland@ilande.co.uk> Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
show more ...
|
#
c5bd5055 |
| 12-Jan-2024 |
Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> |
esp.c: update condition for esp_dma_done() in esp_do_dma() to device path
Ensure that esp_dma_done() is only called when TC is zero, which is currently always the case for DMA transfers.
Signed-off
esp.c: update condition for esp_dma_done() in esp_do_dma() to device path
Ensure that esp_dma_done() is only called when TC is zero, which is currently always the case for DMA transfers.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Tested-by: Helge Deller <deller@gmx.de> Tested-by: Thomas Huth <thuth@redhat.com> Message-Id: <20240112125420.514425-22-mark.cave-ayland@ilande.co.uk> Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
show more ...
|