be2net: remove BUG_ON() in be_mcc_compl_is_new()
authorSathya Perla <sathya.perla@emulex.com>
Tue, 12 Feb 2013 23:05:19 +0000 (23:05 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 13 Feb 2013 18:52:55 +0000 (13:52 -0500)
The current code expects that the last word (with valid bit)
of an MCC compl is DMAed in one shot. This may not be the case.
Remove this assertion.

Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/emulex/benet/be_cmds.c

index 8b04880ee05d1ee0a0cd1de8f5ad9838f9e1f2c0..071aea79d218f01eb166d910a310ef0f49efa470 100644 (file)
@@ -93,13 +93,16 @@ static void be_mcc_notify(struct be_adapter *adapter)
  * little endian) */
 static inline bool be_mcc_compl_is_new(struct be_mcc_compl *compl)
 {
+       u32 flags;
+
        if (compl->flags != 0) {
-               compl->flags = le32_to_cpu(compl->flags);
-               BUG_ON((compl->flags & CQE_FLAGS_VALID_MASK) == 0);
-               return true;
-       } else {
-               return false;
+               flags = le32_to_cpu(compl->flags);
+               if (flags & CQE_FLAGS_VALID_MASK) {
+                       compl->flags = flags;
+                       return true;
+               }
        }
+       return false;
 }
 
 /* Need to reset the entire word that houses the valid bit */