From: Nithin Nayak Sujir <[email protected]>

This is needed so that the user request is retried and does not fail.

Signed-off-by: Nithin Nayak Sujir <[email protected]>
Signed-off-by: Michael Chan <[email protected]>
---
 drivers/scsi/bnx2fc/bnx2fc_fcoe.c |   21 ++++++++-------------
 1 files changed, 8 insertions(+), 13 deletions(-)

diff --git a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c 
b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
index e476e87..cfb49b1 100644
--- a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
+++ b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
@@ -1433,7 +1433,7 @@ static int bnx2fc_destroy(struct net_device *netdev)
        int rc = 0;
 
        if (!rtnl_trylock())
-               return restart_syscall();
+               return -ERESTARTSYS;
 
        mutex_lock(&bnx2fc_dev_lock);
 #ifdef CONFIG_SCSI_BNX2X_FCOE_MODULE
@@ -1805,10 +1805,8 @@ static int bnx2fc_disable(struct net_device *netdev)
        struct ethtool_drvinfo drvinfo;
        int rc = 0;
 
-       if (!rtnl_trylock()) {
-               printk(KERN_ERR PFX "retrying for rtnl_lock\n");
-               return -EIO;
-       }
+       if (!rtnl_trylock())
+               return -ERESTARTSYS;
 
        mutex_lock(&bnx2fc_dev_lock);
 
@@ -1867,10 +1865,8 @@ static int bnx2fc_enable(struct net_device *netdev)
        struct ethtool_drvinfo drvinfo;
        int rc = 0;
 
-       if (!rtnl_trylock()) {
-               printk(KERN_ERR PFX "retrying for rtnl_lock\n");
-               return -EIO;
-       }
+       if (!rtnl_trylock())
+               return -ERESTARTSYS;
 
        BNX2FC_MISC_DBG("Entered %s\n", __func__);
        mutex_lock(&bnx2fc_dev_lock);
@@ -1942,10 +1938,9 @@ static int bnx2fc_create(struct net_device *netdev, enum 
fip_state fip_mode)
                return -EIO;
        }
 
-       if (!rtnl_trylock()) {
-               printk(KERN_ERR "trying for rtnl_lock\n");
-               return -EIO;
-       }
+       if (!rtnl_trylock())
+               return -ERESTARTSYS;
+
        mutex_lock(&bnx2fc_dev_lock);
 
 #ifdef CONFIG_SCSI_BNX2X_FCOE_MODULE
-- 
1.6.4.GIT


_______________________________________________
devel mailing list
[email protected]
https://lists.open-fcoe.org/mailman/listinfo/devel

Reply via email to