lkml.org 
[lkml]   [2018]   [Nov]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 4.14 051/143] iwlwifi: dbg: allow wrt collection before ALIVE
    Date
    4.14-stable review patch.  If anyone has any objections, please let me know.

    ------------------

    [ Upstream commit dfd4b08cf44f27587e2053e006e43a1603328006 ]

    Even if no ALIVE was received, the WRT data can still
    be collected. Add this.

    Signed-off-by: Liad Kaufman <liad.kaufman@intel.com>
    Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    ---
    drivers/net/wireless/intel/iwlwifi/fw/dbg.c | 15 ++++++++++++++-
    1 file changed, 14 insertions(+), 1 deletion(-)

    diff --git a/drivers/net/wireless/intel/iwlwifi/fw/dbg.c b/drivers/net/wireless/intel/iwlwifi/fw/dbg.c
    index 2fa7ec466275..839010417241 100644
    --- a/drivers/net/wireless/intel/iwlwifi/fw/dbg.c
    +++ b/drivers/net/wireless/intel/iwlwifi/fw/dbg.c
    @@ -950,7 +950,20 @@ int iwl_fw_dbg_collect_desc(struct iwl_fw_runtime *fwrt,
    if (trigger)
    delay = msecs_to_jiffies(le32_to_cpu(trigger->stop_delay));

    - if (WARN(fwrt->trans->state == IWL_TRANS_NO_FW,
    + /*
    + * If the loading of the FW completed successfully, the next step is to
    + * get the SMEM config data. Thus, if fwrt->smem_cfg.num_lmacs is non
    + * zero, the FW was already loaded successully. If the state is "NO_FW"
    + * in such a case - WARN and exit, since FW may be dead. Otherwise, we
    + * can try to collect the data, since FW might just not be fully
    + * loaded (no "ALIVE" yet), and the debug data is accessible.
    + *
    + * Corner case: got the FW alive but crashed before getting the SMEM
    + * config. In such a case, due to HW access problems, we might
    + * collect garbage.
    + */
    + if (WARN((fwrt->trans->state == IWL_TRANS_NO_FW) &&
    + fwrt->smem_cfg.num_lmacs,
    "Can't collect dbg data when FW isn't alive\n"))
    return -EIO;

    --
    2.17.1


    \
     
     \ /
      Last update: 2018-11-02 20:01    [W:4.083 / U:0.104 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site