qemu/hw
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
..
9pfs 9p: remove support for the "handle" backend 2018-12-12 14:18:10 +01:00
acpi pci/pcihp: perform unplug via the hotplug handler 2018-12-20 11:19:12 -05:00
adc Include qapi/error.h exactly where needed 2018-02-09 13:50:17 +01:00
alpha hw/alpha/typhoon: Stop calling cpu_unassigned_access() 2019-01-08 09:04:30 +10:00
arm target-arm queue: 2019-01-07 16:56:33 +00:00
audio hw/audio/marvell: Don't include unnecessary i2c.h header file 2019-01-09 11:18:06 +01:00
block miscellaneous patches: 2018-12-16 16:32:43 +00:00
bt hw/bt: Replace fprintf(stderr, "*\n" with error_report() 2018-01-22 09:51:00 +01:00
char qmp hmp: Make system_wakeup check wake-up support and run state 2018-12-18 07:55:47 +01:00
core hw/core: fix whitespace in a sentence 2019-01-09 11:09:31 +01:00
cpu hw/cpu: introduce CPU clusters 2019-01-07 15:23:45 +00:00
cris hw/cris: Use the IEC binary prefix definitions 2018-07-02 15:41:15 +02:00
display ui: bugfixes, drop keymap include support, drop dead code. 2019-01-10 16:29:02 +00:00
dma dma/puv3_dma: Convert sysbus init function to realize function 2018-12-13 13:47:58 +00:00
gpio hw/gpio/nrf51_gpio: Add nRF51 GPIO peripheral 2019-01-07 15:23:47 +00:00
hppa hw/hppa/dino: Remove unuseful code 2018-10-24 06:44:59 -03:00
hyperv hw/hyperv: fix NULL dereference with pure-kvm SynIC 2018-11-26 14:14:38 -02:00
i2c i2c: Move typedef of bitbang_i2c_interface to i2c.h 2018-12-12 10:01:13 +01:00
i386 ioapic: use TYPE_FOO MACRO than constant string 2019-01-09 11:33:47 +01:00
ide trivial: Don't include isa.h if it is not really necessary 2019-01-09 11:24:35 +01:00
input qmp hmp: Make system_wakeup check wake-up support and run state 2018-12-18 07:55:47 +01:00
intc Trivial patches for 4.0 (2019-01-09) 2019-01-10 15:33:28 +00:00
ipack hw/ipack: Use the IEC binary prefix definitions 2018-07-02 15:41:12 +02:00
ipmi ipmi: Use proper struct reference for BT vmstate 2018-08-23 18:46:25 +02:00
isa configs: Add a CONFIG_SMC37C669 switch for the "smc37c669-superio" device 2018-10-24 07:33:44 +01:00
lm32 milkymist: Check for failure trying to load BIOS image 2018-11-06 11:32:14 +00:00
m68k hw/m68k: Use the IEC binary prefix definitions 2018-07-02 15:41:14 +02:00
mem memory-device: avoid overflows on very huge devices 2018-12-11 15:45:22 -02:00
microblaze Support u-boot noload images for arm as used by, NetBSD/evbarm GENERIC kernel. 2019-01-07 15:46:20 +00:00
mips hw/mips/malta: Remove unuseful code 2018-10-24 06:44:59 -03:00
misc trivial: Don't include isa.h if it is not really necessary 2019-01-09 11:24:35 +01:00
moxie trivial: Don't include isa.h if it is not really necessary 2019-01-09 11:24:35 +01:00
net vmxnet3: Move some definitions to header file 2018-12-22 11:09:56 +02:00
nios2 Support u-boot noload images for arm as used by, NetBSD/evbarm GENERIC kernel. 2019-01-07 15:46:20 +00:00
nvram trivial: Don't include isa.h if it is not really necessary 2019-01-09 11:24:35 +01:00
openrisc Change references to serial_hds[] to serial_hd() 2018-04-26 13:57:00 +01:00
pci pci: allow cleanup/unregistration of PCI root buses 2019-01-09 09:28:14 +11:00
pci-bridge pci/shpc: perform unplug via the hotplug handler 2018-12-20 11:19:12 -05:00
pci-host pam: wrap MemoryRegion initialization in a transaction 2019-01-11 13:57:23 +01:00
pcmcia hw: Clean up includes 2016-01-29 15:07:25 +00:00
ppc spapr: enable XIVE MMIOs at reset 2019-01-09 09:28:14 +11:00
rdma pvrdma: check return value from pvrdma_idx_ring_has_ routines 2018-12-22 11:09:57 +02:00
riscv sifive_uart: Implement interrupt pending register 2018-12-20 12:08:43 -08:00
s390x include: remove compat.h 2019-01-07 16:18:42 +04:00
scsi esp-pci: Fix status register write erase control 2019-01-11 13:57:24 +01:00
sd hw/sd/sdhci: Don't leak memory region in sdhci_sysbus_realize() 2018-12-14 13:30:54 +00:00
sh4 hw/sh4/sh_pci: Use DeviceState::realize rather than SysBusDevice::init 2018-10-24 06:44:59 -03:00
smbios hw/smbios: Move to the hw/firmware/ subdirectory 2018-12-19 16:48:16 -05:00
sparc trivial: Don't include isa.h if it is not really necessary 2019-01-09 11:24:35 +01:00
sparc64 hw/sparc64/niagara: Model the I/O Bridge with the 'unimplemented_device' 2018-10-24 06:44:59 -03:00
ssi hw/ssi/xilinx_spi: Use DeviceState::realize rather than SysBusDevice::init 2018-10-24 06:44:59 -03:00
timer trivial: Don't include isa.h if it is not really necessary 2019-01-09 11:24:35 +01:00
tpm tpm: Make sure the locality received from backend is valid 2018-12-04 10:21:25 -05:00
tricore hw/tricore: Use the IEC binary prefix definitions 2018-07-02 15:41:14 +02:00
unicore32 hw/input/i8042: Extract declarations from i386/pc.h into input/i8042.h 2018-03-12 16:12:48 +01:00
usb usb: move ehci_create_ich9_with_companions to hw/i386 2019-01-08 12:43:41 +01:00
vfio pci, pc, virtio: fixes, features 2018-12-21 14:06:01 +00:00
virtio virtio: Provide version-specific variants of virtio PCI devices 2018-12-19 16:48:16 -05:00
watchdog qapi: Drop qapi_event_send_FOO()'s Error ** argument 2018-08-28 18:21:38 +02:00
xen machine: move compat properties out of globals 2019-01-07 16:18:41 +04:00
xenpv hw/xen: Use the IEC binary prefix definitions 2018-07-02 15:41:13 +02:00
xtensa target/xtensa: xtfpga: provide default memory sizes 2018-11-21 10:53:21 -08:00
Makefile.objs memory-device: introduce separate config option 2018-10-24 06:44:59 -03:00