]> git.baikalelectronics.ru Git - kernel.git/commit
net: ethernet: stmmac: fix write to sgmii_adapter_base
authorDinh Nguyen <dinguyen@kernel.org>
Wed, 20 Apr 2022 15:23:45 +0000 (10:23 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 9 May 2022 07:14:41 +0000 (09:14 +0200)
commit209db14c7c3967e2f6c350fc2e772a8cb37c2ec2
tree6127a5c4110ebee2790bc9e646760c9fefe24fc6
parenta0f7dc1781284f039d876fd9411c41e8d68496c7
net: ethernet: stmmac: fix write to sgmii_adapter_base

commit 0281fb8870880a0d1c1b2cb14a344ffa827a4462 upstream.

I made a mistake with the commit 1823610007c4 ("net: ethernet: stmmac:
fix altr_tse_pcs function when using a fixed-link"). I should have
tested against both scenario of having a SGMII interface and one
without.

Without the SGMII PCS TSE adpater, the sgmii_adapter_base address is
NULL, thus a write to this address will fail.

Cc: stable@vger.kernel.org
Fixes: 1823610007c4 ("net: ethernet: stmmac: fix altr_tse_pcs function when using a fixed-link")
Signed-off-by: Dinh Nguyen <dinguyen@kernel.org>
Link: https://lore.kernel.org/r/20220420152345.27415-1-dinguyen@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c