]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
[karo-tx-linux.git] / drivers / net / ethernet / broadcom / bnx2x / bnx2x_sriov.c
index 44104fb27947fba144575a33a0be3cf1343fe39d..1d925fd9cdc6cf1e06bde2ddbfcc4f15b5421bc1 100644 (file)
@@ -491,12 +491,20 @@ static inline void bnx2x_vfop_credit(struct bnx2x *bp,
         * and a valid credit counter
         */
        if (!vfop->rc && args->credit) {
-               int cnt = 0;
                struct list_head *pos;
+               int read_lock;
+               int cnt = 0;
+
+               read_lock = bnx2x_vlan_mac_h_read_lock(bp, obj);
+               if (read_lock)
+                       DP(BNX2X_MSG_SP, "Failed to take vlan mac read head; continuing anyway\n");
 
                list_for_each(pos, &obj->head)
                        cnt++;
 
+               if (!read_lock)
+                       bnx2x_vlan_mac_h_read_unlock(bp, obj);
+
                atomic_set(args->credit, cnt);
        }
 }