Thread (12 messages) 12 messages, 3 authors, 2011-09-01

Re: [PATCH 1/3] bnx2x: remove TPA_ENABLE_FLAG

From: Michal Schmidt <hidden>
Date: 2011-08-31 15:58:54

On Wed, 31 Aug 2011 18:16:30 +0300 Vlad Zolotarov wrote:
On Wednesday 31 August 2011 18:00:34 Michal Schmidt wrote:
quoted
 	if (bnx2x_reload) {
-		if (bp->recovery_state == BNX2X_RECOVERY_DONE)
+		if (bp->recovery_state == BNX2X_RECOVERY_DONE) {
+			/*
+			 * Cheat! Normally dev->features will be
set after we
+			 * return, but that's too late. We need to
know how to
+			 * configure the NIC when reloading it, so
update
+			 * the features early.
+			 */
+			dev->features = features;
 			return bnx2x_reload_if_running(dev);
NACK 

This is bogus - what if bnx2x_reload_if_running(dev)
(bnx2x_nic_load()) failes? The original dev->features would be
lost... 
Well, yes, but since the NIC would be now not working, do we really
care about its features? :-)

Michal
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help