remarkable-linux/drivers
Roland Dreier d95b82461c target: Fix up handling of short INQUIRY buffers
If the initiator sends us an INQUIRY command with an allocation length
that's shorter than what we want to return, we're simply supposed to
truncate our response and return what the initiator gave us space for,
without signaling any error.  Current target code has various tests that
don't fill out the full response if the buffer is too short and
sometimes return errors incorrectly.

Fix this up by allocating a bounce buffer for INQUIRY responses if we
need to, ie if we have cmd->data_length too small as well as
SCF_PASSTHROUGH_SG_TO_MEM_NOALLOC set in cmd->se_cmd_flags -- for most
fabrics, we always allocate at least a full page, but for tcm_loop we
may have a small buffer coming directly from the SCSI stack.

This lets us delete a lot of cmd->data_length checking, and also makes
our INQUIRY handling correct per SPC in a lot more cases.

Signed-off-by: Roland Dreier <roland@purestorage.com>
Cc: stable@vger.kernel.org
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
2012-02-25 14:37:49 -08:00
..
accessibility module_param: make bool parameters really bool (drivers & misc) 2012-01-13 09:32:20 +10:30
acpi ACPI: remove duplicated lines of merging problems with acpi_processor_add 2012-02-08 15:07:03 -08:00
amba Merge branch 'pm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm 2012-01-08 13:10:57 -08:00
ata pata/at91: use newly introduced SMC accessors 2012-02-13 18:31:37 +01:00
atm module_param: make bool parameters really bool (drivers & misc) 2012-01-13 09:32:20 +10:30
auxdisplay
base Fixes a bootstrapping issue for some registers when a less commonly used 2012-02-18 15:37:25 -08:00
bcma bcma: don't fail for bad SPROM CRC 2012-02-06 14:37:52 -05:00
block Merge branch 'for-linus' of git://git.kernel.dk/linux-block 2012-02-11 10:07:11 -08:00
bluetooth module_param: make bool parameters really bool (drivers & misc) 2012-01-13 09:32:20 +10:30
cdrom cdrom: move shared static to cdrom_device_info 2012-02-08 20:03:14 +01:00
char agp: fix scratch page cleanup 2012-01-26 18:36:48 +00:00
clk
clocksource Merge branch 'for-linus' of git://ftp.arm.linux.org.uk/pub/linux/arm/kernel/git-cur/linux-2.6-arm 2012-01-06 18:15:25 -08:00
connector
cpufreq Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/davej/cpufreq 2012-01-11 18:53:33 -08:00
cpuidle
crypto Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2012-01-10 22:01:27 -08:00
dca
devfreq
dio
dma i.MX SDMA: Fix burstsize settings 2012-02-02 14:00:43 +05:30
edac module_param: make bool parameters really bool (drivers & misc) 2012-01-13 09:32:20 +10:30
eisa
firewire firewire: ohci: disable MSI on Ricoh controllers 2012-01-30 21:33:34 +01:00
firmware Merge commit '070680218379e15c1901f4bf21b98e3cbf12b527' into stable/for-linus-fixes-3.3 2012-01-12 11:53:55 -05:00
gpio gpio: Add missing spin_lock_init in gpio-ml-ioh driver 2012-02-01 21:59:37 -07:00
gpu drm/radeon/kms: fix MSI re-arm on rv370+ 2012-02-14 13:36:23 +00:00
hid HID: wiimote: fix invalid power_supply_powers call 2012-02-07 13:40:56 +01:00
hv Merge branch 'usb-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb 2012-01-09 12:09:47 -08:00
hwmon hwmon: (f75375s) Let f75375_update_device treat pwmX as a measured value 2012-02-09 11:21:49 -08:00
hwspinlock
i2c Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/olof/tegra into fixes 2012-02-13 05:40:38 +00:00
ide ARM: at91: drop ide driver in favor of the pata one 2012-02-13 18:31:37 +01:00
idle ACPI processor hotplug: Delay acpi_processor_start() call for hotplugged cores 2012-01-19 21:26:32 -05:00
ieee802154
infiniband target: Add SCF_SCSI_TMR_CDB usage and drop se_tmr_req_cache 2012-02-25 14:37:47 -08:00
input Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input 2012-02-04 10:57:42 -08:00
iommu iommu/msm: Fix error handling in msm_iommu_unmap() 2012-01-30 12:53:14 +01:00
isdn isdn: type bug in isdn_net_header() 2012-02-09 15:41:29 -05:00
leds drivers/leds/leds-lm3530.c: fix setting pltfm->als_vmax 2012-02-08 19:03:51 -08:00
lguest lguest: Make sure interrupt is allocated ok by lguest_setup_irq 2012-01-12 15:44:47 +10:30
macintosh powerpc/adb: Use set_current_state() 2012-02-16 16:15:12 +11:00
mca
md Some simple md-related fixes. 2012-02-08 19:06:30 -08:00
media Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media 2012-01-26 17:04:47 -08:00
memstick module_param: make bool parameters really bool (drivers & misc) 2012-01-13 09:32:20 +10:30
message SCSI updates for post 3.2 merge window 2012-01-10 10:36:08 -08:00
mfd Merge branch 'omap-fixes-warnings' of git://git.linaro.org/people/rmk/linux-arm 2012-02-13 14:16:07 -08:00
misc Minor char-misc fixes for 3.3-rc3 2012-02-09 13:51:13 -08:00
mmc mmc: dw_mmc: Fix PIO mode with support of highmem 2012-02-13 20:39:05 -05:00
mtd - Fix a regression in 16-bit Atmel NAND flash which was introduced in 3.1 2012-02-04 07:17:47 -08:00
net net/ethernet: ks8851_mll fix irq handling 2012-02-15 15:41:10 -05:00
nfc Merge branch 'driver-core-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core 2012-01-07 12:03:30 -08:00
nubus
of 2nd set of device tree changes for v3.3 2012-01-14 13:25:55 -08:00
oprofile Merge branch 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2012-01-06 08:02:58 -08:00
parisc Merge branch 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci 2012-01-11 18:50:26 -08:00
parport Autogenerated GPG tag for Rusty D1ADB8F1: 15EE 8D6C AB0E 7F0C F999 BFCB D920 0E6C D1AD B8F1 2012-01-14 12:32:16 -08:00
pci Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci 2012-02-18 15:26:11 -08:00
pcmcia pcmcia: fix socket refcount decrementing on each resume 2012-02-08 19:03:51 -08:00
pinctrl pinctrl: restore pin naming 2012-02-01 19:35:21 +01:00
platform module_param: make bool parameters really bool (drivers & misc) 2012-01-13 09:32:20 +10:30
pnp PNP: work around Dell 1536/1546 BIOS MMCONFIG bug that breaks USB 2012-01-06 12:11:20 -08:00
power lp8727_charger: Add terminating entry for i2c_device_id table 2012-02-01 21:34:26 +04:00
pps
ps3
ptp
rapidio
regulator regulator: Fix getting voltage in max8649_enable_time() 2012-02-10 11:20:55 +00:00
rtc ARM: at91:rtc/rtc-at91sam9: ioremap register bank 2012-02-13 18:31:36 +01:00
s390 [S390] dasd: revalidate server for new pathgroup 2012-01-18 18:03:42 +01:00
sbus
scsi scsi: Use struct scsi_lun in fc/fcp.h 2012-02-25 14:37:46 -08:00
sfi
sh SH/R-Mobile updates for 3.3 merge window. 2012-01-11 23:29:20 -08:00
sn
spi spi-topcliff-pch: rename pch_spi_pcidev to pch_spi_pcidev_driver 2012-02-05 23:24:17 -07:00
ssb ssb: fix cardbus slot in hostmode 2012-02-01 15:26:00 -05:00
staging staging: pohmelfs: remove drivers/staging/pohmelfs 2012-02-08 16:19:06 -08:00
target target: Fix up handling of short INQUIRY buffers 2012-02-25 14:37:49 -08:00
tc
telephony
thermal thermal: Rename generate_netlink_event 2012-01-23 03:15:25 -05:00
tty tty: serial: omap-serial: wakeup latency constraint is in microseconds, not milliseconds 2012-02-09 10:48:36 -08:00
uio Merge branch 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci 2012-01-11 18:50:26 -08:00
usb USB: usbserial: add new PID number (0xa951) to the ftdi driver 2012-02-03 11:22:44 -08:00
uwb Merge branch 'usb-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb 2012-01-09 12:09:47 -08:00
vhost vhost-net: add module alias (v2.1) 2012-01-13 10:12:23 -08:00
video ARM: omap: fix oops in drivers/video/omap2/dss/dpi.c 2012-02-09 17:56:53 +00:00
virt
virtio virtio: correct the memory barrier in virtqueue_kick_prepare() 2012-01-28 08:10:23 +10:30
vlynq
w1
watchdog watchdog: iTCO_wdt: add Intel Lynx Point DeviceIDs 2012-01-27 10:01:16 +01:00
xen xenbus_dev: add missing error check to watch handling 2012-02-03 16:07:05 -05:00
zorro
Kconfig
Makefile mmc: sdhci-pci: add platform data 2012-01-11 23:58:47 -05:00