提交 c81576c2 编写于 作者: H Hariprasad Shenai 提交者: David S. Miller

cxgb4: Fixed incorrect check for memory operation in t4_memory_rw

Fix incorrect check introduced in commit fc5ab020 ("cxgb4: Replaced the
backdoor mechanism to access the HW memory with PCIe Window method"). We where
checking for write operation and doing a read, changed it accordingly.
Signed-off-by: NHariprasad Shenai <hariprasad@chelsio.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 2695fb55
......@@ -545,7 +545,7 @@ int t4_memory_rw(struct adapter *adap, int win, int mtype, u32 addr,
unsigned char *bp;
int i;
if (dir == T4_MEMORY_WRITE) {
if (dir == T4_MEMORY_READ) {
last.word = (__force __be32) t4_read_reg(adap,
mem_base + offset);
for (bp = (unsigned char *)buf, i = resid; i < 4; i++)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册