qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [qemu/qemu] f3ace7: esp.c: don't clear cmdfifo when esp_s


From: Peter Maydell
Subject: [Qemu-commits] [qemu/qemu] f3ace7: esp.c: don't clear cmdfifo when esp_select() fails...
Date: Tue, 13 Feb 2024 11:46:47 -0800

  Branch: refs/heads/staging
  Home:   https://github.com/qemu/qemu
  Commit: f3ace75be8d472f6ffd40501147f08c9616faf1c
      
https://github.com/qemu/qemu/commit/f3ace75be8d472f6ffd40501147f08c9616faf1c
  Author: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
  Date:   2024-02-13 (Tue, 13 Feb 2024)

  Changed paths:
    M hw/scsi/esp.c

  Log Message:
  -----------
  esp.c: don't clear cmdfifo when esp_select() fails in get_cmd()

The FIFO contents should not be affected if the target selection fails.

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-2-mark.cave-ayland@ilande.co.uk>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>


  Commit: cf40a5e42084e157e1cd7bed2619f3b44fbb3fe8
      
https://github.com/qemu/qemu/commit/cf40a5e42084e157e1cd7bed2619f3b44fbb3fe8
  Author: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
  Date:   2024-02-13 (Tue, 13 Feb 2024)

  Changed paths:
    M hw/scsi/esp.c

  Log Message:
  -----------
  esp.c: move existing request cancel check into esp_select()

Since get_cmd() can be called multiple times during a mixed FIFO/DMA request,
move the existing request cancel check into esp_select() which always occurs
at the start of new SCSI request.

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-3-mark.cave-ayland@ilande.co.uk>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>


  Commit: 49c60d1617d4870a5e7c4f9c2dc24fb3759b9679
      
https://github.com/qemu/qemu/commit/49c60d1617d4870a5e7c4f9c2dc24fb3759b9679
  Author: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
  Date:   2024-02-13 (Tue, 13 Feb 2024)

  Changed paths:
    M hw/scsi/esp.c

  Log Message:
  -----------
  esp.c: add FIFO wraparound support to esp_fifo_pop_buf()

The fifo8_pop_buf() function returns a pointer to the FIFO buffer up to the
specified length. Since the FIFO buffer is modelled as an array then once
the FIFO wraps around, only the continuous portion of the buffer can be
returned.

In future the use of continuous and unaligned accesses will advance the
internal FIFO head pointer, so modify esp_fifo_pop_buf() to ensure that
any wraparound content is also returned up to the requested length.

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-4-mark.cave-ayland@ilande.co.uk>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>


  Commit: 6fcae98b2c3923888c238e1ba49b10f4f681ae32
      
https://github.com/qemu/qemu/commit/6fcae98b2c3923888c238e1ba49b10f4f681ae32
  Author: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
  Date:   2024-02-13 (Tue, 13 Feb 2024)

  Changed paths:
    M hw/scsi/esp.c

  Log Message:
  -----------
  esp.c: remove FIFO clear from esp_select()

The FIFO contents should not be affected by performing SCSI target selection.

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-5-mark.cave-ayland@ilande.co.uk>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>


  Commit: 1bcaf71b41120acce0803c06dd48750e54583ce2
      
https://github.com/qemu/qemu/commit/1bcaf71b41120acce0803c06dd48750e54583ce2
  Author: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
  Date:   2024-02-13 (Tue, 13 Feb 2024)

  Changed paths:
    M hw/scsi/esp.c

  Log Message:
  -----------
  esp.c: move esp_select() to ESP selection commands from get_cmd()

Since the DREQ value depends upon the result of the selection process, add a
workaround to each esp_select() to manually assert DREQ durring the MESSAGE OUT
and COMMAND phases.

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-6-mark.cave-ayland@ilande.co.uk>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>


  Commit: c5d7df28ea9f83b73608afb0ed6fb75773ebe7ca
      
https://github.com/qemu/qemu/commit/c5d7df28ea9f83b73608afb0ed6fb75773ebe7ca
  Author: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
  Date:   2024-02-13 (Tue, 13 Feb 2024)

  Changed paths:
    M hw/scsi/esp.c

  Log Message:
  -----------
  esp.c: update esp_set_tc() to set STAT_TC flag

This flag is set once the transfer counter counts down to zero.

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-7-mark.cave-ayland@ilande.co.uk>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>


  Commit: 0c5ae734c2942e1b71eaffab95ea9b7ce974d8db
      
https://github.com/qemu/qemu/commit/0c5ae734c2942e1b71eaffab95ea9b7ce974d8db
  Author: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
  Date:   2024-02-13 (Tue, 13 Feb 2024)

  Changed paths:
    M hw/scsi/esp.c

  Log Message:
  -----------
  esp.c: start removal of manual STAT_TC setting when transfer counter reaches 
zero

This should be exclusively managed by esp_set_tc() rather than being manually
set in multiple places. Start by removing the occurrences exclusive to PDMA
and command completion which are those that can be currently removed without
affecting any test images.

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-8-mark.cave-ayland@ilande.co.uk>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>


  Commit: f21fe39d9ccc4485f6bc12eaae8271282921d42c
      
https://github.com/qemu/qemu/commit/f21fe39d9ccc4485f6bc12eaae8271282921d42c
  Author: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
  Date:   2024-02-13 (Tue, 13 Feb 2024)

  Changed paths:
    M hw/scsi/esp.c

  Log Message:
  -----------
  esp.c: move command execution logic to new esp_run_cmd() function

This helps to simplify esp_reg_write() and potentially allows for a 2-level
deep FIFO to be implemented in future.

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-9-mark.cave-ayland@ilande.co.uk>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>


  Commit: 0f2eb11071bfc2fe40e2007c1934a2afdde61953
      
https://github.com/qemu/qemu/commit/0f2eb11071bfc2fe40e2007c1934a2afdde61953
  Author: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
  Date:   2024-02-13 (Tue, 13 Feb 2024)

  Changed paths:
    M hw/scsi/esp.c

  Log Message:
  -----------
  esp.c: update TC check logic in do_dma_pdma_cb() to check for TC == 0

Invert the logic so that the end of DMA transfer check becomes one that checks
for TC == 0 in the from device path 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-10-mark.cave-ayland@ilande.co.uk>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>


  Commit: f366622366807ce7e11cd74e501620840d8a3cda
      
https://github.com/qemu/qemu/commit/f366622366807ce7e11cd74e501620840d8a3cda
  Author: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
  Date:   2024-02-13 (Tue, 13 Feb 2024)

  Changed paths:
    M hw/scsi/esp.c

  Log Message:
  -----------
  esp.c: move buffer and TC logic into separate to/from device paths in 
esp_do_dma()

The ultimate aim is to for esp_do_dma() behaviour to be determined by the SCSI
bus phase, in which case it is necessary to have separate to/from device 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-11-mark.cave-ayland@ilande.co.uk>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>


  Commit: 5fd4de76048966bb3b6c768e6ca5008600ea07d4
      
https://github.com/qemu/qemu/commit/5fd4de76048966bb3b6c768e6ca5008600ea07d4
  Author: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
  Date:   2024-02-13 (Tue, 13 Feb 2024)

  Changed paths:
    M hw/scsi/esp.c

  Log Message:
  -----------
  esp.c: remove unused case from esp_pdma_read()

The do_cmd variable is only set for the MESSAGE OUT and COMMAND phases i.e.
those which involve transfers from the host to the SCSI bus, and so the unused
case can be 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-12-mark.cave-ayland@ilande.co.uk>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>


  Commit: 2572689bc83f683e59dce0591356718023386f43
      
https://github.com/qemu/qemu/commit/2572689bc83f683e59dce0591356718023386f43
  Author: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
  Date:   2024-02-13 (Tue, 13 Feb 2024)

  Changed paths:
    M hw/scsi/esp.c

  Log Message:
  -----------
  esp.c: don't accumulate directly into cmdfifo

Instead accumulate in the real FIFO as done in real hardware, and then transfer
to cmdfifo when we're ready to process the MESSAGE OUT and COMMAND phase data.

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-13-mark.cave-ayland@ilande.co.uk>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>


  Commit: a034765161b22fdd12d51ec7a30e65750e821107
      
https://github.com/qemu/qemu/commit/a034765161b22fdd12d51ec7a30e65750e821107
  Author: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
  Date:   2024-02-13 (Tue, 13 Feb 2024)

  Changed paths:
    M hw/scsi/esp.c

  Log Message:
  -----------
  esp.c: decrement the TC during MESSAGE OUT and COMMAND phases

This is to ensure that STAT_TC is triggered during the right parts of the
transfer when it is controlled exclusively by the TC.

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-14-mark.cave-ayland@ilande.co.uk>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>


  Commit: abc139cda0817ed4682b6d3eabef65094eb82600
      
https://github.com/qemu/qemu/commit/abc139cda0817ed4682b6d3eabef65094eb82600
  Author: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
  Date:   2024-02-13 (Tue, 13 Feb 2024)

  Changed paths:
    M hw/scsi/esp.c
    M hw/scsi/trace-events

  Log Message:
  -----------
  esp.c: introduce esp_set_phase() helper function

This function is used to set the current SCSI bus phase in the ESP_RSTAT 
register
without affecting any of flag bits.

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-15-mark.cave-ayland@ilande.co.uk>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>


  Commit: f0a24eeed9ec5712d047acf2fb2c52050842793e
      
https://github.com/qemu/qemu/commit/f0a24eeed9ec5712d047acf2fb2c52050842793e
  Author: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
  Date:   2024-02-13 (Tue, 13 Feb 2024)

  Changed paths:
    M hw/scsi/esp.c

  Log Message:
  -----------
  esp.c: remove another set of manual STAT_TC updates

Following on from the recent changes to when the TC is updated, it is now
possible to remove another set of manual STAT_TC updates so that its state
is now managed within esp_set_tc().

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-16-mark.cave-ayland@ilande.co.uk>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>


  Commit: a1ccceb9c4ae6c541cc8aff05218d4818e41c876
      
https://github.com/qemu/qemu/commit/a1ccceb9c4ae6c541cc8aff05218d4818e41c876
  Author: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
  Date:   2024-02-13 (Tue, 13 Feb 2024)

  Changed paths:
    M hw/scsi/esp.c

  Log Message:
  -----------
  esp.c: remove MacOS TI workaround that pads FIFO transfers to ESP_FIFO_SZ

This workaround is no longer required with the current code and so can be
removed.

[Note: whilst MacOS itself can boot correctly, removing this hack prevents
a bootable EMILE CDROM from working. This is caused by a separate bug which
will be fixed by a subsequent patch]

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-17-mark.cave-ayland@ilande.co.uk>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>


  Commit: e7a661d1170b7b684485b467d443566ee80376d0
      
https://github.com/qemu/qemu/commit/e7a661d1170b7b684485b467d443566ee80376d0
  Author: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
  Date:   2024-02-13 (Tue, 13 Feb 2024)

  Changed paths:
    M hw/scsi/esp.c

  Log Message:
  -----------
  esp.c: don't reset the TC and ESP_RSEQ state when executing a SCSI command

There is no need to manually reset these values as the ESP emulation now
correctly handles them within its existing logic.

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-18-mark.cave-ayland@ilande.co.uk>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>


  Commit: 942ee6c83fa73e3d6f4b75f382f73b42faaf0559
      
https://github.com/qemu/qemu/commit/942ee6c83fa73e3d6f4b75f382f73b42faaf0559
  Author: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
  Date:   2024-02-13 (Tue, 13 Feb 2024)

  Changed paths:
    M hw/scsi/esp.c

  Log Message:
  -----------
  esp.c: don't clear RFLAGS register when DMA is complete

The internal state of the ESP sequencer is not affected when raising an 
interrupt
to indicate the end of a DMA transfer.

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-19-mark.cave-ayland@ilande.co.uk>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>


  Commit: 27bd0cc044287acc838098155c057380c1f60a07
      
https://github.com/qemu/qemu/commit/27bd0cc044287acc838098155c057380c1f60a07
  Author: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
  Date:   2024-02-13 (Tue, 13 Feb 2024)

  Changed paths:
    M hw/scsi/esp.c

  Log Message:
  -----------
  esp.c: remove zero transfer size check from esp_do_dma()

The TI end of transfer interrupt only occurs when the TC reaches zero and is
not related to the SCSI layer transfer.

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-20-mark.cave-ayland@ilande.co.uk>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>


  Commit: 6b7b0030fb5c9275d5e4afa67264c6ce458afef3
      
https://github.com/qemu/qemu/commit/6b7b0030fb5c9275d5e4afa67264c6ce458afef3
  Author: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
  Date:   2024-02-13 (Tue, 13 Feb 2024)

  Changed paths:
    M hw/scsi/esp.c

  Log Message:
  -----------
  esp.c: update condition for esp_dma_done() in esp_do_dma() from device path

No change to the condition itself, other than to clarify that esp_dma_done()
must be called when TC is zero.

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-21-mark.cave-ayland@ilande.co.uk>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>


  Commit: c5bd505524303bd8cb9eaf5d44ca7e1713d27f90
      
https://github.com/qemu/qemu/commit/c5bd505524303bd8cb9eaf5d44ca7e1713d27f90
  Author: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
  Date:   2024-02-13 (Tue, 13 Feb 2024)

  Changed paths:
    M hw/scsi/esp.c

  Log Message:
  -----------
  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>


  Commit: 68ef41fb13ac8739cf689bbf731d4a435b3bdfe7
      
https://github.com/qemu/qemu/commit/68ef41fb13ac8739cf689bbf731d4a435b3bdfe7
  Author: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
  Date:   2024-02-13 (Tue, 13 Feb 2024)

  Changed paths:
    M hw/scsi/esp.c

  Log Message:
  -----------
  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>


  Commit: fabcba4966f604e4b7f2e6cd21a8bf6e82834c83
      
https://github.com/qemu/qemu/commit/fabcba4966f604e4b7f2e6cd21a8bf6e82834c83
  Author: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
  Date:   2024-02-13 (Tue, 13 Feb 2024)

  Changed paths:
    M hw/scsi/esp.c

  Log Message:
  -----------
  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>


  Commit: 12486e4f6d6deffdac9f968de1dd0c38ab8199de
      
https://github.com/qemu/qemu/commit/12486e4f6d6deffdac9f968de1dd0c38ab8199de
  Author: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
  Date:   2024-02-13 (Tue, 13 Feb 2024)

  Changed paths:
    M hw/scsi/esp.c

  Log Message:
  -----------
  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>


  Commit: 81ed2ed3e89a4919fb5946a0436973ba56095ae9
      
https://github.com/qemu/qemu/commit/81ed2ed3e89a4919fb5946a0436973ba56095ae9
  Author: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
  Date:   2024-02-13 (Tue, 13 Feb 2024)

  Changed paths:
    M hw/scsi/esp.c

  Log Message:
  -----------
  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>


  Commit: fe082b54751dd4404c17a676a7d2f8630c91067c
      
https://github.com/qemu/qemu/commit/fe082b54751dd4404c17a676a7d2f8630c91067c
  Author: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
  Date:   2024-02-13 (Tue, 13 Feb 2024)

  Changed paths:
    M hw/scsi/esp.c

  Log Message:
  -----------
  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>


  Commit: a79e767ab147164195b664f359ea6e54294b4698
      
https://github.com/qemu/qemu/commit/a79e767ab147164195b664f359ea6e54294b4698
  Author: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
  Date:   2024-02-13 (Tue, 13 Feb 2024)

  Changed paths:
    M hw/scsi/esp.c

  Log Message:
  -----------
  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>


  Commit: e4e166c8efc13ee8a81e07be2f81f6bc54339a7b
      
https://github.com/qemu/qemu/commit/e4e166c8efc13ee8a81e07be2f81f6bc54339a7b
  Author: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
  Date:   2024-02-13 (Tue, 13 Feb 2024)

  Changed paths:
    M hw/scsi/esp.c

  Log Message:
  -----------
  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>


  Commit: cb9881999dead51723bc5eb6d6fc2837f9345920
      
https://github.com/qemu/qemu/commit/cb9881999dead51723bc5eb6d6fc2837f9345920
  Author: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
  Date:   2024-02-13 (Tue, 13 Feb 2024)

  Changed paths:
    M hw/scsi/esp.c

  Log Message:
  -----------
  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>


  Commit: af74b3c15d440d3a3718b8dc6a751c094db75ba3
      
https://github.com/qemu/qemu/commit/af74b3c15d440d3a3718b8dc6a751c094db75ba3
  Author: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
  Date:   2024-02-13 (Tue, 13 Feb 2024)

  Changed paths:
    M hw/scsi/esp.c

  Log Message:
  -----------
  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>


  Commit: 004826d03e400118d8bd9dc1261ddd5e697d3d97
      
https://github.com/qemu/qemu/commit/004826d03e400118d8bd9dc1261ddd5e697d3d97
  Author: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
  Date:   2024-02-13 (Tue, 13 Feb 2024)

  Changed paths:
    M hw/scsi/esp.c

  Log Message:
  -----------
  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>


  Commit: 19e9afb1a3d905f9892bb696e156f4524f2cbbf6
      
https://github.com/qemu/qemu/commit/19e9afb1a3d905f9892bb696e156f4524f2cbbf6
  Author: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
  Date:   2024-02-13 (Tue, 13 Feb 2024)

  Changed paths:
    M hw/scsi/esp.c

  Log Message:
  -----------
  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>


  Commit: 3c7f3c8b5755d855be868ee05099fcee93d06bfe
      
https://github.com/qemu/qemu/commit/3c7f3c8b5755d855be868ee05099fcee93d06bfe
  Author: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
  Date:   2024-02-13 (Tue, 13 Feb 2024)

  Changed paths:
    M hw/scsi/esp.c

  Log Message:
  -----------
  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>


  Commit: 4460b86a04c705c009a0756f3ee67ec4831c56da
      
https://github.com/qemu/qemu/commit/4460b86a04c705c009a0756f3ee67ec4831c56da
  Author: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
  Date:   2024-02-13 (Tue, 13 Feb 2024)

  Changed paths:
    M hw/scsi/esp.c

  Log Message:
  -----------
  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>


  Commit: 1b2e34ca2e86f6487a9fc8b575f3ea6ce294fc95
      
https://github.com/qemu/qemu/commit/1b2e34ca2e86f6487a9fc8b575f3ea6ce294fc95
  Author: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
  Date:   2024-02-13 (Tue, 13 Feb 2024)

  Changed paths:
    M hw/scsi/esp.c

  Log Message:
  -----------
  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>


  Commit: 66fd5657338b7a1ca9c362a593e2daca5a9f4300
      
https://github.com/qemu/qemu/commit/66fd5657338b7a1ca9c362a593e2daca5a9f4300
  Author: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
  Date:   2024-02-13 (Tue, 13 Feb 2024)

  Changed paths:
    M hw/scsi/esp.c
    M include/hw/scsi/esp.h

  Log Message:
  -----------
  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>


  Commit: 5a83e83e1cc64bba2f67cba999552443744767bc
      
https://github.com/qemu/qemu/commit/5a83e83e1cc64bba2f67cba999552443744767bc
  Author: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
  Date:   2024-02-13 (Tue, 13 Feb 2024)

  Changed paths:
    M hw/scsi/esp.c

  Log Message:
  -----------
  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>


  Commit: 1454dc765bc943b68ae3f4b0fce84ff202ea8de6
      
https://github.com/qemu/qemu/commit/1454dc765bc943b68ae3f4b0fce84ff202ea8de6
  Author: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
  Date:   2024-02-13 (Tue, 13 Feb 2024)

  Changed paths:
    M hw/scsi/esp.c

  Log Message:
  -----------
  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>


  Commit: 844b3a84eaa3ae92e5c178cd985506f94756ad86
      
https://github.com/qemu/qemu/commit/844b3a84eaa3ae92e5c178cd985506f94756ad86
  Author: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
  Date:   2024-02-13 (Tue, 13 Feb 2024)

  Changed paths:
    M hw/scsi/esp.c

  Log Message:
  -----------
  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>


  Commit: 9d1aa52b761bc9e38d19009ada723bd4f734cd90
      
https://github.com/qemu/qemu/commit/9d1aa52b761bc9e38d19009ada723bd4f734cd90
  Author: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
  Date:   2024-02-13 (Tue, 13 Feb 2024)

  Changed paths:
    M hw/scsi/esp.c

  Log Message:
  -----------
  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>


  Commit: ad2725af5799c74c9023ffcec8f6dbe3e0539798
      
https://github.com/qemu/qemu/commit/ad2725af5799c74c9023ffcec8f6dbe3e0539798
  Author: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
  Date:   2024-02-13 (Tue, 13 Feb 2024)

  Changed paths:
    M hw/scsi/esp.c

  Log Message:
  -----------
  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>


  Commit: e8c84b19733172bc68ff9fde90981464e9aab443
      
https://github.com/qemu/qemu/commit/e8c84b19733172bc68ff9fde90981464e9aab443
  Author: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
  Date:   2024-02-13 (Tue, 13 Feb 2024)

  Changed paths:
    M hw/scsi/esp.c

  Log Message:
  -----------
  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>


  Commit: 83e803decde74b06c7b1d11f0b9e2c3343d4b683
      
https://github.com/qemu/qemu/commit/83e803decde74b06c7b1d11f0b9e2c3343d4b683
  Author: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
  Date:   2024-02-13 (Tue, 13 Feb 2024)

  Changed paths:
    M hw/scsi/esp.c

  Log Message:
  -----------
  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>


  Commit: df91fd4ecdc777fbf6282f99656f74a9edab69db
      
https://github.com/qemu/qemu/commit/df91fd4ecdc777fbf6282f99656f74a9edab69db
  Author: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
  Date:   2024-02-13 (Tue, 13 Feb 2024)

  Changed paths:
    M hw/scsi/esp.c

  Log Message:
  -----------
  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>


  Commit: 6d97f5acbf029b9c3cbf75fb7102931c2afe8dd3
      
https://github.com/qemu/qemu/commit/6d97f5acbf029b9c3cbf75fb7102931c2afe8dd3
  Author: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
  Date:   2024-02-13 (Tue, 13 Feb 2024)

  Changed paths:
    M hw/scsi/esp.c

  Log Message:
  -----------
  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>


  Commit: 46b0c361254497769f1b4935dc5e7031b84db251
      
https://github.com/qemu/qemu/commit/46b0c361254497769f1b4935dc5e7031b84db251
  Author: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
  Date:   2024-02-13 (Tue, 13 Feb 2024)

  Changed paths:
    M hw/scsi/esp.c

  Log Message:
  -----------
  esp.c: untangle MESSAGE OUT and COMMAND phase logic in esp_do_dma()

This makes it clearer that ATN is asserted until the end of the next TI command
in the MESSAGE OUT phase.

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-47-mark.cave-ayland@ilande.co.uk>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>


  Commit: 9e60cf788cdfaee9605bd554a9738212f85363cd
      
https://github.com/qemu/qemu/commit/9e60cf788cdfaee9605bd554a9738212f85363cd
  Author: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
  Date:   2024-02-13 (Tue, 13 Feb 2024)

  Changed paths:
    M hw/scsi/esp.c

  Log Message:
  -----------
  esp.c: untangle MESSAGE OUT and COMMAND phase logic in do_dma_pdma_cb()

This makes it clearer that ATN is asserted until the end of the next TI command
in the MESSAGE OUT phase.

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-48-mark.cave-ayland@ilande.co.uk>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>


  Commit: 79a6c7c61084e0b2bfb3cbdeb19999fbd4caec2b
      
https://github.com/qemu/qemu/commit/79a6c7c61084e0b2bfb3cbdeb19999fbd4caec2b
  Author: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
  Date:   2024-02-13 (Tue, 13 Feb 2024)

  Changed paths:
    M hw/scsi/esp.c

  Log Message:
  -----------
  esp.c: untangle MESSAGE OUT and COMMAND phase logic in esp_do_nodma()

This makes it clearer that ATN is asserted until the end of the next TI command
in the MESSAGE OUT phase.

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-49-mark.cave-ayland@ilande.co.uk>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>


  Commit: 3ee9a475a51eb7687cfb58ad68ef820238c1c6e1
      
https://github.com/qemu/qemu/commit/3ee9a475a51eb7687cfb58ad68ef820238c1c6e1
  Author: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
  Date:   2024-02-13 (Tue, 13 Feb 2024)

  Changed paths:
    M hw/scsi/esp.c
    M include/hw/scsi/esp.h

  Log Message:
  -----------
  esp.c: move CMD_SELATN end of message phase detection to esp_do_dma() and 
do_dma_pdma_cb()

The special logic in satn_pdma_cb() is now no longer required since esp_do_dma()
can be used as a direct replacement.

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-50-mark.cave-ayland@ilande.co.uk>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>


  Commit: 3fd325a2de38655f8cc2139d428311f3bdd140ee
      
https://github.com/qemu/qemu/commit/3fd325a2de38655f8cc2139d428311f3bdd140ee
  Author: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
  Date:   2024-02-13 (Tue, 13 Feb 2024)

  Changed paths:
    M hw/scsi/esp.c

  Log Message:
  -----------
  esp.c: move CMD_TI end of message phase detection to esp_do_dma() and 
do_dma_pdma_cb()

The existing check for TC == 0 is only valid during a TI 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-51-mark.cave-ayland@ilande.co.uk>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>


  Commit: 9ff0fd12a20a50de2441057c9ecf180132500d0d
      
https://github.com/qemu/qemu/commit/9ff0fd12a20a50de2441057c9ecf180132500d0d
  Author: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
  Date:   2024-02-13 (Tue, 13 Feb 2024)

  Changed paths:
    M hw/scsi/esp.c

  Log Message:
  -----------
  esp.c: don't use get_cmd() for CMD_SEL DMA commands

This can now be done using the existing logic 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-52-mark.cave-ayland@ilande.co.uk>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>


  Commit: db4d4150ba7303250e64fcf5fcb698236e9b5fa5
      
https://github.com/qemu/qemu/commit/db4d4150ba7303250e64fcf5fcb698236e9b5fa5
  Author: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
  Date:   2024-02-13 (Tue, 13 Feb 2024)

  Changed paths:
    M hw/scsi/esp.c
    M include/hw/scsi/esp.h

  Log Message:
  -----------
  esp.c: move CMD_SELATNS end of command logic to esp_do_dma() and 
do_dma_pdma_cb()

The special logic in satn_stop_pdma_cb() is now no longer required since
esp_do_dma() can be used as a direct replacement.

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-53-mark.cave-ayland@ilande.co.uk>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>


  Commit: bb272e245b7660403387144722a94b270e5bba6d
      
https://github.com/qemu/qemu/commit/bb272e245b7660403387144722a94b270e5bba6d
  Author: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
  Date:   2024-02-13 (Tue, 13 Feb 2024)

  Changed paths:
    M hw/scsi/esp.c

  Log Message:
  -----------
  esp.c: replace do_dma_pdma_cb() with esp_do_dma()

Now that the DMA logic is identical between do_dma_pdma_cb() and esp_do_dma()
we can replace do_dma_pdma_cb() with esp_do_dma().

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-54-mark.cave-ayland@ilande.co.uk>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>


  Commit: 8baa14728b43f6bd61ba7074af166a1c98c3adac
      
https://github.com/qemu/qemu/commit/8baa14728b43f6bd61ba7074af166a1c98c3adac
  Author: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
  Date:   2024-02-13 (Tue, 13 Feb 2024)

  Changed paths:
    M hw/scsi/esp.c
    M include/hw/scsi/esp.h

  Log Message:
  -----------
  esp.c: move CMD_ICCS command logic to esp_do_dma()

The special logic in write_response_pdma_cb() is now no longer required since
esp_do_dma() can be used as a direct replacement.

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-55-mark.cave-ayland@ilande.co.uk>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>


  Commit: 34e9bb92b521b1d20822a0c7ea3dd9df003934f5
      
https://github.com/qemu/qemu/commit/34e9bb92b521b1d20822a0c7ea3dd9df003934f5
  Author: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
  Date:   2024-02-13 (Tue, 13 Feb 2024)

  Changed paths:
    M hw/scsi/esp.c

  Log Message:
  -----------
  esp.c: always use esp_do_dma() in pdma_cb()

There is now only a single implementation contained within esp_do_dma() so
call it directly.

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-56-mark.cave-ayland@ilande.co.uk>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>


  Commit: b46a43a2241476d13486e016a0809b690b65f90e
      
https://github.com/qemu/qemu/commit/b46a43a2241476d13486e016a0809b690b65f90e
  Author: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
  Date:   2024-02-13 (Tue, 13 Feb 2024)

  Changed paths:
    M hw/scsi/esp.c
    M include/hw/scsi/esp.h

  Log Message:
  -----------
  esp.c: remove unused PDMA callback implementation

Note that this is a migration break for the q800 machine because the extra PDMA
information is no longer included.

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-57-mark.cave-ayland@ilande.co.uk>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>


  Commit: 8dded6de155e8e8c463c4ad7fd2b2106463306da
      
https://github.com/qemu/qemu/commit/8dded6de155e8e8c463c4ad7fd2b2106463306da
  Author: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
  Date:   2024-02-13 (Tue, 13 Feb 2024)

  Changed paths:
    M hw/scsi/esp.c
    M include/hw/scsi/esp.h

  Log Message:
  -----------
  esp.c: rename data_in_ready to to data_ready

This field is currently used to handle deferred interrupts for the DATA IN phase
but the code will soon be updated to do the same for the DATA OUT phase.

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-58-mark.cave-ayland@ilande.co.uk>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>


  Commit: 8bb224958545deb7f7d64289ccf491da640c1159
      
https://github.com/qemu/qemu/commit/8bb224958545deb7f7d64289ccf491da640c1159
  Author: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
  Date:   2024-02-13 (Tue, 13 Feb 2024)

  Changed paths:
    M hw/scsi/esp.c

  Log Message:
  -----------
  esp.c: separate logic based upon ESP command in esp_command_complete()

The handling of the INTR_FC and INTR_BS bits is different depending upon the
last command executed by the ESP. Note that currently INTR_FC is managed
elsewhere, but that will change soon.

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-59-mark.cave-ayland@ilande.co.uk>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>


  Commit: a4608fa0a5148dbb10f8ac473051ec326ffd71f7
      
https://github.com/qemu/qemu/commit/a4608fa0a5148dbb10f8ac473051ec326ffd71f7
  Author: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
  Date:   2024-02-13 (Tue, 13 Feb 2024)

  Changed paths:
    M hw/scsi/esp.c

  Log Message:
  -----------
  esp.c: separate logic based upon ESP command in esp_transfer_data()

The handling of the INTR_FC and INTR_BS bits is different depending upon the
last command executed by the ESP. Note that currently INTR_FC is managed
elsewhere, but that will change soon.

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-60-mark.cave-ayland@ilande.co.uk>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>


  Commit: c90b2792293d5ce3eb66b1db924894e94d807654
      
https://github.com/qemu/qemu/commit/c90b2792293d5ce3eb66b1db924894e94d807654
  Author: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
  Date:   2024-02-13 (Tue, 13 Feb 2024)

  Changed paths:
    M hw/scsi/esp.c

  Log Message:
  -----------
  esp.c: use deferred interrupts for both DATA IN and DATA OUT phases

This brings DATA OUT transfers in line with DATA IN transfers by ensuring that
the guest visible function complete interrupt is only set once the SCSI layer
has returned.

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-61-mark.cave-ayland@ilande.co.uk>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>


  Commit: 036120f3af5508d69087b898c2497bb73092b3a4
      
https://github.com/qemu/qemu/commit/036120f3af5508d69087b898c2497bb73092b3a4
  Author: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
  Date:   2024-02-13 (Tue, 13 Feb 2024)

  Changed paths:
    M hw/scsi/esp.c

  Log Message:
  -----------
  esp.c: remove DATA IN phase logic when reading from FIFO

Whilst the FIFO is used a storage buffer for both DMA and non-DMA requests, the
loading and unloading is managed directly issuing commands to the ESP. As a
result there is no need to manually invoke the non-DMA command handler.

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-62-mark.cave-ayland@ilande.co.uk>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>


  Commit: cb22ce503851fde104c39670972f91f98cd79a1a
      
https://github.com/qemu/qemu/commit/cb22ce503851fde104c39670972f91f98cd79a1a
  Author: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
  Date:   2024-02-13 (Tue, 13 Feb 2024)

  Changed paths:
    M hw/scsi/esp.c

  Log Message:
  -----------
  esp.c: zero command register when TI command terminates due to phase change

This is the behaviour documented in the datasheet and allows the state machine
to correctly process multiple consecutive TI commands.

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-63-mark.cave-ayland@ilande.co.uk>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>


  Commit: 82003450666e7a91efcb478e7c7d72d3eb679203
      
https://github.com/qemu/qemu/commit/82003450666e7a91efcb478e7c7d72d3eb679203
  Author: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
  Date:   2024-02-13 (Tue, 13 Feb 2024)

  Changed paths:
    M hw/scsi/esp.c
    M include/hw/scsi/esp.h

  Log Message:
  -----------
  esp.c: remove unneeded ti_cmd field

According to the datasheet the previous ESP command remains in the ESP_CMD
register, which caused a problem when consecutive TI commands were issued as
it becomes impossible for the state machine to know when the first TI
command finishes.

This was the original reason for introducing the ti_cmd field which kept
track of the last written command for this purpose. However closer reading
of the datasheet shows that a TI command that terminates due to a change of
SCSI target phase resets the ESP_CMD register to zero which solves this
problem.

Now that this has been fixed in the previous commit, remove the unneeded
ti_cmd field and access the ESP_CMD register directly instead. Bump the
vmstate_esp version to indicate that the ti_cmd field is no longer included.

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-64-mark.cave-ayland@ilande.co.uk>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>


  Commit: 9655f72c20385a535158540ab1daaf71b9222d68
      
https://github.com/qemu/qemu/commit/9655f72c20385a535158540ab1daaf71b9222d68
  Author: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
  Date:   2024-02-13 (Tue, 13 Feb 2024)

  Changed paths:
    M hw/scsi/esp.c

  Log Message:
  -----------
  esp.c: don't raise INTR_BS interrupt in DATA IN phase until TI command issued

In the case where a SCSI command with a DATA IN phase has been issued, the host
may preload the FIFO with unaligned bytes before issuing the main DMA transfer.

When accumulating data in the FIFO don't raise the INTR_BS interrupt until the
TI command is issued, otherwise the unexpected interrupt can confuse the host.
In particular this is needed to prevent the MacOS Disk Utility from failing
when switching non-DMA transfers to use esp_do_nodma().

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-65-mark.cave-ayland@ilande.co.uk>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>


  Commit: a1b8d389359358f269511651a0fe1b493dda0ea8
      
https://github.com/qemu/qemu/commit/a1b8d389359358f269511651a0fe1b493dda0ea8
  Author: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
  Date:   2024-02-13 (Tue, 13 Feb 2024)

  Changed paths:
    M hw/scsi/esp.c

  Log Message:
  -----------
  esp.c: move non-DMA TI logic to separate esp_nodma_ti_dataout() function

This is to allow the logic to be moved during the next commit.

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-66-mark.cave-ayland@ilande.co.uk>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>


  Commit: 5d02add4d751b1c66ddcc278fff47d3f4b341de0
      
https://github.com/qemu/qemu/commit/5d02add4d751b1c66ddcc278fff47d3f4b341de0
  Author: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
  Date:   2024-02-13 (Tue, 13 Feb 2024)

  Changed paths:
    M hw/scsi/esp.c

  Log Message:
  -----------
  esp.c: process non-DMA FIFO writes in esp_do_nodma()

Currently any write to the ESP FIFO in the MESSAGE OUT or COMMAND phases will
manually raise the bus service interrupt. Instead of duplicating the interrupt
logic in esp_reg_write(), update esp_do_nodma() to correctly process incoming
FIFO data during the MESSAGE OUT and COMMAND phases. Part of this change is to
call esp_nodma_ti_dataout() from handle_ti() to ensure that the DATA OUT phase
FIFO transfer only occurs when executing a non-DMA TI command instead of for
each byte entering the FIFO.

One slight complication is that NextSTEP uses multiple TI commands to transfer
the CDB one byte at a time (as opposed to loading the FIFO and using a single
TI command), so it is necessary to determine the expected length of the SCSI
CDB being received. This is handled by the introduction of a new
esp_cdb_length() function which returns the expected SCSI CDB length based
upon the first command byte.

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-67-mark.cave-ayland@ilande.co.uk>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>


  Commit: d39592ff64ba2c0e58cadd1b7f79a0c3a7aba404
      
https://github.com/qemu/qemu/commit/d39592ff64ba2c0e58cadd1b7f79a0c3a7aba404
  Author: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
  Date:   2024-02-13 (Tue, 13 Feb 2024)

  Changed paths:
    M hw/scsi/esp.c

  Log Message:
  -----------
  esp.c: replace get_cmd() with esp_do_nodma()

Now that the esp_do_nodma() state machine correctly handles incoming FIFO
data, all remaining users of get_cmd() can be replaced with esp_do_nodma()
and the get_cmd() function removed completely.

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-68-mark.cave-ayland@ilande.co.uk>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>


  Commit: 83428f7a971344cabbbebbac97f8812fa1aec1f9
      
https://github.com/qemu/qemu/commit/83428f7a971344cabbbebbac97f8812fa1aec1f9
  Author: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
  Date:   2024-02-13 (Tue, 13 Feb 2024)

  Changed paths:
    M hw/scsi/esp.c

  Log Message:
  -----------
  esp.c: move write_response() non-DMA logic to esp_do_nodma()

This moves the remaining non-DMA STATUS and MESSAGE IN phase logic from
write_response() to esp_do_nodma(). Note that we can also now drop the extra
fifo_reset() which is no longer required.

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-69-mark.cave-ayland@ilande.co.uk>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>


  Commit: 0ee71db4fcbb72ec790da235435fa1a13ed61688
      
https://github.com/qemu/qemu/commit/0ee71db4fcbb72ec790da235435fa1a13ed61688
  Author: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
  Date:   2024-02-13 (Tue, 13 Feb 2024)

  Changed paths:
    M hw/scsi/esp.c

  Log Message:
  -----------
  esp.c: consolidate end of command sequence after ICCS command

The end of command sequences for the ICCS command are currently different
between the DMA and non-DMA versions, and also different from the description
in the datasheet.

Update the sequence so that only INTR_FC is asserted in both cases, and keep
all the logic in esp_do_dma() and esp_do_nodma() rather than having some of
it within esp_run_cmd().

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-70-mark.cave-ayland@ilande.co.uk>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>


  Commit: d294b77a959db73bd51b1f4f25807ecba85eab74
      
https://github.com/qemu/qemu/commit/d294b77a959db73bd51b1f4f25807ecba85eab74
  Author: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
  Date:   2024-02-13 (Tue, 13 Feb 2024)

  Changed paths:
    M hw/scsi/esp.c

  Log Message:
  -----------
  esp.c: ensure that STAT_INT is cleared when reading ESP_RINTR

Both esp_raise_irq() and esp_lower_irq() check the STAT_INT bit in ESP_RSTAT
to ensure that the IRQ is raised or lowered if its state changes. When reading
ESP_RINTR, esp_lower_irq() was being called *after* ESP_RSTAT had been
cleared meaning that STAT_INT was already clear, and so if STAT_INT was
asserted beforehand then the esp_lower_irq() would have no effect.

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-71-mark.cave-ayland@ilande.co.uk>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>


  Commit: d68212cdb1b60011e23e94fda3f4c2b88f601816
      
https://github.com/qemu/qemu/commit/d68212cdb1b60011e23e94fda3f4c2b88f601816
  Author: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
  Date:   2024-02-13 (Tue, 13 Feb 2024)

  Changed paths:
    M hw/scsi/esp.c

  Log Message:
  -----------
  esp.c: don't clear the SCSI phase when reading ESP_RINTR

According to the documentation ESP_RSTAT is cleared (except the STAT_TC bit)
when ESP_RINTR is read. This should not include the SCSI bus phase bits which
are currently live from the SCSI bus, otherwise the current SCSI phase is lost
when clearing an end-of-transfer interrupt.

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-72-mark.cave-ayland@ilande.co.uk>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>


  Commit: 02a3ce56a7573d4c7b173b570abda9f239666dc0
      
https://github.com/qemu/qemu/commit/02a3ce56a7573d4c7b173b570abda9f239666dc0
  Author: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
  Date:   2024-02-13 (Tue, 13 Feb 2024)

  Changed paths:
    M hw/scsi/esp.c

  Log Message:
  -----------
  esp.c: handle TC underflow for DMA SCSI requests

Detect the case where the guest underflows TC by requesting a DMA transfer which
is larger than the available data. If this case is detected, immediately
complete the SCSI request and handle any remaining FIFO accesses in the STATUS
phase by raising INTR_BS once the FIFO is below the threshold.

Note that handling the premature SCSI bus phase change in the case of TC
underflow fixes booting EMILE on m68k once again.

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-73-mark.cave-ayland@ilande.co.uk>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>


  Commit: 41f157e50f7e9d3da751f178565109bbd069350d
      
https://github.com/qemu/qemu/commit/41f157e50f7e9d3da751f178565109bbd069350d
  Author: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
  Date:   2024-02-13 (Tue, 13 Feb 2024)

  Changed paths:
    M hw/scsi/esp.c

  Log Message:
  -----------
  esp.c: remove restriction on FIFO read access when DMA memory routines defined

The latest state machines can handle mixing DMA and non-DMA FIFO access for all
SCSI phases except DATA IN and DATA OUT. For DATA IN and DATA OUT phases, the
transfer is complete when TC == 0 and the updated logic will now handle TC
underflow correctly, which makes it just about impossible to manually manipulate
the FIFO during a DMA transfer.

Remove the restriction on FIFO read access when DMA memory routines are defined
which also allows the NeXTCube machine to pass its self-test.

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-74-mark.cave-ayland@ilande.co.uk>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>


  Commit: 8ba3204893d755c3b43eb4cff7f2b88a2e247733
      
https://github.com/qemu/qemu/commit/8ba3204893d755c3b43eb4cff7f2b88a2e247733
  Author: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
  Date:   2024-02-13 (Tue, 13 Feb 2024)

  Changed paths:
    M hw/scsi/esp.c

  Log Message:
  -----------
  esp.c: handle non-DMA FIFO writes used to terminate DMA commands

Certain versions of MacOS send the first 5 bytes of the CDB using DMA and then
send the last byte of the CDB by writing to the FIFO. Update the non-DMA state
machine to detect the end of the CDB and execute the SCSI command using similar
logic as that which already exists for transferring the remainder of the CDB
using the ESP TI 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-75-mark.cave-ayland@ilande.co.uk>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>


  Commit: 9b2cdca2d9511e460dc2235bcd8058c9faeea3d9
      
https://github.com/qemu/qemu/commit/9b2cdca2d9511e460dc2235bcd8058c9faeea3d9
  Author: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
  Date:   2024-02-13 (Tue, 13 Feb 2024)

  Changed paths:
    M hw/scsi/esp.c

  Log Message:
  -----------
  esp.c: improve ESP_RSEQ logic consolidation

The ESP_RSEQ logic is scattered in a few places throughout the ESP state machine
which is mainly because the ESP_RSEQ register isn't always reset when executing
an ESP select command. Once this is done, the ESP_RSEQ register only needs to be
updated at the point where the sequencer command completes.

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-76-mark.cave-ayland@ilande.co.uk>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>


  Commit: acdee66d077371de049489f55a4bda5d1f4246c0
      
https://github.com/qemu/qemu/commit/acdee66d077371de049489f55a4bda5d1f4246c0
  Author: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
  Date:   2024-02-13 (Tue, 13 Feb 2024)

  Changed paths:
    M hw/scsi/esp.c

  Log Message:
  -----------
  esp.c: only transfer non-DMA COMMAND phase data for specific commands

The contents of the FIFO should only be copied to cmdfifo for ESP commands that
are sending data to the SCSI bus, which are the SEL_* commands and the TI
command. Otherwise any incoming data should be held in the FIFO as normal.

This fixes booting of really old 32-bit SPARC Linux kernels such as Aurelien's
debian_etch_sparc_small.qcow2 test image.

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-77-mark.cave-ayland@ilande.co.uk>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>


  Commit: 215d257964c11d3b6dd1c86973f0a1f7d7d9d7aa
      
https://github.com/qemu/qemu/commit/215d257964c11d3b6dd1c86973f0a1f7d7d9d7aa
  Author: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
  Date:   2024-02-13 (Tue, 13 Feb 2024)

  Changed paths:
    M hw/scsi/esp.c

  Log Message:
  -----------
  esp.c: only transfer non-DMA MESSAGE OUT phase data for specific commands

The contents of the FIFO should only be copied to cmdfifo for ESP commands that
are sending data to the SCSI bus, which are the SEL_* commands and the TI
command. Otherwise any incoming data should be held in the FIFO as normal.

This fixes booting of NetBSD m68k under the Q800 machine once again.

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-78-mark.cave-ayland@ilande.co.uk>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>


  Commit: 0d17ce82128c62e7f707a72a6dc7d21ba0a0b980
      
https://github.com/qemu/qemu/commit/0d17ce82128c62e7f707a72a6dc7d21ba0a0b980
  Author: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
  Date:   2024-02-13 (Tue, 13 Feb 2024)

  Changed paths:
    M hw/scsi/esp.c

  Log Message:
  -----------
  esp.c: consolidate DMA and PDMA logic in DATA OUT phase

This allows the removal of duplicate logic shared between the two 
implementations.
Note that we restrict esp_raise_drq() to PDMA to help reduce the log verbosity
for normal DMA.

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-79-mark.cave-ayland@ilande.co.uk>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>


  Commit: c37cc88e9cb966501fd16f2162793a7203d91c29
      
https://github.com/qemu/qemu/commit/c37cc88e9cb966501fd16f2162793a7203d91c29
  Author: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
  Date:   2024-02-13 (Tue, 13 Feb 2024)

  Changed paths:
    M hw/scsi/esp.c

  Log Message:
  -----------
  esp.c: consolidate DMA and PDMA logic in DATA IN phase

This allows the removal of duplicate logic shared between the two 
implementations.
Note that we restrict esp_raise_drq() to PDMA to help reduce the log verbosity
for normal DMA.

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-80-mark.cave-ayland@ilande.co.uk>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>


  Commit: 67ea170ee46509aa71b8227fd9521cf9c7ca0c4b
      
https://github.com/qemu/qemu/commit/67ea170ee46509aa71b8227fd9521cf9c7ca0c4b
  Author: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
  Date:   2024-02-13 (Tue, 13 Feb 2024)

  Changed paths:
    M hw/scsi/esp.c

  Log Message:
  -----------
  esp.c: consolidate DMA and PDMA logic in MESSAGE OUT phase

This allows the removal of duplicate logic shared between the two 
implementations.
Note that we restrict esp_raise_drq() to PDMA to help reduce the log verbosity
for normal DMA.

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-81-mark.cave-ayland@ilande.co.uk>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>


  Commit: 406e8a3e929c9cef4c2a70b84710170170b7c8c9
      
https://github.com/qemu/qemu/commit/406e8a3e929c9cef4c2a70b84710170170b7c8c9
  Author: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
  Date:   2024-02-13 (Tue, 13 Feb 2024)

  Changed paths:
    M hw/scsi/esp.c

  Log Message:
  -----------
  esp.c: remove redundant n variable in PDMA COMMAND phase

This variable can be replaced by the existing len variable.

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-82-mark.cave-ayland@ilande.co.uk>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>


  Commit: 421d1ca509eec29b07e3e5113b1ed9f6e8ef3e4b
      
https://github.com/qemu/qemu/commit/421d1ca509eec29b07e3e5113b1ed9f6e8ef3e4b
  Author: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
  Date:   2024-02-13 (Tue, 13 Feb 2024)

  Changed paths:
    M hw/scsi/esp.c

  Log Message:
  -----------
  esp.c: consolidate DMA and PDMA logic in STATUS and MESSAGE IN phases

This allows the removal of duplicate logic shared between the two 
implementations.
Note that we restrict esp_raise_drq() to PDMA to help reduce the log verbosity
for normal DMA.

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-83-mark.cave-ayland@ilande.co.uk>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>


  Commit: 5a8573391e4a7936dc8276e484ae6208eea99a4b
      
https://github.com/qemu/qemu/commit/5a8573391e4a7936dc8276e484ae6208eea99a4b
  Author: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
  Date:   2024-02-13 (Tue, 13 Feb 2024)

  Changed paths:
    M hw/scsi/esp.c

  Log Message:
  -----------
  esp.c: replace n variable with len in esp_do_nodma()

This brings esp_do_nodma() in line with esp_do_dma().

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-84-mark.cave-ayland@ilande.co.uk>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>


  Commit: a6cad7cd39f57b334f7cf1138a9e657455bb09ef
      
https://github.com/qemu/qemu/commit/a6cad7cd39f57b334f7cf1138a9e657455bb09ef
  Author: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
  Date:   2024-02-13 (Tue, 13 Feb 2024)

  Changed paths:
    M hw/scsi/esp.c

  Log Message:
  -----------
  esp.c: implement DMA Transfer Pad command for DATA phases

The Transfer Pad command is used to either drop incoming FIFO data during the
DATA IN phase or generate a series of zero bytes in the FIFO during the DATA
OUT phase.

Implement the DMA Transfer Pad command for the DATA phases which is used by
the NeXTCube firmware in the DATA IN phase to ignore part of the incoming SCSI
data as it is copied into memory.

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-85-mark.cave-ayland@ilande.co.uk>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>


  Commit: 6dec7c0d9ff8db7c626b2d1dc55404d8f12ddc74
      
https://github.com/qemu/qemu/commit/6dec7c0d9ff8db7c626b2d1dc55404d8f12ddc74
  Author: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
  Date:   2024-02-13 (Tue, 13 Feb 2024)

  Changed paths:
    M hw/scsi/esp.c
    M include/hw/scsi/esp.h

  Log Message:
  -----------
  esp.c: rename irq_data IRQ to drq_irq

The IRQ represented by irq_data is actually the DRQ (DMA request) line so rename
it accordingly.

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-86-mark.cave-ayland@ilande.co.uk>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>


  Commit: 442de89a9378cd663e71408af0542c013d90a229
      
https://github.com/qemu/qemu/commit/442de89a9378cd663e71408af0542c013d90a229
  Author: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
  Date:   2024-02-13 (Tue, 13 Feb 2024)

  Changed paths:
    M hw/scsi/esp.c
    M include/hw/scsi/esp.h

  Log Message:
  -----------
  esp.c: keep track of the DRQ state during DMA

Currently the DRQ IRQ is updated every time DMA data is sent/received which
is both inefficient and causes excessive logging of the DRQ state. Add a
new drq_state bool that only updates the DRQ IRQ if its state changes.

This commit adds the new drq_state bool to the migration state: since the
version number has already been increased earlier in the series, there is
no need to repeat it again here. The DRQ IRQ is (currently) only used for
PDMA transfers which already have a migration break in this series so
there are no problems setting its value post-load.

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-87-mark.cave-ayland@ilande.co.uk>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>


  Commit: 499f4089ba238edc9aa84c1c8c97258844af3635
      
https://github.com/qemu/qemu/commit/499f4089ba238edc9aa84c1c8c97258844af3635
  Author: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
  Date:   2024-02-13 (Tue, 13 Feb 2024)

  Changed paths:
    M hw/scsi/esp.c

  Log Message:
  -----------
  esp.c: switch TypeInfo registration to use DEFINE_TYPES() macro

The use of the DEFINE_TYPES() macro will soon be recommended over the use of
calling type_init() directly.

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-88-mark.cave-ayland@ilande.co.uk>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>


  Commit: 78d68f312aec905edcb1dc5549a2c3a6f716605a
      
https://github.com/qemu/qemu/commit/78d68f312aec905edcb1dc5549a2c3a6f716605a
  Author: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
  Date:   2024-02-13 (Tue, 13 Feb 2024)

  Changed paths:
    M hw/scsi/esp.c

  Log Message:
  -----------
  esp.c: add my copyright to the file

This series has involved rewriting and/or updating a considerable part of the 
ESP
emulation so update the copyright in esp.c to reflect this.

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-89-mark.cave-ayland@ilande.co.uk>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>


  Commit: 62357c047a5abc6ede992159ed7c0aaaeb50617a
      
https://github.com/qemu/qemu/commit/62357c047a5abc6ede992159ed7c0aaaeb50617a
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2024-02-13 (Tue, 13 Feb 2024)

  Changed paths:
    M hw/scsi/esp.c
    M hw/scsi/trace-events
    M include/hw/scsi/esp.h

  Log Message:
  -----------
  Merge tag 'qemu-sparc-20240213' of https://github.com/mcayland/qemu into 
staging

qemu-sparc queue

# -----BEGIN PGP SIGNATURE-----
#
# iQFSBAABCgA8FiEEzGIauY6CIA2RXMnEW8LFb64PMh8FAmXLxQweHG1hcmsuY2F2
# ZS1heWxhbmRAaWxhbmRlLmNvLnVrAAoJEFvCxW+uDzIfn3UH/2blaWblrlMBQlGQ
# fkQOI2IGCJ5yRuh70roTY2aPnUyfc70IvZMvYtHElRD0UqYaQgxSjBbnmsqdS+9c
# IKJG3qlDbnu0GBKKpxw9pmtHJ5NsaAl9E9jLZEX6ISu2rWrBHt4XisZhz8U5cVuc
# dmlM4onk2F3+UcfGh4ACPNwtbYqQHEfWwsLuYPdyDdI647Vs6fEgIjeixBi3BcpN
# lzyzquu/AB5SMXRnKaP5CUHC01TM/US2HuZfZ4PzyA0CmIi1od4RHE1iEN7JNWyC
# ki/dasFoELfeoEU/6JrfPOx65v+91hhkBzN+oC4eV3r5COQkmW7PTmlqS269sH5w
# SZsOWcM=
# =T2mw
# -----END PGP SIGNATURE-----
# gpg: Signature made Tue 13 Feb 2024 19:37:48 GMT
# gpg:                using RSA key CC621AB98E82200D915CC9C45BC2C56FAE0F321F
# gpg:                issuer "mark.cave-ayland@ilande.co.uk"
# gpg: Good signature from "Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>" 
[full]
# Primary key fingerprint: CC62 1AB9 8E82 200D 915C  C9C4 5BC2 C56F AE0F 321F

* tag 'qemu-sparc-20240213' of https://github.com/mcayland/qemu: (88 commits)
  esp.c: add my copyright to the file
  esp.c: switch TypeInfo registration to use DEFINE_TYPES() macro
  esp.c: keep track of the DRQ state during DMA
  esp.c: rename irq_data IRQ to drq_irq
  esp.c: implement DMA Transfer Pad command for DATA phases
  esp.c: replace n variable with len in esp_do_nodma()
  esp.c: consolidate DMA and PDMA logic in STATUS and MESSAGE IN phases
  esp.c: remove redundant n variable in PDMA COMMAND phase
  esp.c: consolidate DMA and PDMA logic in MESSAGE OUT phase
  esp.c: consolidate DMA and PDMA logic in DATA IN phase
  esp.c: consolidate DMA and PDMA logic in DATA OUT phase
  esp.c: only transfer non-DMA MESSAGE OUT phase data for specific commands
  esp.c: only transfer non-DMA COMMAND phase data for specific commands
  esp.c: improve ESP_RSEQ logic consolidation
  esp.c: handle non-DMA FIFO writes used to terminate DMA commands
  esp.c: remove restriction on FIFO read access when DMA memory routines defined
  esp.c: handle TC underflow for DMA SCSI requests
  esp.c: don't clear the SCSI phase when reading ESP_RINTR
  esp.c: ensure that STAT_INT is cleared when reading ESP_RINTR
  esp.c: consolidate end of command sequence after ICCS command
  ...

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>


Compare: https://github.com/qemu/qemu/compare/37216a6ece3d...62357c047a5a



reply via email to

[Prev in Thread] Current Thread [Next in Thread]