qemu-patch-raspberry4/hw/scsi
Guenter Roeck c2d6eeda01 esp-pci: Fix status register write erase control
Per AM53C974 datasheet, definition of "SCSI Bus and Control (SBAC)"
register:

Bit 24 'STATUS' Write Erase Control

This bit controls the Write Erase feature on bits 3:1 and bit 6 of the DMA
Status Register ((B)+54h). When this bit is programmed to '1', the state
of bits 3:1 are preserved when read. Bits 3:1 are only cleared when a '1'
is written to the corresponding bit location. For example, to clear bit 1,
the value of '0000_0010b' should be written to the register. When the DMA
Status Preserve bit is '0', bits 3:1 are cleared when read.

The status register is currently defined to bit 12, not bit 24.
Also, its implementation is reversed: The status is auto-cleared if
the bit is set to 1, and must be cleared explicitly when the bit is
set to 0. This results in spurious interrupts reported by the Linux
kernel, and in some cases even results in stalled SCSI operations.

Set SBAC_STATUS to bit 24 and reverse the logic to fix the problem.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Message-Id: <1543442171-24863-1-git-send-email-linux@roeck-us.net>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2019-01-11 13:57:24 +01:00
..
emulation.c scsi-generic: avoid invalid access to struct when emulating block limits 2018-11-06 21:35:06 +01:00
esp-pci.c esp-pci: Fix status register write erase control 2019-01-11 13:57:24 +01:00
esp.c esp: remove legacy esp_init() function 2018-06-28 19:05:36 +02:00
lsi53c895a.c lsi: Reselection needed to remove pending commands from queue 2018-11-27 15:06:14 +01:00
Makefile.objs scsi-generic: avoid invalid access to struct when emulating block limits 2018-11-06 21:35:06 +01:00
megasas.c megasas: fix sglist leak 2018-08-23 13:32:50 +02:00
mfi.h Clean up header guards that don't match their file name 2016-07-12 16:19:16 +02:00
mpi.h hw: Add support for LSI SAS1068 (mptsas) device 2016-02-09 15:45:26 +01:00
mptconfig.c scsi: mptconfig: fix misuse of MPTSAS_CONFIG_PACK 2016-09-13 19:08:46 +02:00
mptendian.c hw/scsi/mptendian: Avoid taking address of fields in packed structs 2018-10-02 19:09:14 +02:00
mptsas.c scsi: mptsas: Mark as storage device 2018-08-23 13:32:50 +02:00
mptsas.h mptsas: really fix migration compatibility 2016-08-03 18:44:56 +02:00
scsi-bus.c vmstate: constify VMStateField 2018-11-27 15:35:15 +01:00
scsi-disk.c scsi-disk: Fix crash if underlying host file or disk returns error 2018-11-22 16:43:48 +01:00
scsi-generic.c scsi-generic: do not do VPD emulation for sense other than ILLEGAL_REQUEST 2018-11-06 21:35:06 +01:00
spapr_vscsi.c scsi: Remove automatic creation of SCSI controllers with -drive if=scsi 2018-03-06 14:00:59 +01:00
srp.h spapr-vscsi: add task management 2013-09-12 08:46:21 +02:00
trace-events lsi53c895a: convert to trace-events 2018-10-02 19:09:13 +02:00
vhost-scsi-common.c vhost-scsi: unify vhost-scsi get_features implementations 2018-08-23 18:46:25 +02:00
vhost-scsi.c vhost-scsi: prevent using uninitialized vqs 2018-11-05 13:24:02 -05:00
vhost-user-scsi.c vhost-scsi: expose 't10_pi' property for VIRTIO_SCSI_F_T10_PI 2018-08-23 18:46:25 +02:00
viosrp.h hw: move private headers to hw/ subdirectories. 2013-04-08 18:13:16 +02:00
virtio-scsi-dataplane.c Replace '-enable-kvm' with '-accel kvm' in docs and help texts 2018-06-28 19:05:32 +02:00
virtio-scsi.c call HotplugHandler->plug() as the last step in device realization 2018-10-19 13:44:12 +02:00
vmw_pvscsi.c qdev: use device_class_set_parent_realize/unrealize/reset() 2018-02-05 13:54:38 +01:00
vmw_pvscsi.h scsi: VMWare PVSCSI paravirtual device implementation 2013-04-19 10:44:17 +02:00