Search Linux Wireless

Re: iwlwifi devices disappear after suspend on kernel 5.17

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2022-04-19 at 20:46 +0300, Grumbach, Emmanuel wrote:
> On Tue, 2022-04-19 at 13:33 +0200, Toke Høiland-Jørgensen wrote:
> > "Grumbach, Emmanuel" <emmanuel.grumbach@xxxxxxxxx> writes:
> > 
> > > On Tue, 2022-04-19 at 09:41 +0300, Grumbach, Emmanuel wrote:
> > > > Hi Toke,
> > > > 
> > > > On Tue, 2022-04-19 at 06:24 +0000, Coelho, Luciano wrote:
> > > > > On Mon, 2022-04-18 at 13:36 +0200, Toke Høiland-Jørgensen wrote:
> > > > > > Hi Luca
> > > > > 
> > > > > Hi Toke,
> > > > > 
> > > > > > I've started seeing issues with my iwlwifi interface going away after
> > > > > > suspend. I get errors like these in dmesg:
> > > > > > 
> > > > > > [104393.142264] wlan0: deauthenticating from 4c:60:de:ea:b8:58 by local choice (Reason:
> > > > > > 3=DEAUTH_LEAVING)
> > > > > > [104393.347775] iwlmei 0000:00:16.0-13280904-7792-4fcb-a1aa-5e70cbb1e865: Couldn't get
> > > > > > ACK
> > > > > > from
> > > > > > CSME on HOST_GOES_DOWN message
> > > > > > [104393.347876] iwlmei 0000:00:16.0-13280904-7792-4fcb-a1aa-5e70cbb1e865: failed to send
> > > > > > the
> > > > > > SAP_ME_MSG_CHECK_SHARED_AREA message -19
> > > > > > 
> > > > > > And when the host comes back up, there is no connectivity. Restarting
> > > > > > iwd fixes the problem.
> > > > > > 
> > > > > > This is on a 5.17.3 kernel (Arch Linux distribution kernel), and lspci
> > > > > > says the WiFi device is an "Intel Corporation Wi-Fi 6 AX201".
> > > > > > 
> > > > > > Any ideas? :)
> > > > > 
> > > > > This seems to be related to iwlmei, so I added Emmanuel to the thread.
> > > > > 
> > > > 
> > > > Can we have the full dmesg output?
> > > > What NIC / platform do you have?
> > > > Do you have AMT configured in the BIOS?
> > > > Did you enable wireless operation in AMT?
> > > 
> > > Ah - this is AX201, ok, but I still need the platform and thefull dmesg :-)
> > 
> > It's a Lenovo ThinkPad X1 Carbon Gen 9, model 20XXS3HC26; AMT is set to
> > "Disabled" in the BIOS. I rebooted and did a suspend/wake cycle after
> > connecting to the WiFi network, which produced the dmesg below.
> 
> Thanks.
> This is a Skylake platform and we didn't have a handshake with CSME which is not enabled. We are
> missing a check before we shut down iwlmei.

Hm... no, that seems to be 11th generation... so TigerLake?
But still, the fix below seems relevant.

> Can you check this?
> 
> diff --git a/drivers/net/wireless/intel/iwlwifi/mei/main.c
> b/drivers/net/wireless/intel/iwlwifi/mei/main.c
> index 8d61044a6ed3..7b45382c813c 100644
> --- a/drivers/net/wireless/intel/iwlwifi/mei/main.c
> +++ b/drivers/net/wireless/intel/iwlwifi/mei/main.c
> @@ -1923,29 +1923,33 @@ static void iwl_mei_remove(struct mei_cl_device *cldev)
>  
>         mutex_lock(&iwl_mei_mutex);
>  
> -       /*
> -        * Tell CSME that we are going down so that it won't access the
> -        * memory anymore, make sure this message goes through immediately.
> -        */
> -       mei->csa_throttled = false;
> -       iwl_mei_send_sap_msg(mei->cldev,
> -                            SAP_MSG_NOTIF_HOST_GOES_DOWN);
> +       if (iwl_mei_is_connected())
> +       {
> +               /*
> +                * Tell CSME that we are going down so that it won't access the
> +                * memory anymore, make sure this message goes through immediately.
> +                */
> +               mei->csa_throttled = false;
> +               iwl_mei_send_sap_msg(mei->cldev,
> +                                    SAP_MSG_NOTIF_HOST_GOES_DOWN);
>  
> -       for (i = 0; i < SEND_SAP_MAX_WAIT_ITERATION; i++) {
> -               if (!iwl_mei_host_to_me_data_pending(mei))
> -                       break;
> +               for (i = 0; i < SEND_SAP_MAX_WAIT_ITERATION; i++) {
> +                       if (!iwl_mei_host_to_me_data_pending(mei))
> +                               break;
>  
> -               msleep(5);
> -       }
> +                       msleep(5);
> +               }
>  
> -       /*
> -        * If we couldn't make sure that CSME saw the HOST_GOES_DOWN message,
> -        * it means that it will probably keep reading memory that we are going
> -        * to unmap and free, expect IOMMU error messages.
> -        */
> -       if (i == SEND_SAP_MAX_WAIT_ITERATION)
> -               dev_err(&mei->cldev->dev,
> -                       "Couldn't get ACK from CSME on HOST_GOES_DOWN message\n");
> +               /*
> +                * If we couldn't make sure that CSME saw the HOST_GOES_DOWN
> +                * message, it means that it will probably keep reading memory
> +                * that we are going to unmap and free, expect IOMMU error
> +                * messages.
> +                */
> +               if (i == SEND_SAP_MAX_WAIT_ITERATION)
> +                       dev_err(&mei->cldev->dev,
> +                               "Couldn't get ACK from CSME on HOST_GOES_DOWN message\n");
> +       }
>  
>         mutex_unlock(&iwl_mei_mutex);
>  
> 
> Although I think it'll just fix the error print and nothing more than this
> 





[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux