diff options
Diffstat (limited to 'drivers/scsi/libfc/fc_lport.c')
-rw-r--r-- | drivers/scsi/libfc/fc_lport.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/scsi/libfc/fc_lport.c b/drivers/scsi/libfc/fc_lport.c index bd5d31d022d9..ef9560dff295 100644 --- a/drivers/scsi/libfc/fc_lport.c +++ b/drivers/scsi/libfc/fc_lport.c | |||
@@ -1743,8 +1743,16 @@ void fc_lport_flogi_resp(struct fc_seq *sp, struct fc_frame *fp, | |||
1743 | mfs = ntohs(flp->fl_csp.sp_bb_data) & | 1743 | mfs = ntohs(flp->fl_csp.sp_bb_data) & |
1744 | FC_SP_BB_DATA_MASK; | 1744 | FC_SP_BB_DATA_MASK; |
1745 | if (mfs >= FC_SP_MIN_MAX_PAYLOAD && | 1745 | if (mfs >= FC_SP_MIN_MAX_PAYLOAD && |
1746 | mfs < lport->mfs) | 1746 | mfs <= lport->mfs) { |
1747 | lport->mfs = mfs; | 1747 | lport->mfs = mfs; |
1748 | fc_host_maxframe_size(lport->host) = mfs; | ||
1749 | } else { | ||
1750 | FC_LPORT_DBG(lport, "FLOGI bad mfs:%hu response, " | ||
1751 | "lport->mfs:%hu\n", mfs, lport->mfs); | ||
1752 | fc_lport_error(lport, fp); | ||
1753 | goto err; | ||
1754 | } | ||
1755 | |||
1748 | csp_flags = ntohs(flp->fl_csp.sp_features); | 1756 | csp_flags = ntohs(flp->fl_csp.sp_features); |
1749 | r_a_tov = ntohl(flp->fl_csp.sp_r_a_tov); | 1757 | r_a_tov = ntohl(flp->fl_csp.sp_r_a_tov); |
1750 | e_d_tov = ntohl(flp->fl_csp.sp_e_d_tov); | 1758 | e_d_tov = ntohl(flp->fl_csp.sp_e_d_tov); |