aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-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 f76a321ecb15..6378c5883514 100644
--- a/drivers/scsi/fcoe/fcoe.c
+++ b/drivers/scsi/fcoe/fcoe.c
@@ -751,12 +751,27 @@ static int fcoe_shost_config(struct fc_lport *lport, struct device *dev)
751 * The offload EM that this routine is associated with will handle any 751 * The offload EM that this routine is associated with will handle any
752 * packets that are for SCSI read requests. 752 * packets that are for SCSI read requests.
753 * 753 *
754 * This has been enhanced to work when FCoE stack is operating in target
755 * mode.
756 *
754 * Returns: True for read types I/O, otherwise returns false. 757 * Returns: True for read types I/O, otherwise returns false.
755 */ 758 */
756bool fcoe_oem_match(struct fc_frame *fp) 759bool fcoe_oem_match(struct fc_frame *fp)
757{ 760{
758 return fc_fcp_is_read(fr_fsp(fp)) && 761 struct fc_frame_header *fh = fc_frame_header_get(fp);
759 (fr_fsp(fp)->data_len > fcoe_ddp_min); 762 struct fcp_cmnd *fcp;
763
764 if (fc_fcp_is_read(fr_fsp(fp)) &&
765 (fr_fsp(fp)->data_len > fcoe_ddp_min))
766 return true;
767 else if (!(ntoh24(fh->fh_f_ctl) & FC_FC_EX_CTX)) {
768 fcp = fc_frame_payload_get(fp, sizeof(*fcp));
769 if (ntohs(fh->fh_rx_id) == FC_XID_UNKNOWN &&
770 fcp && (ntohl(fcp->fc_dl) > fcoe_ddp_min) &&
771 (fcp->fc_flags & FCP_CFL_WRDATA))
772 return true;
773 }
774 return false;
760} 775}
761 776
762/** 777/**