stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	stable@vger.kernel.org, Steve Wise <swise@opengridcomputing.com>,
	Hariprasad Shenai <hariprasad@chelsio.com>,
	"David S. Miller" <davem@davemloft.net>
Subject: [PATCH 3.19 4/7] cxgb4: Fix MC1 memory offset calculation
Date: Fri,  8 May 2015 13:12:23 +0200	[thread overview]
Message-ID: <20150508111055.435591665@linuxfoundation.org> (raw)
In-Reply-To: <20150508111054.717693099@linuxfoundation.org>

3.19-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Hariprasad Shenai <hariprasad@chelsio.com>

[ 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 |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c
+++ b/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c
@@ -489,7 +489,7 @@ int t4_memory_rw(struct adapter *adap, i
 		memoffset = (mtype * (edc_size * 1024 * 1024));
 	else {
 		mc_size = EXT_MEM0_SIZE_G(t4_read_reg(adap,
-						      MA_EXT_MEMORY1_BAR_A));
+						      MA_EXT_MEMORY0_BAR_A));
 		memoffset = (MEM_MC0 * edc_size + mc_size) * 1024 * 1024;
 	}
 



  parent reply	other threads:[~2015-05-08 11:13 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-08 11:12 [PATCH 3.19 0/7] 3.19.8-stable review Greg Kroah-Hartman
2015-05-08 11:12 ` [PATCH 3.19 1/7] bpf: fix 64-bit divide Greg Kroah-Hartman
2015-05-08 11:12 ` [PATCH 3.19 2/7] route: Use ipv4_mtu instead of raw rt_pmtu Greg Kroah-Hartman
2015-05-08 11:12 ` [PATCH 3.19 3/7] mlx4: Fix tx ring affinity_mask creation Greg Kroah-Hartman
2015-05-08 11:12 ` Greg Kroah-Hartman [this message]
2015-05-08 11:12 ` [PATCH 3.19 5/7] net/mlx4_en: Schedule napi when RX buffers allocation fails Greg Kroah-Hartman
2015-05-08 11:12 ` [PATCH 3.19 6/7] ipv4: Missing sk_nulls_node_init() in ping_unhash() Greg Kroah-Hartman
2015-05-08 11:12 ` [PATCH 3.19 7/7] clk: at91: usb: fix determine_rate prototype Greg Kroah-Hartman
2015-05-08 15:14 ` [PATCH 3.19 0/7] 3.19.8-stable review Shuah Khan
2015-05-08 20:45   ` Greg Kroah-Hartman
2015-05-08 18:51 ` Guenter Roeck
2015-05-08 20:45   ` Greg Kroah-Hartman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150508111055.435591665@linuxfoundation.org \
    --to=gregkh@linuxfoundation.org \
    --cc=davem@davemloft.net \
    --cc=hariprasad@chelsio.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=swise@opengridcomputing.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).