From 5751628be3ceb568a1d37963742f7390f179624b Mon Sep 17 00:00:00 2001 From: Vasu Dev Date: Fri, 6 Apr 2012 15:52:51 -0700 Subject: [PATCH] --- yaml --- r: 299867 b: refs/heads/master c: 93f90e5186053611fe93d889e99ee2852f4da250 h: refs/heads/master i: 299865: ee7a9b3cc99b6ff3e2c3d47a1a6fbc20503a7148 299863: 442865367b6efa93748aeaed2060e5eb317fa094 v: v3 --- [refs] | 2 +- trunk/drivers/scsi/libfc/fc_lport.c | 12 +++++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/[refs] b/[refs] index b650d48d5b42..f239a13a227a 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: b4698d88585e23d815506f7f38c48192d944b2eb +refs/heads/master: 93f90e5186053611fe93d889e99ee2852f4da250 diff --git a/trunk/drivers/scsi/libfc/fc_lport.c b/trunk/drivers/scsi/libfc/fc_lport.c index ef9560dff295..cc83b66d45b7 100644 --- a/trunk/drivers/scsi/libfc/fc_lport.c +++ b/trunk/drivers/scsi/libfc/fc_lport.c @@ -1742,17 +1742,19 @@ void fc_lport_flogi_resp(struct fc_seq *sp, struct fc_frame *fp, mfs = ntohs(flp->fl_csp.sp_bb_data) & FC_SP_BB_DATA_MASK; - if (mfs >= FC_SP_MIN_MAX_PAYLOAD && - mfs <= lport->mfs) { - lport->mfs = mfs; - fc_host_maxframe_size(lport->host) = mfs; - } else { + + if (mfs < FC_SP_MIN_MAX_PAYLOAD || mfs > FC_SP_MAX_MAX_PAYLOAD) { FC_LPORT_DBG(lport, "FLOGI bad mfs:%hu response, " "lport->mfs:%hu\n", mfs, lport->mfs); fc_lport_error(lport, fp); goto err; } + if (mfs <= lport->mfs) { + lport->mfs = mfs; + fc_host_maxframe_size(lport->host) = mfs; + } + csp_flags = ntohs(flp->fl_csp.sp_features); r_a_tov = ntohl(flp->fl_csp.sp_r_a_tov); e_d_tov = ntohl(flp->fl_csp.sp_e_d_tov);