octeontx2-af: Add validation before accessing cgx device
commit 1e9386be6ff7642d80cc471d3f7f472cfd94f0f7 from git@git.assembla.com:cavium/WindRiver.linux.git The current implementation assumes cgx ids are always contiguous and tries to access cgx with fixed ids. Due to this implementation, kernel panics are observed incase of non contiguous cgxs. This patch fixes the issue by adding validation before configuring cgx csrs. [ 22.613753] Internal error: Oops: 0000000096000004 [#1] PREEMPT SMP [ 22.620013] Modules linked in: [ 22.623061] CPU: 0 PID: 162 Comm: kworker/0:3 Not tainted 6.1.0-00146-g2fe975753eaa #40 [ 22.631059] Hardware name: Marvell CN106XX board (DT) [ 22.636103] Workqueue: events work_for_cpu_fn [ 22.640459] pstate: 60400009 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--) [ 22.647415] pc : cgx_read+0x0/0x34 [ 22.650816] lr : cgx_lmac_read+0x68/0x7c fixes: 900ee7e21d80 ("octeontx2-af: cn10k: Add support for programmable channels") Change-Id: I6e94ec70eec1b5a3c4e72685d35bcc68425477c4 Signed-off-by:Hariprasad Kelam <hkelam@marvell.com> Reviewed-on: https://sj1git1.cavium.com/c/IP/SW/kernel/linux/+/102687 Reviewed-by:
Geethasowjanya Akula <gakula@marvell.com> Tested-by:
Linu Cherian <lcherian@marvell.com> Signed-off-by:
Ruiqiang Hao <Ruiqiang.Hao@windriver.com>
Loading
Please register or sign in to comment