[ofa-general] [PATCH] ipoib: don't enable napi when it's already	enabled
    Yossi Etigin 
    yosefe at Voltaire.COM
       
    Sun Oct 19 06:14:55 PDT 2008
    
    
  
ipoib_open() may be called from ipoib_pkey_poll(), without calling ipoib_stop()
first. This will call napi_enable() without calling napi_disable first().
Signed-off-by: Yosef Etigin <yosefe at voltaire.com>
-- 
Fixes bug https://bugs.openfabrics.org/show_bug.cgi?id=1288.
Index: b/drivers/infiniband/ulp/ipoib/ipoib_main.c
===================================================================
--- a/drivers/infiniband/ulp/ipoib/ipoib_main.c	2008-10-19 14:12:55.000000000 +0200
+++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c	2008-10-19 14:16:16.000000000 +0200
@@ -106,8 +106,8 @@ int ipoib_open(struct net_device *dev)
 
 	ipoib_dbg(priv, "bringing up interface\n");
 
-	napi_enable(&priv->napi);
-	set_bit(IPOIB_FLAG_ADMIN_UP, &priv->flags);
+	if (!test_and_set_bit(IPOIB_FLAG_ADMIN_UP, &priv->flags))
+		napi_enable(&priv->napi);
 
 	if (ipoib_pkey_dev_delay_open(dev))
 		return 0;
    
    
More information about the general
mailing list