netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 2/2] be2net: FLR must be first cmd issued to Lancer FW
@ 2013-04-29  8:22 Somnath Kotur
  2013-04-29 19:16 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Somnath Kotur @ 2013-04-29  8:22 UTC (permalink / raw)
  To: netdev; +Cc: davem, Kalesh AP, Somnath Kotur

From: Kalesh AP <kalesh.purayil@emulex.com>

Lancer FW requires that the first cmd issued by the host-driver be an FLR.
So, re-order be_probe() to move be_cmd_function_reset() ahead of
be_cmd_fw_init().

Signed-off-by: Kalesh AP <kalesh.purayil@emulex.com>
Signed-off-by: Somnath Kotur <somnath.kotur@emulex.com>
---
 drivers/net/ethernet/emulex/benet/be_main.c |   22 +++++++++++-----------
 1 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/drivers/net/ethernet/emulex/benet/be_main.c b/drivers/net/ethernet/emulex/benet/be_main.c
index 43d5c1e..1c73491 100644
--- a/drivers/net/ethernet/emulex/benet/be_main.c
+++ b/drivers/net/ethernet/emulex/benet/be_main.c
@@ -4174,23 +4174,23 @@ static int be_probe(struct pci_dev *pdev, const struct pci_device_id *pdev_id)
 			goto ctrl_clean;
 	}
 
-	/* tell fw we're ready to fire cmds */
-	status = be_cmd_fw_init(adapter);
-	if (status)
-		goto ctrl_clean;
-
 	if (be_reset_required(adapter)) {
 		status = be_cmd_reset_function(adapter);
 		if (status)
 			goto ctrl_clean;
-	}
 
-	/* Wait for interrupts to quiesce after an FLR */
-	msleep(100);
+		/* Wait for interrupts to quiesce after an FLR */
+		msleep(100);
+	}
 
 	/* Allow interrupts for other ULPs running on NIC function */
 	be_intr_set(adapter, true);
 
+	/* tell fw we're ready to fire cmds */
+	status = be_cmd_fw_init(adapter);
+	if (status)
+		goto ctrl_clean;
+
 	status = be_stats_init(adapter);
 	if (status)
 		goto ctrl_clean;
@@ -4400,12 +4400,12 @@ static void be_eeh_resume(struct pci_dev *pdev)
 
 	pci_save_state(pdev);
 
-	/* tell fw we're ready to fire cmds */
-	status = be_cmd_fw_init(adapter);
+	status = be_cmd_reset_function(adapter);
 	if (status)
 		goto err;
 
-	status = be_cmd_reset_function(adapter);
+	/* tell fw we're ready to fire cmds */
+	status = be_cmd_fw_init(adapter);
 	if (status)
 		goto err;
 
-- 
1.6.0.2

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH net-next 2/2] be2net: FLR must be first cmd issued to Lancer FW
  2013-04-29  8:22 [PATCH net-next 2/2] be2net: FLR must be first cmd issued to Lancer FW Somnath Kotur
@ 2013-04-29 19:16 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2013-04-29 19:16 UTC (permalink / raw)
  To: somnath.kotur; +Cc: netdev, kalesh.purayil

From: Somnath Kotur <somnath.kotur@emulex.com>
Date: Mon, 29 Apr 2013 13:52:29 +0530

> From: Kalesh AP <kalesh.purayil@emulex.com>
> 
> Lancer FW requires that the first cmd issued by the host-driver be an FLR.
> So, re-order be_probe() to move be_cmd_function_reset() ahead of
> be_cmd_fw_init().
> 
> Signed-off-by: Kalesh AP <kalesh.purayil@emulex.com>
> Signed-off-by: Somnath Kotur <somnath.kotur@emulex.com>

Applied.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-04-29 19:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-29  8:22 [PATCH net-next 2/2] be2net: FLR must be first cmd issued to Lancer FW Somnath Kotur
2013-04-29 19:16 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).