stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Patch "cxgb4: Fix MC1 memory offset calculation" has been added to the 4.0-stable tree
@ 2015-05-08 11:57 gregkh
  0 siblings, 0 replies; only message in thread
From: gregkh @ 2015-05-08 11:57 UTC (permalink / raw)
  To: hariprasad, davem, gregkh, swise; +Cc: stable, stable-commits


This is a note to let you know that I've just added the patch titled

    cxgb4: Fix MC1 memory offset calculation

to the 4.0-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     cxgb4-fix-mc1-memory-offset-calculation.patch
and it can be found in the queue-4.0 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.


>From foo@baz Fri May  8 13:16:04 CEST 2015
From: Hariprasad Shenai <hariprasad@chelsio.com>
Date: Wed, 29 Apr 2015 17:19:05 +0530
Subject: cxgb4: Fix MC1 memory offset calculation

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
@@ -492,7 +492,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;
 	}
 


Patches currently in stable-queue which might be from hariprasad@chelsio.com are

queue-4.0/cxgb4-fix-mc1-memory-offset-calculation.patch

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-05-08 11:57 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-08 11:57 Patch "cxgb4: Fix MC1 memory offset calculation" has been added to the 4.0-stable tree gregkh

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).