net: wwan: iosm: allow trace port be uninitialized
authorSergey Ryazanov <ryazanov.s.a@gmail.com>
Tue, 7 Dec 2021 09:21:38 +0000 (12:21 +0300)
committerJakub Kicinski <kuba@kernel.org>
Thu, 9 Dec 2021 01:58:58 +0000 (17:58 -0800)
commit13b94fbaa28c64cebee5fcd43a9b5971e8591497
tree65e0f75ad88a696581a30ac8e7d4d5ce2808ceda
parente9877d4ef856c7e8c66e942baa94dd0dde09b787
net: wwan: iosm: allow trace port be uninitialized

Collecting modem firmware traces is optional for the regular modem use.
There are not many reasons for aborting device initialization due to an
inability to initialize the trace port and (or) its debugfs interface.
So, demote the initialization failure erro message into a warning and do
not break the initialization sequence in this case. Rework packet
processing and deinitialization so that they do not crash in case of
uninitialized trace port.

This change is mainly a preparation for an upcoming configuration option
introduction that will help disable driver debugfs functionality.

Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
Reviewed-by: Loic Poulain <loic.poulain@linaro.org>
Acked-by: M Chetan Kumar <m.chetan.kumar@intel.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/wwan/iosm/iosm_ipc_imem.c
drivers/net/wwan/iosm/iosm_ipc_trace.c
drivers/net/wwan/iosm/iosm_ipc_trace.h