[ofa-general] Re: [PATCH] ipoib: don't enable napi when it's already enabled

Yossi Etigin yosefe at Voltaire.COM
Wed Jan 14 13:16:54 PST 2009


Roland Dreier wrote:
>  > I think the fix (to the fix) should be like the one in the patch below.
> 
> I don't see a patch below?

I meant the quoted one (of course it should be rebased on the new code):

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