cxgb4: Fix MC1 memory offset calculation
authorHariprasad Shenai <hariprasad@chelsio.com>
Wed, 29 Apr 2015 11:49:05 +0000 (17:19 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 11 May 2015 12:34:02 +0000 (05:34 -0700)
commitba16bd9d2c9fd82d6f90e2eb348bce6323eb353f
treee6d2e158f528da153e4d8fd8beeac490b33e6d83
parentcf9c7e58ec8325f198c5f441c1d139585efa1c44
cxgb4: Fix MC1 memory offset calculation

[ Upstream commit 7f0b8a56c978b0a3315ac84c6cbb065413afb8e9 ]

Commit 6559a7e8296002b4 ("cxgb4: Cleanup macros so they follow the same
style and look consistent") introduced a regression where reading MC1
memory in adapters where MC0 isn't present or MC0 size is not equal to MC1
size caused the adapter to crash due to incorrect computation of memoffset.
Fix is to read the size of MC0 instead of MC1 for offset calculation

Signed-off-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/chelsio/cxgb4/t4_hw.c