[SRU] [F/G/Unstable/OEM-5.6] [PATCH 0/1] Fix system reboot when disconnecting WiFi

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

[SRU] [F/G/Unstable/OEM-5.6] [PATCH 0/1] Fix system reboot when disconnecting WiFi

Kai-Heng Feng
BugLink: https://bugs.launchpad.net/bugs/1899726

[Impact]
Hardware triggrs reboot when disconnecting WiFi connection.

[Fix]
There's a DMA bug in Intel WiFi 9000 needs to be limits to 6 RX queue
max.

[Test]
With the patch applied, a 1000 times of connect/disconnect loop doesn't
bring the system down.

[Regression Potential]
Not that I can think of. Hypothetically reducing RX queue rings will
reduce the RX speed, but the wireless transfter is a lot slower then DMA
operation, so we won't see any difference.

Mordechay Goodstein (1):
  iwlwifi: msix: limit max RX queues for 9000 family

 drivers/net/wireless/intel/iwlwifi/iwl-trans.h  | 1 +
 drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 6 +++++-
 2 files changed, 6 insertions(+), 1 deletion(-)

--
2.17.1


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

[PATCH 1/1] iwlwifi: msix: limit max RX queues for 9000 family

Kai-Heng Feng
From: Mordechay Goodstein <[hidden email]>

BugLink: https://bugs.launchpad.net/bugs/1899726

There is an issue in the HW DMA engine in the 9000 family of devices
when more than 6 RX queues are used.  The issue is that the FW may
hang when IWL_MVM_RXQ_NSSN_SYNC notifications are sent.

Fix this by limiting the number of RX queues to 6 in the 9000 family
of devices.

Signed-off-by: Mordechay Goodstein <[hidden email]>
Signed-off-by: Luca Coelho <[hidden email]>
Link: https://lore.kernel.org/r/iwlwifi.20200911204056.37d90f9ceb0c.I8dfe8a7d3a7ac9f0bc9d93e4a03f8165d8c999d2@changeid
Signed-off-by: Luca Coelho <[hidden email]>
(cherry picked from commit 0cd38f4d05299f5148c60db0234ea4db862c839b linux-next)
Signed-off-by: Kai-Heng Feng <[hidden email]>
---
 drivers/net/wireless/intel/iwlwifi/iwl-trans.h  | 1 +
 drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 6 +++++-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-trans.h b/drivers/net/wireless/intel/iwlwifi/iwl-trans.h
index 34788e7afc7b..32ea4c3c7d23 100644
--- a/drivers/net/wireless/intel/iwlwifi/iwl-trans.h
+++ b/drivers/net/wireless/intel/iwlwifi/iwl-trans.h
@@ -316,6 +316,7 @@ static inline void iwl_free_rxb(struct iwl_rx_cmd_buffer *r)
 #define IWL_MGMT_TID 15
 #define IWL_FRAME_LIMIT 64
 #define IWL_MAX_RX_HW_QUEUES 16
+#define IWL_9000_MAX_RX_HW_QUEUES 6
 
 /**
  * enum iwl_wowlan_status - WoWLAN image/device status
diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/trans.c b/drivers/net/wireless/intel/iwlwifi/pcie/trans.c
index e5160d620868..a59684e82713 100644
--- a/drivers/net/wireless/intel/iwlwifi/pcie/trans.c
+++ b/drivers/net/wireless/intel/iwlwifi/pcie/trans.c
@@ -1607,11 +1607,15 @@ iwl_pcie_set_interrupt_capa(struct pci_dev *pdev,
  struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans);
  int max_irqs, num_irqs, i, ret;
  u16 pci_cmd;
+ u32 max_rx_queues = IWL_MAX_RX_HW_QUEUES;
 
  if (!cfg_trans->mq_rx_supported)
  goto enable_msi;
 
- max_irqs = min_t(u32, num_online_cpus() + 2, IWL_MAX_RX_HW_QUEUES);
+ if (cfg_trans->device_family <= IWL_DEVICE_FAMILY_9000)
+ max_rx_queues = IWL_9000_MAX_RX_HW_QUEUES;
+
+ max_irqs = min_t(u32, num_online_cpus() + 2, max_rx_queues);
  for (i = 0; i < max_irqs; i++)
  trans_pcie->msix_entries[i].entry = i;
 
--
2.17.1


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

ACK: [PATCH 1/1] iwlwifi: msix: limit max RX queues for 9000 family

Stefan Bader-2
On 14.10.20 05:35, Kai-Heng Feng wrote:

> From: Mordechay Goodstein <[hidden email]>
>
> BugLink: https://bugs.launchpad.net/bugs/1899726
>
> There is an issue in the HW DMA engine in the 9000 family of devices
> when more than 6 RX queues are used.  The issue is that the FW may
> hang when IWL_MVM_RXQ_NSSN_SYNC notifications are sent.
>
> Fix this by limiting the number of RX queues to 6 in the 9000 family
> of devices.
>
> Signed-off-by: Mordechay Goodstein <[hidden email]>
> Signed-off-by: Luca Coelho <[hidden email]>
> Link: https://lore.kernel.org/r/iwlwifi.20200911204056.37d90f9ceb0c.I8dfe8a7d3a7ac9f0bc9d93e4a03f8165d8c999d2@changeid
> Signed-off-by: Luca Coelho <[hidden email]>
> (cherry picked from commit 0cd38f4d05299f5148c60db0234ea4db862c839b linux-next)
> Signed-off-by: Kai-Heng Feng <[hidden email]>
Acked-by: Stefan Bader <[hidden email]>

> ---
>  drivers/net/wireless/intel/iwlwifi/iwl-trans.h  | 1 +
>  drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 6 +++++-
>  2 files changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-trans.h b/drivers/net/wireless/intel/iwlwifi/iwl-trans.h
> index 34788e7afc7b..32ea4c3c7d23 100644
> --- a/drivers/net/wireless/intel/iwlwifi/iwl-trans.h
> +++ b/drivers/net/wireless/intel/iwlwifi/iwl-trans.h
> @@ -316,6 +316,7 @@ static inline void iwl_free_rxb(struct iwl_rx_cmd_buffer *r)
>  #define IWL_MGMT_TID 15
>  #define IWL_FRAME_LIMIT 64
>  #define IWL_MAX_RX_HW_QUEUES 16
> +#define IWL_9000_MAX_RX_HW_QUEUES 6
>  
>  /**
>   * enum iwl_wowlan_status - WoWLAN image/device status
> diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/trans.c b/drivers/net/wireless/intel/iwlwifi/pcie/trans.c
> index e5160d620868..a59684e82713 100644
> --- a/drivers/net/wireless/intel/iwlwifi/pcie/trans.c
> +++ b/drivers/net/wireless/intel/iwlwifi/pcie/trans.c
> @@ -1607,11 +1607,15 @@ iwl_pcie_set_interrupt_capa(struct pci_dev *pdev,
>   struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans);
>   int max_irqs, num_irqs, i, ret;
>   u16 pci_cmd;
> + u32 max_rx_queues = IWL_MAX_RX_HW_QUEUES;
>  
>   if (!cfg_trans->mq_rx_supported)
>   goto enable_msi;
>  
> - max_irqs = min_t(u32, num_online_cpus() + 2, IWL_MAX_RX_HW_QUEUES);
> + if (cfg_trans->device_family <= IWL_DEVICE_FAMILY_9000)
> + max_rx_queues = IWL_9000_MAX_RX_HW_QUEUES;
> +
> + max_irqs = min_t(u32, num_online_cpus() + 2, max_rx_queues);
>   for (i = 0; i < max_irqs; i++)
>   trans_pcie->msix_entries[i].entry = i;
>  
>


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team

signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

ACK: [PATCH 1/1] iwlwifi: msix: limit max RX queues for 9000 family

Seth Forshee
In reply to this post by Kai-Heng Feng
On Wed, Oct 14, 2020 at 11:35:23AM +0800, Kai-Heng Feng wrote:

> From: Mordechay Goodstein <[hidden email]>
>
> BugLink: https://bugs.launchpad.net/bugs/1899726
>
> There is an issue in the HW DMA engine in the 9000 family of devices
> when more than 6 RX queues are used.  The issue is that the FW may
> hang when IWL_MVM_RXQ_NSSN_SYNC notifications are sent.
>
> Fix this by limiting the number of RX queues to 6 in the 9000 family
> of devices.
>
> Signed-off-by: Mordechay Goodstein <[hidden email]>
> Signed-off-by: Luca Coelho <[hidden email]>
> Link: https://lore.kernel.org/r/iwlwifi.20200911204056.37d90f9ceb0c.I8dfe8a7d3a7ac9f0bc9d93e4a03f8165d8c999d2@changeid
> Signed-off-by: Luca Coelho <[hidden email]>
> (cherry picked from commit 0cd38f4d05299f5148c60db0234ea4db862c839b linux-next)
> Signed-off-by: Kai-Heng Feng <[hidden email]>

Acked-by: Seth Forshee <[hidden email]>

--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

APPLIED[G/Unstable]: [SRU] [F/G/Unstable/OEM-5.6] [PATCH 0/1] Fix system reboot when disconnecting WiFi

Seth Forshee
In reply to this post by Kai-Heng Feng
On Wed, Oct 14, 2020 at 11:35:22AM +0800, Kai-Heng Feng wrote:

> BugLink: https://bugs.launchpad.net/bugs/1899726
>
> [Impact]
> Hardware triggrs reboot when disconnecting WiFi connection.
>
> [Fix]
> There's a DMA bug in Intel WiFi 9000 needs to be limits to 6 RX queue
> max.
>
> [Test]
> With the patch applied, a 1000 times of connect/disconnect loop doesn't
> bring the system down.
>
> [Regression Potential]
> Not that I can think of. Hypothetically reducing RX queue rings will
> reduce the RX speed, but the wireless transfter is a lot slower then DMA
> operation, so we won't see any difference.

Applied to groovy/master-next and unstable/master, thanks!

--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

APPLIED [OEM-5.6] Re: [SRU] [F/G/Unstable/OEM-5.6] [PATCH 0/1] Fix system reboot when disconnecting WiFi

Timo Aaltonen-6
In reply to this post by Kai-Heng Feng
On 14.10.2020 6.35, Kai-Heng Feng wrote:

> BugLink: https://bugs.launchpad.net/bugs/1899726
>
> [Impact]
> Hardware triggrs reboot when disconnecting WiFi connection.
>
> [Fix]
> There's a DMA bug in Intel WiFi 9000 needs to be limits to 6 RX queue
> max.
>
> [Test]
> With the patch applied, a 1000 times of connect/disconnect loop doesn't
> bring the system down.
>
> [Regression Potential]
> Not that I can think of. Hypothetically reducing RX queue rings will
> reduce the RX speed, but the wireless transfter is a lot slower then DMA
> operation, so we won't see any difference.
>
> Mordechay Goodstein (1):
>    iwlwifi: msix: limit max RX queues for 9000 family
>
>   drivers/net/wireless/intel/iwlwifi/iwl-trans.h  | 1 +
>   drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 6 +++++-
>   2 files changed, 6 insertions(+), 1 deletion(-)
>

applied to oem-5.6, thanks

--
t

--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team