aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJakub Kicinski <jakub.kicinski@netronome.com>2017-03-21 20:59:20 -0400
committerDavid S. Miller <davem@davemloft.net>2017-03-22 15:59:09 -0400
commit219ad6c1c35c95ff99a0c65cfba0ca9996831af5 (patch)
treea015c7b2cbe6ef64716cbdfde47104a7dde75bac
parent28b0cfee7b1b62ea214ebc50be5d5a92cbc30d42 (diff)
nfp: remove defensive checks around ndo_open()/ndo_close()
Device open and close handlers check if the device is already in the desired state. Thanks to our reconfig infrastructure this should not be necessary, there doesn't seem to be any code in the driver which depends on it. Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ethernet/netronome/nfp/nfp_net_common.c10
1 files changed, 0 insertions, 10 deletions
diff --git a/drivers/net/ethernet/netronome/nfp/nfp_net_common.c b/drivers/net/ethernet/netronome/nfp/nfp_net_common.c
index d35eeba86bac..e12353a7c83c 100644
--- a/drivers/net/ethernet/netronome/nfp/nfp_net_common.c
+++ b/drivers/net/ethernet/netronome/nfp/nfp_net_common.c
@@ -2233,11 +2233,6 @@ static int nfp_net_netdev_open(struct net_device *netdev)
2233 struct nfp_net *nn = netdev_priv(netdev); 2233 struct nfp_net *nn = netdev_priv(netdev);
2234 int err, r; 2234 int err, r;
2235 2235
2236 if (nn->dp.ctrl & NFP_NET_CFG_CTRL_ENABLE) {
2237 nn_err(nn, "Dev is already enabled: 0x%08x\n", nn->dp.ctrl);
2238 return -EBUSY;
2239 }
2240
2241 /* Step 1: Allocate resources for rings and the like 2236 /* Step 1: Allocate resources for rings and the like
2242 * - Request interrupts 2237 * - Request interrupts
2243 * - Allocate RX and TX ring resources 2238 * - Allocate RX and TX ring resources
@@ -2368,11 +2363,6 @@ static int nfp_net_netdev_close(struct net_device *netdev)
2368{ 2363{
2369 struct nfp_net *nn = netdev_priv(netdev); 2364 struct nfp_net *nn = netdev_priv(netdev);
2370 2365
2371 if (!(nn->dp.ctrl & NFP_NET_CFG_CTRL_ENABLE)) {
2372 nn_err(nn, "Dev is not up: 0x%08x\n", nn->dp.ctrl);
2373 return 0;
2374 }
2375
2376 /* Step 1: Disable RX and TX rings from the Linux kernel perspective 2366 /* Step 1: Disable RX and TX rings from the Linux kernel perspective
2377 */ 2367 */
2378 nfp_net_close_stack(nn); 2368 nfp_net_close_stack(nn);