Commit c9931896 authored by Amir Vadai's avatar Amir Vadai Committed by David S. Miller

net/bnx2x: Use is_kdump_kernel() to detect kdump kernel

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: default avatarAmir Vadai <amirv@mellanox.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 48ea526a
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
#include <linux/if_vlan.h> #include <linux/if_vlan.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/ip.h> #include <linux/ip.h>
#include <linux/crash_dump.h>
#include <net/tcp.h> #include <net/tcp.h>
#include <net/ipv6.h> #include <net/ipv6.h>
#include <net/ip6_checksum.h> #include <net/ip6_checksum.h>
...@@ -64,7 +65,7 @@ static int bnx2x_calc_num_queues(struct bnx2x *bp) ...@@ -64,7 +65,7 @@ static int bnx2x_calc_num_queues(struct bnx2x *bp)
int nq = bnx2x_num_queues ? : netif_get_num_default_rss_queues(); int nq = bnx2x_num_queues ? : netif_get_num_default_rss_queues();
/* Reduce memory usage in kdump environment by using only one queue */ /* Reduce memory usage in kdump environment by using only one queue */
if (reset_devices) if (is_kdump_kernel())
nq = 1; nq = 1;
nq = clamp(nq, 1, BNX2X_MAX_QUEUES(bp)); nq = clamp(nq, 1, BNX2X_MAX_QUEUES(bp));
......
...@@ -41,6 +41,7 @@ ...@@ -41,6 +41,7 @@
#include <linux/ethtool.h> #include <linux/ethtool.h>
#include <linux/mii.h> #include <linux/mii.h>
#include <linux/if_vlan.h> #include <linux/if_vlan.h>
#include <linux/crash_dump.h>
#include <net/ip.h> #include <net/ip.h>
#include <net/ipv6.h> #include <net/ipv6.h>
#include <net/tcp.h> #include <net/tcp.h>
...@@ -11956,7 +11957,7 @@ static int bnx2x_init_bp(struct bnx2x *bp) ...@@ -11956,7 +11957,7 @@ static int bnx2x_init_bp(struct bnx2x *bp)
bp->disable_tpa = disable_tpa; bp->disable_tpa = disable_tpa;
bp->disable_tpa |= IS_MF_STORAGE_SD(bp) || IS_MF_FCOE_AFEX(bp); bp->disable_tpa |= IS_MF_STORAGE_SD(bp) || IS_MF_FCOE_AFEX(bp);
/* Reduce memory usage in kdump environment by disabling TPA */ /* Reduce memory usage in kdump environment by disabling TPA */
bp->disable_tpa |= reset_devices; bp->disable_tpa |= is_kdump_kernel();
/* Set TPA flags */ /* Set TPA flags */
if (bp->disable_tpa) { if (bp->disable_tpa) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment