]> git.baikalelectronics.ru Git - kernel.git/commit
cxgb4: fix adapter crash due to wrong MC size
authorVishal Kulkarni <vishal@chelsio.com>
Wed, 22 Apr 2020 15:50:07 +0000 (21:20 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 29 Apr 2020 14:33:06 +0000 (16:33 +0200)
commit873c98a459d0f4c10998222df2ff91b8f3ff067d
treeee6198bf7a6231a338a5e141257971245b7063e7
parent11e55e3f8b84cc3a381ebcd36ba55656c5db67bb
cxgb4: fix adapter crash due to wrong MC size

[ Upstream commit a081dd1f5c533653b09090e687769b389df4677d ]

In the absence of MC1, the size calculation function
cudbg_mem_region_size() was returing wrong MC size and
resulted in adapter crash. This patch adds new argument
to cudbg_mem_region_size() which will have actual size
and returns error to caller in the absence of MC1.

Fixes: 75c85be3c1f6 ("cxgb4: collect MC memory dump")
Signed-off-by: Vishal Kulkarni <vishal@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/cudbg_lib.c