net/bnx2x: Use is_kdump_kernel() to detect kdump kernel
authorAmir Vadai <amirv@mellanox.com>
Mon, 25 Aug 2014 13:06:54 +0000 (16:06 +0300)
committerDavid S. Miller <davem@davemloft.net>
Mon, 25 Aug 2014 22:42:19 +0000 (15:42 -0700)
Use is_kdump_kernel() to detect kdump kernel, instead of
reset_devices.

CC: Ariel Elior <ariel.elior@qlogic.com>
CC: Michal Schmidt <mschmidt@redhat.com>
Signed-off-by: Amir Vadai <amirv@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c

index 23881448fb02d9c747152dee715543aae6e21732..c99087f746a3d3025818d6678c5fd21329de7aae 100644 (file)
@@ -21,6 +21,7 @@
 #include <linux/if_vlan.h>
 #include <linux/interrupt.h>
 #include <linux/ip.h>
+#include <linux/crash_dump.h>
 #include <net/tcp.h>
 #include <net/ipv6.h>
 #include <net/ip6_checksum.h>
@@ -64,7 +65,7 @@ static int bnx2x_calc_num_queues(struct bnx2x *bp)
        int nq = bnx2x_num_queues ? : netif_get_num_default_rss_queues();
 
        /* Reduce memory usage in kdump environment by using only one queue */
-       if (reset_devices)
+       if (is_kdump_kernel())
                nq = 1;
 
        nq = clamp(nq, 1, BNX2X_MAX_QUEUES(bp));
index a008f48cfaae42875ceddbaaedb552d1f8bb66d5..0728c02440f48b0576c397d262909f1476f09225 100644 (file)
@@ -41,6 +41,7 @@
 #include <linux/ethtool.h>
 #include <linux/mii.h>
 #include <linux/if_vlan.h>
+#include <linux/crash_dump.h>
 #include <net/ip.h>
 #include <net/ipv6.h>
 #include <net/tcp.h>
@@ -11956,7 +11957,7 @@ static int bnx2x_init_bp(struct bnx2x *bp)
        bp->disable_tpa = disable_tpa;
        bp->disable_tpa |= IS_MF_STORAGE_SD(bp) || IS_MF_FCOE_AFEX(bp);
        /* Reduce memory usage in kdump environment by disabling TPA */
-       bp->disable_tpa |= reset_devices;
+       bp->disable_tpa |= is_kdump_kernel();
 
        /* Set TPA flags */
        if (bp->disable_tpa) {