]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blob - src/patches/suse-2.6.27.39/patches.drivers/fcoe-remove-warn_on-in-fc_set.diff
Add ignored *.diff files of the xen patches
[people/pmueller/ipfire-2.x.git] / src / patches / suse-2.6.27.39 / patches.drivers / fcoe-remove-warn_on-in-fc_set.diff
1 From: Yi Zou <yi.zou@intel.com>
2 Subject: [FcOE] remove WARN_ON in fc_set_mfs
3 References: bnc #459142
4
5 remove WARN_ON in fc_set_mfs(), also adde comments.
6
7 Signed-off-by: Yi Zou <yi.zou@intel.com>
8 Acked-by: Bernhard Walle <bwalle@suse.de>
9 ---
10
11 drivers/scsi/libfc/fc_lport.c | 13 +++++++++++--
12 1 file changed, 11 insertions(+), 2 deletions(-)
13
14
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
18 }
19 EXPORT_SYMBOL(fc_lport_destroy);
20
21 +/**
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
25 + *
26 + * Set mfs for the given fc_lport to the new mfs.
27 + *
28 + * Return: 0 for success
29 + *
30 + **/
31 int fc_set_mfs(struct fc_lport *lport, u32 mfs)
32 {
33 unsigned int old_mfs;
34 - int rc = -1;
35 + int rc = -EINVAL;
36
37 mutex_lock(&lport->lp_mutex);
38
39 @@ -667,7 +677,6 @@ int fc_set_mfs(struct fc_lport *lport, u
40
41 if (mfs >= FC_MIN_MAX_FRAME) {
42 mfs &= ~3;
43 - WARN_ON((size_t) mfs < FC_MIN_MAX_FRAME);
44 if (mfs > FC_MAX_FRAME)
45 mfs = FC_MAX_FRAME;
46 mfs -= sizeof(struct fc_frame_header);