summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/qlogic/qlge
diff options
context:
space:
mode:
authormalahal@us.ibm.com <malahal@us.ibm.com>2013-09-20 16:21:17 -0500
committerDavid S. Miller <davem@davemloft.net>2013-09-24 11:19:46 -0400
commit3db9180213af6aa54effc2b94bc9090dc1f68673 (patch)
tree3546671adc74cf82e1182a080efee938e9d2887e /drivers/net/ethernet/qlogic/qlge
parent3361dc9538832a2a9150a8c722374ca844bf8dc8 (diff)
downloadtalos-obmc-linux-3db9180213af6aa54effc2b94bc9090dc1f68673.tar.gz
talos-obmc-linux-3db9180213af6aa54effc2b94bc9090dc1f68673.zip
qlge: call ql_core_dump() only if dump memory was allocated.
Also changed a log message to indicate that memory was not allocated instead of memory not available! Signed-off-by: Malahal Naineni <malahal@us.ibm.com> Acked-by: Jitendra Kalsaria <jitendra.kalsaria@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/qlogic/qlge')
-rw-r--r--drivers/net/ethernet/qlogic/qlge/qlge_dbg.c4
-rw-r--r--drivers/net/ethernet/qlogic/qlge/qlge_mpi.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/ethernet/qlogic/qlge/qlge_dbg.c b/drivers/net/ethernet/qlogic/qlge/qlge_dbg.c
index 10093f0c4c0f..6bc5db703920 100644
--- a/drivers/net/ethernet/qlogic/qlge/qlge_dbg.c
+++ b/drivers/net/ethernet/qlogic/qlge/qlge_dbg.c
@@ -740,8 +740,8 @@ int ql_core_dump(struct ql_adapter *qdev, struct ql_mpi_coredump *mpi_coredump)
int i;
if (!mpi_coredump) {
- netif_err(qdev, drv, qdev->ndev, "No memory available\n");
- return -ENOMEM;
+ netif_err(qdev, drv, qdev->ndev, "No memory allocated\n");
+ return -EINVAL;
}
/* Try to get the spinlock, but dont worry if
diff --git a/drivers/net/ethernet/qlogic/qlge/qlge_mpi.c b/drivers/net/ethernet/qlogic/qlge/qlge_mpi.c
index ff2bf8a4e247..7ad146080c36 100644
--- a/drivers/net/ethernet/qlogic/qlge/qlge_mpi.c
+++ b/drivers/net/ethernet/qlogic/qlge/qlge_mpi.c
@@ -1274,7 +1274,7 @@ void ql_mpi_reset_work(struct work_struct *work)
return;
}
- if (!ql_core_dump(qdev, qdev->mpi_coredump)) {
+ if (qdev->mpi_coredump && !ql_core_dump(qdev, qdev->mpi_coredump)) {
netif_err(qdev, drv, qdev->ndev, "Core is dumped!\n");
qdev->core_is_dumped = 1;
queue_delayed_work(qdev->workqueue,
OpenPOWER on IntegriCloud