diff options
author | Nithin Sujir <nsujir@broadcom.com> | 2011-03-17 20:13:27 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2011-03-23 12:37:00 -0400 |
commit | 6702ca1dffbc864497b6f2c68543aad9bbf0bcee (patch) | |
tree | 6c53aac4e8de5150a4378ae67acafb93e0e905d9 | |
parent | 839900c69d5b8a07a4df8e9bd9d1e59a5c556811 (diff) |
[SCSI] bnx2fc: Remove rtnl_trylock/restart_syscall checks
Call rtnl_lock instead of rtnl_trylock & restart_syscall. This is bnx2fc
counterpart of fcoe fixes, here is the reference:
https://lists.open-fcoe.org/pipermail/devel/2011-March/011199.html
Signed-off-by: Nithin Nayak Sujir <nsujir@broadcom.com>
Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
-rw-r--r-- | drivers/scsi/bnx2fc/bnx2fc_fcoe.c | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c index e476e8753079..13271a43cd35 100644 --- a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c +++ b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c | |||
@@ -1432,8 +1432,7 @@ static int bnx2fc_destroy(struct net_device *netdev) | |||
1432 | struct net_device *phys_dev; | 1432 | struct net_device *phys_dev; |
1433 | int rc = 0; | 1433 | int rc = 0; |
1434 | 1434 | ||
1435 | if (!rtnl_trylock()) | 1435 | rtnl_lock(); |
1436 | return restart_syscall(); | ||
1437 | 1436 | ||
1438 | mutex_lock(&bnx2fc_dev_lock); | 1437 | mutex_lock(&bnx2fc_dev_lock); |
1439 | #ifdef CONFIG_SCSI_BNX2X_FCOE_MODULE | 1438 | #ifdef CONFIG_SCSI_BNX2X_FCOE_MODULE |
@@ -1805,10 +1804,7 @@ static int bnx2fc_disable(struct net_device *netdev) | |||
1805 | struct ethtool_drvinfo drvinfo; | 1804 | struct ethtool_drvinfo drvinfo; |
1806 | int rc = 0; | 1805 | int rc = 0; |
1807 | 1806 | ||
1808 | if (!rtnl_trylock()) { | 1807 | rtnl_lock(); |
1809 | printk(KERN_ERR PFX "retrying for rtnl_lock\n"); | ||
1810 | return -EIO; | ||
1811 | } | ||
1812 | 1808 | ||
1813 | mutex_lock(&bnx2fc_dev_lock); | 1809 | mutex_lock(&bnx2fc_dev_lock); |
1814 | 1810 | ||
@@ -1867,10 +1863,7 @@ static int bnx2fc_enable(struct net_device *netdev) | |||
1867 | struct ethtool_drvinfo drvinfo; | 1863 | struct ethtool_drvinfo drvinfo; |
1868 | int rc = 0; | 1864 | int rc = 0; |
1869 | 1865 | ||
1870 | if (!rtnl_trylock()) { | 1866 | rtnl_lock(); |
1871 | printk(KERN_ERR PFX "retrying for rtnl_lock\n"); | ||
1872 | return -EIO; | ||
1873 | } | ||
1874 | 1867 | ||
1875 | BNX2FC_MISC_DBG("Entered %s\n", __func__); | 1868 | BNX2FC_MISC_DBG("Entered %s\n", __func__); |
1876 | mutex_lock(&bnx2fc_dev_lock); | 1869 | mutex_lock(&bnx2fc_dev_lock); |
@@ -1942,10 +1935,8 @@ static int bnx2fc_create(struct net_device *netdev, enum fip_state fip_mode) | |||
1942 | return -EIO; | 1935 | return -EIO; |
1943 | } | 1936 | } |
1944 | 1937 | ||
1945 | if (!rtnl_trylock()) { | 1938 | rtnl_lock(); |
1946 | printk(KERN_ERR "trying for rtnl_lock\n"); | 1939 | |
1947 | return -EIO; | ||
1948 | } | ||
1949 | mutex_lock(&bnx2fc_dev_lock); | 1940 | mutex_lock(&bnx2fc_dev_lock); |
1950 | 1941 | ||
1951 | #ifdef CONFIG_SCSI_BNX2X_FCOE_MODULE | 1942 | #ifdef CONFIG_SCSI_BNX2X_FCOE_MODULE |