diff options
author | Rahul Lakkireddy <rahul.lakkireddy@chelsio.com> | 2018-05-02 12:47:19 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-05-14 20:46:05 +0300 |
commit | 1dde532dd0520a948fbc82f4522183104ee4808b (patch) | |
tree | 33c326162fdade738286b7b48520db15649867e9 /drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | |
parent | 7efe48df8a3df6d089d2e9a1d429c82cc5dcf2de (diff) | |
download | linux-1dde532dd0520a948fbc82f4522183104ee4808b.tar.xz |
cxgb4: collect hardware dump in second kernel
Register callback to collect hardware/firmware dumps in second kernel
before hardware/firmware is initialized. The dumps for each device
will be available as elf notes in /proc/vmcore in second kernel.
Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Signed-off-by: Ganesh Goudar <ganeshgr@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c')
-rw-r--r-- | drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c index c54fd189d835..07baa5e1a8c5 100644 --- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c +++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c @@ -5558,6 +5558,16 @@ static int init_one(struct pci_dev *pdev, const struct pci_device_id *ent) if (err) goto out_free_adapter; + if (is_kdump_kernel()) { + /* Collect hardware state and append to /proc/vmcore */ + err = cxgb4_cudbg_vmcore_add_dump(adapter); + if (err) { + dev_warn(adapter->pdev_dev, + "Fail collecting vmcore device dump, err: %d. Continuing\n", + err); + err = 0; + } + } if (!is_t4(adapter->params.chip)) { s_qpp = (QUEUESPERPAGEPF0_S + |