There is no usrio config defined for default gem config leading to
a kernel panic devices that don't define a data. This issue can be
reprdouced with microchip polar fire soc where compatible string
is defined as "cdns,macb".
Fixes: edac63861db7 ("net: macb: add userio bits as platform configuration")
Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com>
Signed-off-by: Atish Patra <redacted>
---
Changes from v2->v3:
1. Fixed the typo in fixes tag.
Changes from v1->v2:
1. Fixed the fixes tag.
---
drivers/net/ethernet/cadence/macb_main.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/ethernet/cadence/macb_main.c b/drivers/net/ethernet/cadence/macb_main.c
index 814a5b10141d..47ee72ab7002 100644
--- a/drivers/net/ethernet/cadence/macb_main.c
+++ b/drivers/net/ethernet/cadence/macb_main.c
@@ -4590,6 +4590,7 @@ static const struct macb_config default_gem_config = {
.dma_burst_length = 16,
.clk_init = macb_clk_init,
.init = macb_init,
+ .usrio = &macb_default_usrio,
.jumbo_max_len = 10240,
};
--
2.25.1
Hi Atish,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on net/master]
url: https://github.com/0day-ci/linux/commits/Atish-Patra/net-macb-Add-default-usrio-config-to-default-gem-config/20210114-034147
base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net.git c8a8ead01736419a14c3106e1f26a79d74fc84c7
config: x86_64-rhel-7.6-kselftests (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce (this is a W=1 build):
# https://github.com/0day-ci/linux/commit/a870ba09ad366b8a2aa9cde42e3b0404a333ce03
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Atish-Patra/net-macb-Add-default-usrio-config-to-default-gem-config/20210114-034147
git checkout a870ba09ad366b8a2aa9cde42e3b0404a333ce03
# save the attached .config to linux build tree
make W=1 ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <redacted>
All errors (new ones prefixed by >>):
quoted
drivers/net/ethernet/cadence/macb_main.c:4593:12: error: 'macb_default_usrio' undeclared here (not in a function)
4593 | .usrio = &macb_default_usrio,
| ^~~~~~~~~~~~~~~~~~
vim +/macb_default_usrio +4593 drivers/net/ethernet/cadence/macb_main.c
4585
4586 static const struct macb_config default_gem_config = {
4587 .caps = MACB_CAPS_GIGABIT_MODE_AVAILABLE |
4588 MACB_CAPS_JUMBO |
4589 MACB_CAPS_GEM_HAS_PTP,
4590 .dma_burst_length = 16,
4591 .clk_init = macb_clk_init,
4592 .init = macb_init,4593 .usrio = &macb_default_usrio,
4594 .jumbo_max_len = 10240,
4595 };
4596
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org