From: Hariprasad Shenai Date: Thu, 24 Jul 2014 11:46:30 +0000 (+0530) Subject: cxgb4: Fixed incorrect check for memory operation in t4_memory_rw X-Git-Tag: v3.17-rc1~106^2~85 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c81576c225b942496feb9fbef5bca506bc64ce57;p=platform%2Fkernel%2Flinux-exynos.git 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: Hariprasad Shenai Signed-off-by: David S. Miller --- diff --git a/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c b/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c index e768852..448bec1 100644 --- a/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c +++ b/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c @@ -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++)