]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
bnx2x: do not allocate FCoE ring if disabled
authorDmitry Kravkov <dmitry@broadcom.com>
Tue, 14 Jun 2011 01:32:47 +0000 (01:32 +0000)
committerBob Picco <bob.picco@oracle.com>
Thu, 2 Feb 2012 23:03:25 +0000 (18:03 -0500)
Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@conan.davemloft.net>
(cherry picked from commit 8eef2af1824da37b428ad34e7ff3490b327b39c1)

drivers/net/bnx2x/bnx2x_cmn.c

index 9b248348c0e6aa3a9fff94d4fd7c6e9677b11821..2bb4905b44162042fac7cd90097815b76b57c7d0 100644 (file)
@@ -2620,7 +2620,12 @@ static int bnx2x_alloc_fp_mem_at(struct bnx2x *bp, int index)
 #ifdef BCM_CNIC
        }
 #endif
-       set_sb_shortcuts(bp, index);
+
+       /* FCoE Queue uses Default SB and doesn't ACK the SB, thus no need to
+        * set shortcuts for it.
+        */
+       if (!IS_FCOE_IDX(index))
+               set_sb_shortcuts(bp, index);
 
        /* Tx */
        if (!skip_tx_queue(bp, index)) {
@@ -2697,9 +2702,13 @@ int bnx2x_alloc_fp_mem(struct bnx2x *bp)
        if (bnx2x_alloc_fp_mem_at(bp, 0))
                return -ENOMEM;
 #ifdef BCM_CNIC
-       /* FCoE */
-       if (bnx2x_alloc_fp_mem_at(bp, FCOE_IDX))
-               return -ENOMEM;
+       if (!NO_FCOE(bp))
+               /* FCoE */
+               if (bnx2x_alloc_fp_mem_at(bp, FCOE_IDX))
+                       /* we will fail load process instead of mark
+                        * NO_FCOE_FLAG
+                        */
+                       return -ENOMEM;
 #endif
        /* RSS */
        for_each_nondefault_eth_queue(bp, i)