Skip to contentSkip to conversation

be2net: Bug fix in init code in probe

PATCH Applied Sarveshwar Bandi 2 participants 2 messages May 24, 2010 – May 25, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 be2net: Bug fix in init code in probe

PCI function reset needs to invoked after fw init ioctl is issued.

---
 drivers/net/benet/be_main.c |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)
drivers/net/benet/be_main.c +6 -4
index 058d7f9..1c79c20 100644
@@ -2487,10 +2487,6 @@ static int __devinit be_probe(struct pci
 		status = be_cmd_POST(adapter);
 		if (status)
 			goto ctrl_clean;
-
-		status = be_cmd_reset_function(adapter);
-		if (status)
-			goto ctrl_clean;
 	}
 
 	/* tell fw we're ready to fire cmds */
@@ -2498,6 +2494,12 @@ static int __devinit be_probe(struct pci
 	if (status)
 		goto ctrl_clean;
 
+	if (be_physfn(adapter)) {
+		status = be_cmd_reset_function(adapter);
+		if (status)
+			goto ctrl_clean;
+	}
+
 	status = be_stats_init(adapter);
 	if (status)
 		goto ctrl_clean;
Signature · 1 line
1.4.0