Revision 9bc6548f372d8c829235095d91de99d8df79db6e authored by Christophe Vu-Brugier on 19 March 2015, 13:30:13 UTC, committed by Nicholas Bellinger on 20 March 2015, 06:26:46 UTC
A check that rejects a CDB with FUA bit set if no write cache is
emulated was added by the following commit:

  fde9f50 target: Add sanity checks for DPO/FUA bit usage

The condition is as follows:

  if (!dev->dev_attrib.emulate_fua_write ||
      !dev->dev_attrib.emulate_write_cache)

However, this check is wrong if the backend device supports WCE but
"emulate_write_cache" is disabled.

This patch uses se_dev_check_wce() (previously named
spc_check_dev_wce) to invoke transport->get_write_cache() if the
device has a write cache or check the "emulate_write_cache" attribute
otherwise.

Reported-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Christophe Vu-Brugier <cvubrugier@fastmail.fm>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
1 parent 5f7da04
History
File Mode Size
Kconfig -rw-r--r-- 2.4 KB
Makefile -rw-r--r-- 1.1 KB
Platform -rw-r--r-- 187 bytes
clock.c -rw-r--r-- 13.1 KB
common.c -rw-r--r-- 2.8 KB
common.h -rw-r--r-- 927 bytes
dev-common.c -rw-r--r-- 2.5 KB
dev-common.h -rw-r--r-- 521 bytes
dev-gpio-buttons.c -rw-r--r-- 1.3 KB
dev-gpio-buttons.h -rw-r--r-- 686 bytes
dev-leds-gpio.c -rw-r--r-- 1.1 KB
dev-leds-gpio.h -rw-r--r-- 601 bytes
dev-spi.c -rw-r--r-- 1.1 KB
dev-spi.h -rw-r--r-- 650 bytes
dev-usb.c -rw-r--r-- 6.0 KB
dev-usb.h -rw-r--r-- 493 bytes
dev-wmac.c -rw-r--r-- 3.9 KB
dev-wmac.h -rw-r--r-- 503 bytes
early_printk.c -rw-r--r-- 2.3 KB
gpio.c -rw-r--r-- 5.7 KB
irq.c -rw-r--r-- 8.5 KB
mach-ap121.c -rw-r--r-- 2.1 KB
mach-ap136.c -rw-r--r-- 4.0 KB
mach-ap81.c -rw-r--r-- 2.3 KB
mach-db120.c -rw-r--r-- 3.5 KB
mach-pb44.c -rw-r--r-- 2.9 KB
mach-ubnt-xm.c -rw-r--r-- 2.8 KB
machtypes.h -rw-r--r-- 891 bytes
pci.c -rw-r--r-- 6.3 KB
pci.h -rw-r--r-- 997 bytes
prom.c -rw-r--r-- 969 bytes
setup.c -rw-r--r-- 5.6 KB

back to top