From: Kiran Patil <[email protected]>
Problem: When initaitor 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 <[email protected]>
---
drivers/scsi/fcoe/fcoe.c | 21 +++++++++++++++++++--
1 files changed, 19 insertions(+), 2 deletions(-)
diff --git a/drivers/scsi/fcoe/fcoe.c b/drivers/scsi/fcoe/fcoe.c
index 844d618..a3e465f 100644
--- a/drivers/scsi/fcoe/fcoe.c
+++ b/drivers/scsi/fcoe/fcoe.c
@@ -747,8 +747,25 @@ static int fcoe_shost_config(struct fc_lport *lport,
struct device *dev)
*/
bool fcoe_oem_match(struct fc_frame *fp)
{
- return fc_fcp_is_read(fr_fsp(fp)) &&
- (fr_fsp(fp)->data_len > fcoe_ddp_min);
+ bool bret = false;
+ struct fc_frame_header *fh = fc_frame_header_get(fp);
+ if (fc_fcp_is_read(fr_fsp(fp)) &&
+ (fr_fsp(fp)->data_len > fcoe_ddp_min))
+ bret = true;
+ else {
+ /*
+ * Means operating as exchange originator (target received
+ * write request from initiator
+ */
+ struct fcp_cmnd *fcp;
+ if (!(ntoh24(fh->fh_f_ctl) & FC_FC_EX_CTX)) {
+ fcp = fc_frame_payload_get(fp, sizeof(*fcp));
+ if ((ntohs(fh->fh_rx_id) == FC_XID_UNKNOWN) &&
+ (fcp && (fcp->fc_flags & FCP_CFL_WRDATA)))
+ bret = true;
+ }
+ }
+ return bret;
}
/**
_______________________________________________
devel mailing list
[email protected]
http://www.open-fcoe.org/mailman/listinfo/devel