X-Git-Url: http://git.monstr.eu/?a=blobdiff_plain;f=drivers%2Ftarget%2Fiscsi%2Fiscsi_target_tmr.c;h=05d2e6445ade7c24a258ef15e6304cad230448ab;hb=1c417f39c1f896206f0d5bfec65cd61a8f5e69b8;hp=f62fe123d902cd78f0bdbee14337564559ec8ec9;hpb=21f5aa7eb8572b5cfe36884c23d306c72fe3987c;p=linux-2.6-microblaze.git diff --git a/drivers/target/iscsi/iscsi_target_tmr.c b/drivers/target/iscsi/iscsi_target_tmr.c index f62fe123d902..05d2e6445ade 100644 --- a/drivers/target/iscsi/iscsi_target_tmr.c +++ b/drivers/target/iscsi/iscsi_target_tmr.c @@ -146,7 +146,7 @@ u8 iscsit_tmr_task_reassign( } /* * Temporary check to prevent connection recovery for - * connections with a differing MaxRecvDataSegmentLength. + * connections with a differing Max*DataSegmentLength. */ if (cr->maxrecvdatasegmentlength != conn->conn_ops->MaxRecvDataSegmentLength) { @@ -155,6 +155,13 @@ u8 iscsit_tmr_task_reassign( " TMR TASK_REASSIGN.\n"); return ISCSI_TMF_RSP_REJECTED; } + if (cr->maxxmitdatasegmentlength != + conn->conn_ops->MaxXmitDataSegmentLength) { + pr_err("Unable to perform connection recovery for" + " differing MaxXmitDataSegmentLength, rejecting" + " TMR TASK_REASSIGN.\n"); + return ISCSI_TMF_RSP_REJECTED; + } ref_lun = scsilun_to_int(&hdr->lun); if (ref_lun != ref_cmd->se_cmd.orig_fe_lun) {