[3/6] net/ionic: set port admin state to up in port init
diff mbox series

Message ID 20210111190209.70928-4-aboyer@pensando.io
State Accepted
Delegated to: Ferruh Yigit
Headers show
Series
  • net/ionic: fix device configuration and init
Related show

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Andrew Boyer Jan. 11, 2021, 7:02 p.m. UTC
This reduces the startup time a bit.

Signed-off-by: Andrew Boyer <aboyer@pensando.io>
Signed-off-by: Neel Patel <neel@pensando.io>
---
 drivers/net/ionic/ionic_main.c | 14 +++-----------
 1 file changed, 3 insertions(+), 11 deletions(-)

Patch
diff mbox series

diff --git a/drivers/net/ionic/ionic_main.c b/drivers/net/ionic/ionic_main.c
index ce5d11311..467696a54 100644
--- a/drivers/net/ionic/ionic_main.c
+++ b/drivers/net/ionic/ionic_main.c
@@ -403,21 +403,13 @@  ionic_port_init(struct ionic_adapter *adapter)
 	for (i = 0; i < nwords; i++)
 		iowrite32(ident->port.config.words[i], &idev->dev_cmd->data[i]);
 
+	idev->port_info->config.state = IONIC_PORT_ADMIN_STATE_UP;
 	ionic_dev_cmd_port_init(idev);
 	err = ionic_dev_cmd_wait_check(idev, IONIC_DEVCMD_TIMEOUT);
-	if (err) {
+	if (err)
 		IONIC_PRINT(ERR, "Failed to init port");
-		return err;
-	}
-
-	ionic_dev_cmd_port_state(idev, IONIC_PORT_ADMIN_STATE_UP);
-	err = ionic_dev_cmd_wait_check(idev, IONIC_DEVCMD_TIMEOUT);
-	if (err) {
-		IONIC_PRINT(WARNING, "Failed to bring port UP");
-		return err;
-	}
 
-	return 0;
+	return err;
 }
 
 int