aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
authorKiran Patil <kiran.patil@intel.com>2011-06-20 19:59:15 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2011-10-03 14:40:48 -0400
commit68cde1e274f52661b06c0b994c5280e3f880bd74 (patch)
tree1a1a30c46fac87651bf7e8a34e37a629e2e6d3cc /drivers/scsi
parentcb9d94e8dc5b81e565ef4ecbc9a7f12be05414f8 (diff)
fcoe: Unable to select the exchangeID from offload pool for storage targets
commit 1ff9918b625457ce20d450d00f9ed0a12ba191b7 upstream. Problem: When initiator sends write command to target, target tries to assign new sequence. It allocates new exchangeID (RX_ID) always from non-offloaded pool (Non-offload EMA) Fix: Enhanced fcoe_oem_match routine to look at F_CTL flags and if it is exchange responder and command type is WRITEDATA, then function returns TRUE instead of FALSE. This function is used to determine which pool to use (offload pool of exchange is used only if this function returns TRUE). Technical Notes: N/A Signed-off-by: Kiran Patil <kiran.patil@intel.com> Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/fcoe/fcoe.c19
1 files changed, 17 insertions, 2 deletions
diff --git a/drivers/scsi/fcoe/fcoe.c b/drivers/scsi/fcoe/fcoe.c
index 155d7b9bdea..8885b3ef369 100644
--- a/drivers/scsi/fcoe/fcoe.c
+++ b/drivers/scsi/fcoe/fcoe.c
@@ -749,12 +749,27 @@ static int fcoe_shost_config(struct fc_lport *lport, struct device *dev)
749 * The offload EM that this routine is associated with will handle any 749 * The offload EM that this routine is associated with will handle any
750 * packets that are for SCSI read requests. 750 * packets that are for SCSI read requests.
751 * 751 *
752 * This has been enhanced to work when FCoE stack is operating in target
753 * mode.
754 *
752 * Returns: True for read types I/O, otherwise returns false. 755 * Returns: True for read types I/O, otherwise returns false.
753 */ 756 */
754bool fcoe_oem_match(struct fc_frame *fp) 757bool fcoe_oem_match(struct fc_frame *fp)
755{ 758{
756 return fc_fcp_is_read(fr_fsp(fp)) && 759 struct fc_frame_header *fh = fc_frame_header_get(fp);
757 (fr_fsp(fp)->data_len > fcoe_ddp_min); 760 struct fcp_cmnd *fcp;
761
762 if (fc_fcp_is_read(fr_fsp(fp)) &&
763 (fr_fsp(fp)->data_len > fcoe_ddp_min))
764 return true;
765 else if (!(ntoh24(fh->fh_f_ctl) & FC_FC_EX_CTX)) {
766 fcp = fc_frame_payload_get(fp, sizeof(*fcp));
767 if (ntohs(fh->fh_rx_id) == FC_XID_UNKNOWN &&
768 fcp && (ntohl(fcp->fc_dl) > fcoe_ddp_min) &&
769 (fcp->fc_flags & FCP_CFL_WRDATA))
770 return true;
771 }
772 return false;
758} 773}
759 774
760/** 775/**