Commit 3f255dcc authored by Govindarajulu Varadarajan's avatar Govindarajulu Varadarajan Committed by David S. Miller

enic: reconfigure resources for kdump crash kernel

When running in kdump kernel, reduce number of resources used by the driver.
This will enable NIC to operate in low memory kdump kernel environment.

Also change the driver version to .83
Signed-off-by: default avatarGovindarajulu Varadarajan <_govind@gmx.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 9ace4223
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
#define DRV_NAME "enic" #define DRV_NAME "enic"
#define DRV_DESCRIPTION "Cisco VIC Ethernet NIC Driver" #define DRV_DESCRIPTION "Cisco VIC Ethernet NIC Driver"
#define DRV_VERSION "2.1.1.67" #define DRV_VERSION "2.1.1.83"
#define DRV_COPYRIGHT "Copyright 2008-2013 Cisco Systems, Inc" #define DRV_COPYRIGHT "Copyright 2008-2013 Cisco Systems, Inc"
#define ENIC_BARS_MAX 6 #define ENIC_BARS_MAX 6
......
...@@ -45,6 +45,7 @@ ...@@ -45,6 +45,7 @@
#ifdef CONFIG_NET_RX_BUSY_POLL #ifdef CONFIG_NET_RX_BUSY_POLL
#include <net/busy_poll.h> #include <net/busy_poll.h>
#endif #endif
#include <linux/crash_dump.h>
#include "cq_enet_desc.h" #include "cq_enet_desc.h"
#include "vnic_dev.h" #include "vnic_dev.h"
...@@ -2265,6 +2266,18 @@ static void enic_dev_deinit(struct enic *enic) ...@@ -2265,6 +2266,18 @@ static void enic_dev_deinit(struct enic *enic)
enic_clear_intr_mode(enic); enic_clear_intr_mode(enic);
} }
static void enic_kdump_kernel_config(struct enic *enic)
{
if (is_kdump_kernel()) {
dev_info(enic_get_dev(enic), "Running from within kdump kernel. Using minimal resources\n");
enic->rq_count = 1;
enic->wq_count = 1;
enic->config.rq_desc_count = ENIC_MIN_RQ_DESCS;
enic->config.wq_desc_count = ENIC_MIN_WQ_DESCS;
enic->config.mtu = min_t(u16, 1500, enic->config.mtu);
}
}
static int enic_dev_init(struct enic *enic) static int enic_dev_init(struct enic *enic)
{ {
struct device *dev = enic_get_dev(enic); struct device *dev = enic_get_dev(enic);
...@@ -2294,6 +2307,10 @@ static int enic_dev_init(struct enic *enic) ...@@ -2294,6 +2307,10 @@ static int enic_dev_init(struct enic *enic)
enic_get_res_counts(enic); enic_get_res_counts(enic);
/* modify resource count if we are in kdump_kernel
*/
enic_kdump_kernel_config(enic);
/* Set interrupt mode based on resource counts and system /* Set interrupt mode based on resource counts and system
* capabilities * capabilities
*/ */
......
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