]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blobdiff - src/patches/suse-2.6.27.31/patches.drivers/fcoe-remove-warn_on-in-fc_set.diff
Added missing Xen Kernel Patches which were not commited because
[people/pmueller/ipfire-2.x.git] / src / patches / suse-2.6.27.31 / patches.drivers / fcoe-remove-warn_on-in-fc_set.diff
diff --git a/src/patches/suse-2.6.27.31/patches.drivers/fcoe-remove-warn_on-in-fc_set.diff b/src/patches/suse-2.6.27.31/patches.drivers/fcoe-remove-warn_on-in-fc_set.diff
new file mode 100644 (file)
index 0000000..76a470a
--- /dev/null
@@ -0,0 +1,46 @@
+From: Yi Zou <yi.zou@intel.com>
+Subject: [FcOE] remove WARN_ON in fc_set_mfs
+References: bnc #459142
+
+remove WARN_ON in fc_set_mfs(), also adde comments.
+
+Signed-off-by: Yi Zou <yi.zou@intel.com>
+Acked-by: Bernhard Walle <bwalle@suse.de>
+---
+
+ drivers/scsi/libfc/fc_lport.c |   13 +++++++++++--
+ 1 file changed, 11 insertions(+), 2 deletions(-)
+
+
+--- a/drivers/scsi/libfc/fc_lport.c
++++ b/drivers/scsi/libfc/fc_lport.c
+@@ -656,10 +656,20 @@ int fc_lport_destroy(struct fc_lport *lp
+ }
+ EXPORT_SYMBOL(fc_lport_destroy);
++/**
++ * fc_set_mfs - sets up the mfs for the corresponding fc_lport
++ * @lport: fc_lport pointer to unregister
++ * @mfs: the new mfs for fc_lport
++ *
++ * Set mfs for the given fc_lport to the new mfs.
++ *
++ * Return: 0 for success
++ *
++ **/
+ int fc_set_mfs(struct fc_lport *lport, u32 mfs)
+ {
+       unsigned int old_mfs;
+-      int rc = -1;
++      int rc = -EINVAL;
+       mutex_lock(&lport->lp_mutex);
+@@ -667,7 +677,6 @@ int fc_set_mfs(struct fc_lport *lport, u
+       if (mfs >= FC_MIN_MAX_FRAME) {
+               mfs &= ~3;
+-              WARN_ON((size_t) mfs < FC_MIN_MAX_FRAME);
+               if (mfs > FC_MAX_FRAME)
+                       mfs = FC_MAX_FRAME;
+               mfs -= sizeof(struct fc_frame_header);