git.droids-corp.org
/
dpdk.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
81dba2b
)
net/qede/base: add check for DMA engine state
author
Rasesh Mody
<rasesh.mody@cavium.com>
Sat, 7 Oct 2017 06:31:00 +0000
(23:31 -0700)
committer
Ferruh Yigit
<ferruh.yigit@intel.com>
Thu, 12 Oct 2017 00:36:58 +0000
(
01:36
+0100)
Check DMA engine state to verify it is not called before it is
initialized
Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
drivers/net/qede/base/ecore_hw.c
patch
|
blob
|
history
diff --git
a/drivers/net/qede/base/ecore_hw.c
b/drivers/net/qede/base/ecore_hw.c
index
d6217d8
..
bc0138f
100644
(file)
--- a/
drivers/net/qede/base/ecore_hw.c
+++ b/
drivers/net/qede/base/ecore_hw.c
@@
-789,6
+789,15
@@
ecore_dmae_execute_command(struct ecore_hwfn *p_hwfn,
return ECORE_SUCCESS;
}
+ if (!cmd) {
+ DP_NOTICE(p_hwfn, true,
+ "ecore_dmae_execute_sub_operation failed. Invalid state. source_addr 0x%lx, destination addr 0x%lx, size_in_dwords 0x%x\n",
+ (unsigned long)src_addr,
+ (unsigned long)dst_addr,
+ length_cur);
+ return ECORE_INVAL;
+ }
+
ecore_dmae_opcode(p_hwfn,
(src_type == ECORE_DMAE_ADDRESS_GRC),
(dst_type == ECORE_DMAE_ADDRESS_GRC), p_params);