All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rui Salvaterra <rsalvaterra@gmail.com>
To: Emmanuel Grumbach <egrumbach@gmail.com>
Cc: Jakub Kicinski <kuba@kernel.org>,
	"Coelho, Luciano" <luciano.coelho@intel.com>,
	"Goodstein, Mordechay" <mordechay.goodstein@intel.com>,
	"Berg, Johannes" <johannes.berg@intel.com>,
	"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [BUG] iwlwifi: card unusable after firmware crash
Date: Wed, 9 Dec 2020 21:16:45 +0000	[thread overview]
Message-ID: <CALjTZvYfJVjxRO4Avc3rV+W+HO-vBABxwF=UUETzDeNv_QBbhg@mail.gmail.com> (raw)
In-Reply-To: <CANUX_P0sOAdRjOgg=ogAHmQdTXp5UKyW2XQQRComa4Rv3Y-toQ@mail.gmail.com>

Hi again, Emmanuel,

On Wed, 9 Dec 2020 at 21:07, Emmanuel Grumbach <egrumbach@gmail.com> wrote:
>
> Indeed, the bit is reverse logic. So we can put that aside.
> Frankly, I have no clue. You can try our backport tree to bisect,
> should be easier..
> What I see here is that your GP_CTRL value is 080003d8
>
> #define CSR_GP_CNTRL_REG_FLAG_HW_RF_KILL_SW          (0x08000000)
> which means sense since apparently, HW RF-Kill was asserted.
> #define CSR_GP_CNTRL_REG_FLAG_GOING_TO_SLEEP         (0x00000010)
> Which means that the device is going to sleep... And that's the problem:
>
> iwl_trans_pcie_grab_nic_access:
>         ret = iwl_poll_bit(trans, CSR_GP_CNTRL,
>                            CSR_GP_CNTRL_REG_VAL_MAC_ACCESS_EN,
>                            (CSR_GP_CNTRL_REG_FLAG_MAC_CLOCK_READY |
>                             CSR_GP_CNTRL_REG_FLAG_GOING_TO_SLEEP), 15000);
>         if (unlikely(ret < 0)) {
>                 u32 cntrl = iwl_read32(trans, CSR_GP_CNTRL);
>
>                 WARN_ONCE(1,
>                           "Timeout waiting for hardware access
> (CSR_GP_CNTRL 0x%08x)\n",
>                           cntrl);
>
> but I'd expect the splat in your log...
> Or maybe you can't load the firmware?

Well, my kernel doesn't have any modules, it's all built-in. The
firmware is obviously loading fine, otherwise the card wouldn't work,
but yeah, that WARN_ONCE hasn't triggered at all.

> Can you try this:
> diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/trans.c
> b/drivers/net/wireless/intel/iwlwifi/pcie/trans.c
> index 2fffbbc8462f..748300752630 100644
> --- a/drivers/net/wireless/intel/iwlwifi/pcie/trans.c
> +++ b/drivers/net/wireless/intel/iwlwifi/pcie/trans.c
> @@ -2121,6 +2121,7 @@ static bool
> iwl_trans_pcie_grab_nic_access(struct iwl_trans *trans,
>          * track nic_access anyway.
>          */
>         __release(&trans_pcie->reg_lock);
> +       mdelay(1);
>         return true;
>  }
>
> If that helps, then... I'd have no clue why it helps, but this
> specific device caused us trouble like bad timing after
> grab_nic_access..

I'll give it a spin. Nasty hack, but if it works, it works. :)

Thanks,
Rui

  reply	other threads:[~2020-12-09 21:18 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-08 11:27 [BUG] iwlwifi: card unusable after firmware crash Rui Salvaterra
2020-12-08 16:05 ` Jakub Kicinski
2020-12-08 23:09   ` Rui Salvaterra
2020-12-08 16:27 ` Coelho, Luciano
2020-12-08 23:17   ` Rui Salvaterra
2020-12-09 17:13     ` Jakub Kicinski
2020-12-09 20:02       ` Coelho, Luciano
2020-12-09 20:14       ` Rui Salvaterra
2020-12-09 20:32       ` Emmanuel Grumbach
2020-12-09 20:40         ` Emmanuel Grumbach
2020-12-09 20:41           ` Rui Salvaterra
2020-12-09 20:40         ` Rui Salvaterra
2020-12-09 20:47           ` Emmanuel Grumbach
2020-12-09 21:07             ` Emmanuel Grumbach
2020-12-09 21:16               ` Rui Salvaterra [this message]
2020-12-10 16:21                 ` Rui Salvaterra
2020-12-10 18:57                   ` Emmanuel Grumbach

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CALjTZvYfJVjxRO4Avc3rV+W+HO-vBABxwF=UUETzDeNv_QBbhg@mail.gmail.com' \
    --to=rsalvaterra@gmail.com \
    --cc=egrumbach@gmail.com \
    --cc=johannes.berg@intel.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=luciano.coelho@intel.com \
    --cc=mordechay.goodstein@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.