alistair23-linux/drivers
Yi Zou a762dce41c [SCSI] fcoe: fix regression on offload em matching function for initiator/target
This is a regression introduced by commit
1ff9918b62 The else statement here is breaking
the initiator logic of allocating xid from the offloaded em xid pool for READ
I/O only to use DDP, as shown by the snippet of trace below, where the WRITE
is using xid 0x5 from the offloaded em xid pool:

Protocol VID Len S_ID        D_ID     OX_ID  RX_ID  Summary
..
*FCP     228 96  0b.08.01 -> 01.0f.00 0x0005 0xffff SCSI: Write(10) LUN: 0x00
 FCP     228 76  01.0f.00 -> 0b.08.01 0x0005 0x828d XFER_RDY
...

The bug is in the else statement, for both initiator and target, the
new command will have FC frame header bit 23 (FC_FC_EX_CTX) cleared as it was
originated from the initiator. Also, this is assuming the frame header is
already filled up, which is only true for target since for initiator, this is a
new frame and oem_match gets called when em tries get xid for this i/o before
it is filled up and sent out.

The fix is to check if there is a fc_fcp_pkt associated w/ this frame from
fr_fsp(fp), since fr_fsp(fp) is NULL for tcm_fc target and non-I/O frame in
initiator. This should also return true for target only if it is an
FC_RCTL_DD_UNSOL_CMD and rx_id is not allocated.

Signed-off-by: Yi Zou <yi.zou@intel.com>
Tested-by: Ross Brattain <ross.b.brattain@intel.com>
Signed-off-by: Robert Love <robert.w.love@intel.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-01-16 12:44:28 +04:00
..
accessibility
acpi Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu 2012-01-10 11:08:21 -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 Merge branch 'upstream-linus' of git://github.com/jgarzik/libata-dev 2012-01-10 10:19:17 -08:00
atm
auxdisplay
base Merge branch 'dma-buf-merge' of git://people.freedesktop.org/~airlied/linux 2012-01-08 14:05:09 -08:00
bcma bcma: extract revision and TX power IDs from SPROM 2011-12-13 15:47:41 -05:00
block Merge branch 'stable/for-linus-3.3' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen 2012-01-10 10:09:59 -08:00
bluetooth 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
cdrom fs: move code out of buffer.c 2012-01-03 22:54:07 -05:00
char Merge branch 'drm-core-next' of git://people.freedesktop.org/~airlied/linux 2012-01-10 11:04:36 -08:00
clk clk: add config option HAVE_CLK_PREPARE into Kconfig 2011-12-28 21:35:06 +08:00
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 'driver-core-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core 2012-01-07 12:03:30 -08:00
cpuidle cpu: convert 'cpu' and 'machinecheck' sysdev_class to a regular subsystem 2011-12-21 14:29:42 -08:00
crypto
dca
devfreq Merge branch 'devfreq-for-next' of git://git.infradead.org/users/kmpark/linux-samsung into pm-devfreq 2011-12-21 09:51:23 +01:00
dio
dma clock management changes for i.MX 2012-01-09 14:44:15 -08:00
edac Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2012-01-08 13:21:22 -08:00
eisa
firewire
firmware Merge branch 'for-linus2' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2012-01-08 12:19:57 -08:00
gpio Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl 2012-01-10 10:19:57 -08:00
gpu Merge branch 'drm-core-next' of git://people.freedesktop.org/~airlied/linux 2012-01-10 11:04:36 -08:00
hid Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid 2012-01-10 10:48:28 -08: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 Merge branch 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging 2012-01-08 13:39:24 -08:00
hwspinlock
i2c Driver specific changes 2012-01-09 14:39:22 -08:00
ide
idle
ieee802154
infiniband infiniband changes for 3.3 merge window 2012-01-08 14:05:48 -08:00
input Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input 2012-01-10 10:55:52 -08:00
iommu Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu 2012-01-10 11:08:21 -08:00
isdn Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2012-01-08 13:21:22 -08:00
leds Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2012-01-08 13:21:22 -08:00
lguest Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2012-01-06 17:22:09 -08:00
macintosh 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
mca
md md update for 3.3 2012-01-08 13:28:33 -08:00
media Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu 2012-01-10 11:08:21 -08:00
memstick
message SCSI updates for post 3.2 merge window 2012-01-10 10:36:08 -08:00
mfd Driver specific changes 2012-01-09 14:39:22 -08:00
misc Merge branch 'char-misc-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc 2012-01-09 12:08:59 -08:00
mmc clock management changes for i.MX 2012-01-09 14:44:15 -08:00
mtd MTD pull for 3.3 2012-01-10 13:45:22 -08:00
net Merge branch 'stable/for-linus-3.3' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen 2012-01-10 10:09:59 -08: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 devicetree/next changes queued for v3.3 merge window 2012-01-07 12:18:52 -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
parport Merge branch 'tty-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty 2012-01-09 12:09:24 -08:00
pci Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu 2012-01-10 11:08:21 -08:00
pcmcia pcmcia: pxa: replace IRQ_GPIO() with gpio_to_irq() 2011-12-28 10:14:04 +00:00
pinctrl pinctrl: remove unnecessary max pin number 2012-01-03 09:10:09 +01:00
platform 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
pnp
power switch ->is_visible() to returning umode_t 2012-01-03 22:54:55 -05:00
pps
ps3
ptp
rapidio
regulator regulator: set constraints.apply_uV to 0 in of_get_fixed_voltage_config 2012-01-06 11:01:09 -08:00
rtc Driver specific changes 2012-01-09 14:39:22 -08:00
s390 Merge branch 'char-misc-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc 2012-01-09 12:08:59 -08:00
sbus
scsi [SCSI] fcoe: fix regression on offload em matching function for initiator/target 2012-01-16 12:44:28 +04:00
sfi
sh 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
sn
spi Cleanups for the Samsung platforms 2012-01-09 14:30:28 -08:00
ssb Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless 2011-12-14 14:35:41 -05:00
staging Merge branch 'drm-core-next' of git://people.freedesktop.org/~airlied/linux 2012-01-10 11:04:36 -08:00
target
tc
telephony
thermal
tty Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-next 2012-01-09 14:47:06 -08:00
uio
usb Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid 2012-01-10 10:48:28 -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
video Merge branch 'stable/for-linus-3.3' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen 2012-01-10 10:09:59 -08:00
virt
virtio
vlynq
w1
watchdog Merge git://www.linux-watchdog.org/linux-watchdog 2012-01-10 10:29:23 -08:00
xen Merge branch 'drm-core-next' of git://people.freedesktop.org/~airlied/linux 2012-01-10 11:04:36 -08:00
zorro misc latin1 to utf8 conversions 2012-01-02 13:04:55 +01:00
Kconfig
Makefile