1 From: Yi Zou <yi.zou@intel.com>
2 Subject: [FcOE] remove WARN_ON in fc_set_mfs
3 References: bnc #459142
5 remove WARN_ON in fc_set_mfs(), also adde comments.
7 Signed-off-by: Yi Zou <yi.zou@intel.com>
8 Acked-by: Bernhard Walle <bwalle@suse.de>
11 drivers/scsi/libfc/fc_lport.c | 13 +++++++++++--
12 1 file changed, 11 insertions(+), 2 deletions(-)
15 --- a/drivers/scsi/libfc/fc_lport.c
16 +++ b/drivers/scsi/libfc/fc_lport.c
17 @@ -656,10 +656,20 @@ int fc_lport_destroy(struct fc_lport *lp
19 EXPORT_SYMBOL(fc_lport_destroy);
22 + * fc_set_mfs - sets up the mfs for the corresponding fc_lport
23 + * @lport: fc_lport pointer to unregister
24 + * @mfs: the new mfs for fc_lport
26 + * Set mfs for the given fc_lport to the new mfs.
28 + * Return: 0 for success
31 int fc_set_mfs(struct fc_lport *lport, u32 mfs)
37 mutex_lock(&lport->lp_mutex);
39 @@ -667,7 +677,6 @@ int fc_set_mfs(struct fc_lport *lport, u
41 if (mfs >= FC_MIN_MAX_FRAME) {
43 - WARN_ON((size_t) mfs < FC_MIN_MAX_FRAME);
44 if (mfs > FC_MAX_FRAME)
46 mfs -= sizeof(struct fc_frame_header);