* [PATCH v2] bnxt_en: use new module_firmware_crashed()
@ 2020-05-16 8:25 Vasundhara Volam
2020-05-16 12:55 ` kbuild test robot
2020-05-16 13:30 ` kbuild test robot
0 siblings, 2 replies; 5+ messages in thread
From: Vasundhara Volam @ 2020-05-16 8:25 UTC (permalink / raw)
To: jeyu; +Cc: davem, netdev, michael.chan, Vasundhara Volam, Luis Chamberlain
This makes use of the new module_firmware_crashed() to help
annotate when firmware for device drivers crash. When firmware
crashes devices can sometimes become unresponsive, and recovery
sometimes requires a driver unload / reload and in the worst cases
a reboot.
Using a taint flag allows us to annotate when this happens clearly.
Cc: Luis Chamberlain <mcgrof@kernel.org>
Reviewed-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: Vasundhara Volam <vasundhara-v.volam@broadcom.com>
---
v2: Move call module_firmware_crashed() to bnxt_fw_fatal_recover().
This will optimize to make the call at one central place.
Please append to the patchset:
("[PATCH v2 00/15] net: taint when the device driver firmware crashes")
---
drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c b/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c
index a812beb..1e37938 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c
@@ -121,6 +121,7 @@ static int bnxt_fw_fatal_recover(struct devlink_health_reporter *reporter,
if (!priv_ctx)
return -EOPNOTSUPP;
+ module_firmware_crashed();
bp->fw_health->fatal = true;
event = fw_reporter_ctx->sp_event;
if (event == BNXT_FW_RESET_NOTIFY_SP_EVENT)
--
1.8.3.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v2] bnxt_en: use new module_firmware_crashed()
2020-05-16 8:25 [PATCH v2] bnxt_en: use new module_firmware_crashed() Vasundhara Volam
@ 2020-05-16 12:55 ` kbuild test robot
2020-05-16 13:30 ` kbuild test robot
1 sibling, 0 replies; 5+ messages in thread
From: kbuild test robot @ 2020-05-16 12:55 UTC (permalink / raw)
To: Vasundhara Volam, jeyu
Cc: kbuild-all, davem, netdev, michael.chan, Vasundhara Volam,
Luis Chamberlain
[-- Attachment #1: Type: text/plain, Size: 2504 bytes --]
Hi Vasundhara,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on sparc-next/master]
[also build test ERROR on linus/master v5.7-rc5 next-20200515]
[cannot apply to ipvs/master]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Vasundhara-Volam/bnxt_en-use-new-module_firmware_crashed/20200516-163022
base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-next.git master
config: ia64-randconfig-r013-20200515 (attached as .config)
compiler: ia64-linux-gcc (GCC) 9.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day GCC_VERSION=9.3.0 make.cross ARCH=ia64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp@intel.com>
All errors (new ones prefixed by >>, old ones prefixed by <<):
drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c: In function 'bnxt_fw_fatal_recover':
>> drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c:124:2: error: implicit declaration of function 'module_firmware_crashed' [-Werror=implicit-function-declaration]
124 | module_firmware_crashed();
| ^~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +/module_firmware_crashed +124 drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c
112
113 static int bnxt_fw_fatal_recover(struct devlink_health_reporter *reporter,
114 void *priv_ctx,
115 struct netlink_ext_ack *extack)
116 {
117 struct bnxt *bp = devlink_health_reporter_priv(reporter);
118 struct bnxt_fw_reporter_ctx *fw_reporter_ctx = priv_ctx;
119 unsigned long event;
120
121 if (!priv_ctx)
122 return -EOPNOTSUPP;
123
> 124 module_firmware_crashed();
125 bp->fw_health->fatal = true;
126 event = fw_reporter_ctx->sp_event;
127 if (event == BNXT_FW_RESET_NOTIFY_SP_EVENT)
128 bnxt_fw_reset(bp);
129 else if (event == BNXT_FW_EXCEPTION_SP_EVENT)
130 bnxt_fw_exception(bp);
131
132 return -EINPROGRESS;
133 }
134
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 35225 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2] bnxt_en: use new module_firmware_crashed()
@ 2020-05-16 12:55 ` kbuild test robot
0 siblings, 0 replies; 5+ messages in thread
From: kbuild test robot @ 2020-05-16 12:55 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 2567 bytes --]
Hi Vasundhara,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on sparc-next/master]
[also build test ERROR on linus/master v5.7-rc5 next-20200515]
[cannot apply to ipvs/master]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Vasundhara-Volam/bnxt_en-use-new-module_firmware_crashed/20200516-163022
base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-next.git master
config: ia64-randconfig-r013-20200515 (attached as .config)
compiler: ia64-linux-gcc (GCC) 9.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day GCC_VERSION=9.3.0 make.cross ARCH=ia64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp@intel.com>
All errors (new ones prefixed by >>, old ones prefixed by <<):
drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c: In function 'bnxt_fw_fatal_recover':
>> drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c:124:2: error: implicit declaration of function 'module_firmware_crashed' [-Werror=implicit-function-declaration]
124 | module_firmware_crashed();
| ^~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +/module_firmware_crashed +124 drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c
112
113 static int bnxt_fw_fatal_recover(struct devlink_health_reporter *reporter,
114 void *priv_ctx,
115 struct netlink_ext_ack *extack)
116 {
117 struct bnxt *bp = devlink_health_reporter_priv(reporter);
118 struct bnxt_fw_reporter_ctx *fw_reporter_ctx = priv_ctx;
119 unsigned long event;
120
121 if (!priv_ctx)
122 return -EOPNOTSUPP;
123
> 124 module_firmware_crashed();
125 bp->fw_health->fatal = true;
126 event = fw_reporter_ctx->sp_event;
127 if (event == BNXT_FW_RESET_NOTIFY_SP_EVENT)
128 bnxt_fw_reset(bp);
129 else if (event == BNXT_FW_EXCEPTION_SP_EVENT)
130 bnxt_fw_exception(bp);
131
132 return -EINPROGRESS;
133 }
134
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 35225 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2] bnxt_en: use new module_firmware_crashed()
2020-05-16 8:25 [PATCH v2] bnxt_en: use new module_firmware_crashed() Vasundhara Volam
@ 2020-05-16 13:30 ` kbuild test robot
2020-05-16 13:30 ` kbuild test robot
1 sibling, 0 replies; 5+ messages in thread
From: kbuild test robot @ 2020-05-16 13:30 UTC (permalink / raw)
To: Vasundhara Volam, jeyu
Cc: kbuild-all, clang-built-linux, davem, netdev, michael.chan,
Vasundhara Volam, Luis Chamberlain
[-- Attachment #1: Type: text/plain, Size: 2509 bytes --]
Hi Vasundhara,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on sparc-next/master]
[also build test ERROR on linus/master v5.7-rc5 next-20200515]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Vasundhara-Volam/bnxt_en-use-new-module_firmware_crashed/20200516-163022
base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-next.git master
config: x86_64-allyesconfig (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project 13d44b2a0c7ef404b13b16644765977cd5310fe2)
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp@intel.com>
All errors (new ones prefixed by >>, old ones prefixed by <<):
>> drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c:124:2: error: implicit declaration of function 'module_firmware_crashed' [-Werror,-Wimplicit-function-declaration]
module_firmware_crashed();
^
1 error generated.
vim +/module_firmware_crashed +124 drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c
112
113 static int bnxt_fw_fatal_recover(struct devlink_health_reporter *reporter,
114 void *priv_ctx,
115 struct netlink_ext_ack *extack)
116 {
117 struct bnxt *bp = devlink_health_reporter_priv(reporter);
118 struct bnxt_fw_reporter_ctx *fw_reporter_ctx = priv_ctx;
119 unsigned long event;
120
121 if (!priv_ctx)
122 return -EOPNOTSUPP;
123
> 124 module_firmware_crashed();
125 bp->fw_health->fatal = true;
126 event = fw_reporter_ctx->sp_event;
127 if (event == BNXT_FW_RESET_NOTIFY_SP_EVENT)
128 bnxt_fw_reset(bp);
129 else if (event == BNXT_FW_EXCEPTION_SP_EVENT)
130 bnxt_fw_exception(bp);
131
132 return -EINPROGRESS;
133 }
134
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 73419 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2] bnxt_en: use new module_firmware_crashed()
@ 2020-05-16 13:30 ` kbuild test robot
0 siblings, 0 replies; 5+ messages in thread
From: kbuild test robot @ 2020-05-16 13:30 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 2572 bytes --]
Hi Vasundhara,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on sparc-next/master]
[also build test ERROR on linus/master v5.7-rc5 next-20200515]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Vasundhara-Volam/bnxt_en-use-new-module_firmware_crashed/20200516-163022
base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-next.git master
config: x86_64-allyesconfig (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project 13d44b2a0c7ef404b13b16644765977cd5310fe2)
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp@intel.com>
All errors (new ones prefixed by >>, old ones prefixed by <<):
>> drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c:124:2: error: implicit declaration of function 'module_firmware_crashed' [-Werror,-Wimplicit-function-declaration]
module_firmware_crashed();
^
1 error generated.
vim +/module_firmware_crashed +124 drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c
112
113 static int bnxt_fw_fatal_recover(struct devlink_health_reporter *reporter,
114 void *priv_ctx,
115 struct netlink_ext_ack *extack)
116 {
117 struct bnxt *bp = devlink_health_reporter_priv(reporter);
118 struct bnxt_fw_reporter_ctx *fw_reporter_ctx = priv_ctx;
119 unsigned long event;
120
121 if (!priv_ctx)
122 return -EOPNOTSUPP;
123
> 124 module_firmware_crashed();
125 bp->fw_health->fatal = true;
126 event = fw_reporter_ctx->sp_event;
127 if (event == BNXT_FW_RESET_NOTIFY_SP_EVENT)
128 bnxt_fw_reset(bp);
129 else if (event == BNXT_FW_EXCEPTION_SP_EVENT)
130 bnxt_fw_exception(bp);
131
132 return -EINPROGRESS;
133 }
134
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 73419 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-05-16 13:30 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-16 8:25 [PATCH v2] bnxt_en: use new module_firmware_crashed() Vasundhara Volam
2020-05-16 12:55 ` kbuild test robot
2020-05-16 12:55 ` kbuild test robot
2020-05-16 13:30 ` kbuild test robot
2020-05-16 13:30 ` kbuild test robot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.