diff --git a/blacklist.conf b/blacklist.conf index 2a1803a..095402a 100644 --- a/blacklist.conf +++ b/blacklist.conf @@ -2707,3 +2707,7 @@ df6d4f9db79c1a5d6f48b59db35ccd1e9ff9adfc # 08529078d8d9 not present 6a2cbc58d6c9d90cd74288cc497c2b45815bc064 # our code never uses more than 8B, impact is incorrect output only 39f985c8f667c80a3d1eb19d31138032fa36b09e # we don't have c7510ab2cf5c ("mm: abstract out wake_page_match() from wake_page_function()") 910603818c6c0558fe9b5e056a3bd5195aaae1a5 # already applied +6bae9de622d3ef4805aba40e763eb4b0975c4f6d # utterly destroys kABI +4fa42adebe5b77215e50eaad701663c8702d3c88 # feature and interrupt mitigation +9cec1d547cb739f8bac2de833487116e0fe896d2 # irrelevant for our compiler version +68c5634c4a7278672a3bed00eb5646884257c413 # Greg's political wipeout of patches from unm.edu diff --git a/patches.kabi/struct-wmi_svc_avail_ev_arg-new-member-to-end.patch b/patches.kabi/struct-wmi_svc_avail_ev_arg-new-member-to-end.patch new file mode 100644 index 0000000..7a56cbf --- /dev/null +++ b/patches.kabi/struct-wmi_svc_avail_ev_arg-new-member-to-end.patch @@ -0,0 +1,34 @@ +From 5b6bd2f7ac7030c6614ddc9709b7a806fe3de7c2 Mon Sep 17 00:00:00 2001 +From: Oliver Neukum +Date: Mon, 17 Apr 2023 13:14:41 +0200 +Subject: [PATCH] struct wmi_svc_avail_ev_arg: new member to end +Patch-mainline: Never, kABI fixup +References: git-fixes + +Shifting the new flag to the end + +Signed-off-by: Oliver Neukum +--- + drivers/net/wireless/ath/ath10k/wmi.h | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/drivers/net/wireless/ath/ath10k/wmi.h b/drivers/net/wireless/ath/ath10k/wmi.h +index 1292f3235..4b56c37a6 100644 +--- a/drivers/net/wireless/ath/ath10k/wmi.h ++++ b/drivers/net/wireless/ath/ath10k/wmi.h +@@ -6713,9 +6713,11 @@ struct wmi_svc_rdy_ev_arg { + }; + + struct wmi_svc_avail_ev_arg { +- bool service_map_ext_valid; + __le32 service_map_ext_len; + const __le32 *service_map_ext; ++#ifndef __GENKSYMS__ ++ bool service_map_ext_valid; ++#endif + }; + + struct wmi_rdy_ev_arg { +-- +2.40.0 + diff --git a/patches.suse/ath10k-Fix-error-handling-in-case-of-CE-pipe-init-fa.patch b/patches.suse/ath10k-Fix-error-handling-in-case-of-CE-pipe-init-fa.patch new file mode 100644 index 0000000..af6c00e --- /dev/null +++ b/patches.suse/ath10k-Fix-error-handling-in-case-of-CE-pipe-init-fa.patch @@ -0,0 +1,45 @@ +From 31561e8557cd1eeba5806ac9ce820f8323b2201b Mon Sep 17 00:00:00 2001 +From: Rakesh Pillai +Date: Sat, 12 Dec 2020 00:30:10 +0530 +Subject: [PATCH] ath10k: Fix error handling in case of CE pipe init failure +Git-commit: 31561e8557cd1eeba5806ac9ce820f8323b2201b +References: git-fixes +Patch-mainline: v5.12-rc1 + +Currently if the copy engine pipe init fails for snoc based +chipsets, the rri is not freed. + +Fix this error handling for copy engine pipe init +failure. + +Tested-on: WCN3990 hw1.0 SNOC WLAN.HL.3.1-01040-QCAHLSWMTPLZ-1 + +Fixes: 4945af5b264f ("ath10k: enable SRRI/DRRI support on ddr for WCN3990") +Signed-off-by: Rakesh Pillai +Reviewed-by: Brian Norris +Signed-off-by: Kalle Valo +Link: https://lore.kernel.org/r/1607713210-18320-1-git-send-email-pillair@codeaurora.org +Signed-off-by: Oliver Neukum +--- + drivers/net/wireless/ath/ath10k/snoc.c | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +--- a/drivers/net/wireless/ath/ath10k/snoc.c ++++ b/drivers/net/wireless/ath/ath10k/snoc.c +@@ -789,13 +789,14 @@ static int ath10k_snoc_hif_power_up(stru + ret = ath10k_snoc_init_pipes(ar); + if (ret) { + ath10k_err(ar, "failed to initialize CE: %d\n", ret); +- goto err_wlan_enable; ++ goto err_free_rri; + } + + napi_enable(&ar->napi); + return 0; + +-err_wlan_enable: ++err_free_rri: ++ ath10k_ce_free_rri(ar); + ath10k_snoc_wlan_disable(ar); + + return ret; diff --git a/patches.suse/ath10k-Fix-the-parsing-error-in-service-available-ev.patch b/patches.suse/ath10k-Fix-the-parsing-error-in-service-available-ev.patch new file mode 100644 index 0000000..01bf380 --- /dev/null +++ b/patches.suse/ath10k-Fix-the-parsing-error-in-service-available-ev.patch @@ -0,0 +1,91 @@ +From c7cee9c0f499f27ec6de06bea664b61320534768 Mon Sep 17 00:00:00 2001 +From: Rakesh Pillai +Date: Tue, 24 Nov 2020 17:59:17 +0200 +Subject: [PATCH] ath10k: Fix the parsing error in service available event +Git-commit: c7cee9c0f499f27ec6de06bea664b61320534768 +References: git-fixes +Patch-mainline: v5.11-rc1 + +The wmi service available event has been +extended to contain extra 128 bit for new services +to be indicated by firmware. + +Currently the presence of any optional TLVs in +the wmi service available event leads to a parsing +error with the below error message: +ath10k_snoc 18800000.wifi: failed to parse svc_avail tlv: -71 + +The wmi service available event parsing should +not return error for the newly added optional TLV. +Fix this parsing for service available event message. + +Tested-on: WCN3990 hw1.0 SNOC WLAN.HL.3.2.2-00720-QCAHLSWMTPL-1 + +Fixes: cea19a6ce8bf ("ath10k: add WMI_SERVICE_AVAILABLE_EVENT support") +Signed-off-by: Rakesh Pillai +Reviewed-by: Douglas Anderson +Signed-off-by: Kalle Valo +Link: https://lore.kernel.org/r/1605501291-23040-1-git-send-email-pillair@codeaurora.org +Signed-off-by: Oliver Neukum +--- + drivers/net/wireless/ath/ath10k/wmi-tlv.c | 4 +++- + drivers/net/wireless/ath/ath10k/wmi.c | 9 +++++++-- + drivers/net/wireless/ath/ath10k/wmi.h | 1 + + 3 files changed, 11 insertions(+), 3 deletions(-) + +diff --git a/drivers/net/wireless/ath/ath10k/wmi-tlv.c b/drivers/net/wireless/ath/ath10k/wmi-tlv.c +index 932266d1111b..7b5834157fe5 100644 +--- a/drivers/net/wireless/ath/ath10k/wmi-tlv.c ++++ b/drivers/net/wireless/ath/ath10k/wmi-tlv.c +@@ -1401,13 +1401,15 @@ static int ath10k_wmi_tlv_svc_avail_parse(struct ath10k *ar, u16 tag, u16 len, + + switch (tag) { + case WMI_TLV_TAG_STRUCT_SERVICE_AVAILABLE_EVENT: ++ arg->service_map_ext_valid = true; + arg->service_map_ext_len = *(__le32 *)ptr; + arg->service_map_ext = ptr + sizeof(__le32); + return 0; + default: + break; + } +- return -EPROTO; ++ ++ return 0; + } + + static int ath10k_wmi_tlv_op_pull_svc_avail(struct ath10k *ar, +diff --git a/drivers/net/wireless/ath/ath10k/wmi.c b/drivers/net/wireless/ath/ath10k/wmi.c +index c521f0b27831..c491acebdb46 100644 +--- a/drivers/net/wireless/ath/ath10k/wmi.c ++++ b/drivers/net/wireless/ath/ath10k/wmi.c +@@ -5751,8 +5751,13 @@ void ath10k_wmi_event_service_available(struct ath10k *ar, struct sk_buff *skb) + ret); + } + +- ath10k_wmi_map_svc_ext(ar, arg.service_map_ext, ar->wmi.svc_map, +- __le32_to_cpu(arg.service_map_ext_len)); ++ /* ++ * Initialization of "arg.service_map_ext_valid" to ZERO is necessary ++ * for the below logic to work. ++ */ ++ if (arg.service_map_ext_valid) ++ ath10k_wmi_map_svc_ext(ar, arg.service_map_ext, ar->wmi.svc_map, ++ __le32_to_cpu(arg.service_map_ext_len)); + } + + static int ath10k_wmi_event_temperature(struct ath10k *ar, struct sk_buff *skb) +diff --git a/drivers/net/wireless/ath/ath10k/wmi.h b/drivers/net/wireless/ath/ath10k/wmi.h +index c32aabea8293..d870f7067cb7 100644 +--- a/drivers/net/wireless/ath/ath10k/wmi.h ++++ b/drivers/net/wireless/ath/ath10k/wmi.h +@@ -6919,6 +6919,7 @@ struct wmi_svc_rdy_ev_arg { + }; + + struct wmi_svc_avail_ev_arg { ++ bool service_map_ext_valid; + __le32 service_map_ext_len; + const __le32 *service_map_ext; + }; +-- +2.40.0 + diff --git a/patches.suse/ath10k-add-missing-error-return-code-in-ath10k_pci_p.patch b/patches.suse/ath10k-add-missing-error-return-code-in-ath10k_pci_p.patch new file mode 100644 index 0000000..6bf3fe5 --- /dev/null +++ b/patches.suse/ath10k-add-missing-error-return-code-in-ath10k_pci_p.patch @@ -0,0 +1,50 @@ +From e2783e2f39ba99178dedfc1646d5cc0979d1bab3 Mon Sep 17 00:00:00 2001 +From: Yang Yingliang +Date: Mon, 31 May 2021 17:41:28 +0300 +Subject: [PATCH] ath10k: add missing error return code in ath10k_pci_probe() +Git-commit: e2783e2f39ba99178dedfc1646d5cc0979d1bab3 +References: git-fixes +Patch-mainline: v5.14-rc1 + +When chip_id is not supported, the resources will be freed +on path err_unsupported, these resources will also be freed +when calling ath10k_pci_remove(), it will cause double free, +so return -ENODEV when it doesn't support the device with wrong +chip_id. + +Fixes: c0c378f9907c ("ath10k: remove target soc ps code") +Fixes: 7505f7c3ec1d ("ath10k: create a chip revision whitelist") +Fixes: f8914a14623a ("ath10k: restore QCA9880-AR1A (v1) detection") +Reported-by: Hulk Robot +Signed-off-by: Yang Yingliang +Signed-off-by: Kalle Valo +Link: https://lore.kernel.org/r/20210522105822.1091848-3-yangyingliang@huawei.com +Signed-off-by: Oliver Neukum +--- + drivers/net/wireless/ath/ath10k/pci.c | 3 +++ + 1 file changed, 3 insertions(+) + +--- a/drivers/net/wireless/ath/ath10k/pci.c ++++ b/drivers/net/wireless/ath/ath10k/pci.c +@@ -3630,18 +3630,21 @@ static int ath10k_pci_probe(struct pci_d + ret = ath10k_pci_chip_reset(ar); + if (ret) { + ath10k_err(ar, "failed to reset chip: %d\n", ret); ++ ret = -ENODEV; + goto err_free_irq; + } + + chip_id = ath10k_pci_soc_read32(ar, SOC_CHIP_ID_ADDRESS); + if (chip_id == 0xffffffff) { + ath10k_err(ar, "failed to get chip id\n"); ++ ret = -ENODEV; + goto err_free_irq; + } + + if (!ath10k_pci_chip_is_supported(pdev->device, chip_id)) { + ath10k_err(ar, "device %04x with chip_id %08x isn't supported\n", + pdev->device, chip_id); ++ ret = -ENODEV; + goto err_free_irq; + } + diff --git a/patches.suse/ath10k-fix-control-message-timeout.patch b/patches.suse/ath10k-fix-control-message-timeout.patch new file mode 100644 index 0000000..4d40be7 --- /dev/null +++ b/patches.suse/ath10k-fix-control-message-timeout.patch @@ -0,0 +1,38 @@ +From 5286132324230168d3fab6ffc16bfd7de85bdfb4 Mon Sep 17 00:00:00 2001 +From: Johan Hovold +Date: Mon, 25 Oct 2021 14:05:19 +0200 +Subject: [PATCH] ath10k: fix control-message timeout +Git-commit: 5286132324230168d3fab6ffc16bfd7de85bdfb4 +References: git-fixes +Patch-mainline: v5.16-rc1 + +USB control-message timeouts are specified in milliseconds and should +specifically not vary with CONFIG_HZ. + +Fixes: 4db66499df91 ("ath10k: add initial USB support") +Cc: stable@vger.kernel.org # 4.14 +Cc: Erik Stromdahl +Signed-off-by: Johan Hovold +Signed-off-by: Kalle Valo +Link: https://lore.kernel.org/r/20211025120522.6045-2-johan@kernel.org +Signed-off-by: Oliver Neukum +--- + drivers/net/wireless/ath/ath10k/usb.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drivers/net/wireless/ath/ath10k/usb.c b/drivers/net/wireless/ath/ath10k/usb.c +index 19b9c27e30e2..6d831b098cbb 100644 +--- a/drivers/net/wireless/ath/ath10k/usb.c ++++ b/drivers/net/wireless/ath/ath10k/usb.c +@@ -525,7 +525,7 @@ static int ath10k_usb_submit_ctrl_in(struct ath10k *ar, + req, + USB_DIR_IN | USB_TYPE_VENDOR | + USB_RECIP_DEVICE, value, index, buf, +- size, 2 * HZ); ++ size, 2000); + + if (ret < 0) { + ath10k_warn(ar, "Failed to read usb control message: %d\n", +-- +2.40.0 + diff --git a/patches.suse/ath10k-fix-division-by-zero-in-send-path.patch b/patches.suse/ath10k-fix-division-by-zero-in-send-path.patch new file mode 100644 index 0000000..a5fa366 --- /dev/null +++ b/patches.suse/ath10k-fix-division-by-zero-in-send-path.patch @@ -0,0 +1,47 @@ +From a006acb931317aad3a8dd41333ebb0453caf49b8 Mon Sep 17 00:00:00 2001 +From: Johan Hovold +Date: Wed, 27 Oct 2021 10:08:17 +0200 +Subject: [PATCH] ath10k: fix division by zero in send path +Git-commit: a006acb931317aad3a8dd41333ebb0453caf49b8 +References: git-fixes +Patch-mainline: v5.16-rc1 + +Add the missing endpoint max-packet sanity check to probe() to avoid +division by zero in ath10k_usb_hif_tx_sg() in case a malicious device +has broken descriptors (or when doing descriptor fuzz testing). + +Note that USB core will reject URBs submitted for endpoints with zero +wMaxPacketSize but that drivers doing packet-size calculations still +need to handle this (cf. commit 2548288b4fb0 ("USB: Fix: Don't skip +endpoint descriptors with maxpacket=0")). + +Fixes: 4db66499df91 ("ath10k: add initial USB support") +Cc: stable@vger.kernel.org # 4.14 +Cc: Erik Stromdahl +Signed-off-by: Johan Hovold +Signed-off-by: Kalle Valo +Link: https://lore.kernel.org/r/20211027080819.6675-2-johan@kernel.org +Signed-off-by: Oliver Neukum +--- + drivers/net/wireless/ath/ath10k/usb.c | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/drivers/net/wireless/ath/ath10k/usb.c b/drivers/net/wireless/ath/ath10k/usb.c +index 6d831b098cbb..3d98f19c6ec8 100644 +--- a/drivers/net/wireless/ath/ath10k/usb.c ++++ b/drivers/net/wireless/ath/ath10k/usb.c +@@ -853,6 +853,11 @@ static int ath10k_usb_setup_pipe_resources(struct ath10k *ar, + le16_to_cpu(endpoint->wMaxPacketSize), + endpoint->bInterval); + } ++ ++ /* Ignore broken descriptors. */ ++ if (usb_endpoint_maxp(endpoint) == 0) ++ continue; ++ + urbcount = 0; + + pipe_num = +-- +2.40.0 + diff --git a/patches.suse/ath10k-fix-memory-overwrite-of-the-WoWLAN-wakeup-pac.patch b/patches.suse/ath10k-fix-memory-overwrite-of-the-WoWLAN-wakeup-pac.patch new file mode 100644 index 0000000..2aac80f --- /dev/null +++ b/patches.suse/ath10k-fix-memory-overwrite-of-the-WoWLAN-wakeup-pac.patch @@ -0,0 +1,56 @@ +From e3fb3d4418fce5484dfe7995fcd94c18b10a431a Mon Sep 17 00:00:00 2001 +From: Wen Gong +Date: Mon, 10 Jan 2022 16:24:13 +0200 +Subject: [PATCH] ath10k: fix memory overwrite of the WoWLAN wakeup packet + pattern +Git-commit: e3fb3d4418fce5484dfe7995fcd94c18b10a431a +References: git-fixes +Patch-mainline: v5.18-rc1 + +In function ath10k_wow_convert_8023_to_80211(), it will do memcpy for +the new->pattern, and currently the new->pattern and new->mask is same +with the old, then the memcpy of new->pattern will also overwrite the +old->pattern, because the header format of new->pattern is 802.11, +its length is larger than the old->pattern which is 802.3. Then the +operation of "Copy frame body" will copy a mistake value because the +body memory has been overwrite when memcpy the new->pattern. + +Assign another empty value to new_pattern to avoid the overwrite issue. + +Tested-on: QCA6174 hw3.2 SDIO WLAN.RMH.4.4.1-00049 + +Fixes: fa3440fa2fa1 ("ath10k: convert wow pattern from 802.3 to 802.11") +Signed-off-by: Wen Gong +Signed-off-by: Kalle Valo +Link: https://lore.kernel.org/r/20211222031347.25463-1-quic_wgong@quicinc.com +Signed-off-by: Oliver Neukum +--- + drivers/net/wireless/ath/ath10k/wow.c | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) + +diff --git a/drivers/net/wireless/ath/ath10k/wow.c b/drivers/net/wireless/ath/ath10k/wow.c +index 7d65c115669f..20b9aa8ddf7d 100644 +--- a/drivers/net/wireless/ath/ath10k/wow.c ++++ b/drivers/net/wireless/ath/ath10k/wow.c +@@ -337,14 +337,15 @@ static int ath10k_vif_wow_set_wakeups(struct ath10k_vif *arvif, + if (patterns[i].mask[j / 8] & BIT(j % 8)) + bitmask[j] = 0xff; + old_pattern.mask = bitmask; +- new_pattern = old_pattern; + + if (ar->wmi.rx_decap_mode == ATH10K_HW_TXRX_NATIVE_WIFI) { +- if (patterns[i].pkt_offset < ETH_HLEN) ++ if (patterns[i].pkt_offset < ETH_HLEN) { + ath10k_wow_convert_8023_to_80211(&new_pattern, + &old_pattern); +- else ++ } else { ++ new_pattern = old_pattern; + new_pattern.pkt_offset += WOW_HDR_LEN - ETH_HLEN; ++ } + } + + if (WARN_ON(new_pattern.pattern_len > WOW_MAX_PATTERN_SIZE)) +-- +2.40.0 + diff --git a/patches.suse/iwlwifi-Fix-EIO-error-code-that-is-never-returned.patch b/patches.suse/iwlwifi-Fix-EIO-error-code-that-is-never-returned.patch new file mode 100644 index 0000000..cb1871b --- /dev/null +++ b/patches.suse/iwlwifi-Fix-EIO-error-code-that-is-never-returned.patch @@ -0,0 +1,38 @@ +From c305c94bdc18e45b5ad1db54da4269f8cbfdff6b Mon Sep 17 00:00:00 2001 +From: Colin Ian King +Date: Tue, 7 Sep 2021 11:46:58 +0100 +Subject: [PATCH] iwlwifi: Fix -EIO error code that is never returned +Git-commit: c305c94bdc18e45b5ad1db54da4269f8cbfdff6b +References: git-fixes +Patch-mainline: v5.18-rc1 + +Currently the error -EIO is being assinged to variable ret when +the READY_BIT is not set but the function iwlagn_mac_start returns +0 rather than ret. Fix this by returning ret instead of 0. + +Addresses-Coverity: ("Unused value") +Fixes: 7335613ae27a ("iwlwifi: move all mac80211 related functions to one place") +Signed-off-by: Colin Ian King +Link: https://lore.kernel.org/r/20210907104658.14706-1-colin.king@canonical.com +Signed-off-by: Luca Coelho +Signed-off-by: Oliver Neukum +--- + drivers/net/wireless/intel/iwlwifi/dvm/mac80211.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drivers/net/wireless/intel/iwlwifi/dvm/mac80211.c b/drivers/net/wireless/intel/iwlwifi/dvm/mac80211.c +index 754876cd27ce..e8bd4f0e3d2d 100644 +--- a/drivers/net/wireless/intel/iwlwifi/dvm/mac80211.c ++++ b/drivers/net/wireless/intel/iwlwifi/dvm/mac80211.c +@@ -299,7 +299,7 @@ static int iwlagn_mac_start(struct ieee80211_hw *hw) + + priv->is_open = 1; + IWL_DEBUG_MAC80211(priv, "leave\n"); +- return 0; ++ return ret; + } + + static void iwlagn_mac_stop(struct ieee80211_hw *hw) +-- +2.40.0 + diff --git a/patches.suse/iwlwifi-fw-make-pos-static-in-iwl_sar_get_ewrd_table.patch b/patches.suse/iwlwifi-fw-make-pos-static-in-iwl_sar_get_ewrd_table.patch new file mode 100644 index 0000000..4ff0e5a --- /dev/null +++ b/patches.suse/iwlwifi-fw-make-pos-static-in-iwl_sar_get_ewrd_table.patch @@ -0,0 +1,47 @@ +From fb3c06cfda0db68f6082f05c43d63c1fb1761af0 Mon Sep 17 00:00:00 2001 +From: Luca Coelho +Date: Mon, 23 Dec 2019 13:00:59 +0200 +Subject: [PATCH] iwlwifi: fw: make pos static in iwl_sar_get_ewrd_table() loop +Git-commit: fb3c06cfda0db68f6082f05c43d63c1fb1761af0 +References: git-fixes +Patch-mainline: v5.5 + +In the for loop where we are supposed to go through the entire table, +we are using a non-static local to keep the pos index. This makes +each iteration start with 3, so we always access the first item on the +table. Fix this by moving the variable outside of the loo so it +doesn't lose its value at every iteration. + +Reported-by: Colin Ian King +Signed-off-by: Luca Coelho +Fixes: ba3224db7803 ("iwlwifi: mvm: fix an out-of-bound access") +Signed-off-by: Luca Coelho +Signed-off-by: Oliver Neukum +--- + drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 7 +++---- + 1 file changed, 3 insertions(+), 4 deletions(-) + +--- a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c ++++ b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c +@@ -690,7 +690,7 @@ static int iwl_mvm_sar_get_ewrd_table(st + { + union acpi_object *wifi_pkg, *data; + bool enabled; +- int i, n_profiles, ret; ++ int i, n_profiles, ret, pos; + + data = iwl_acpi_get_object(mvm->dev, ACPI_EWRD_METHOD); + if (IS_ERR(data)) +@@ -722,10 +722,9 @@ static int iwl_mvm_sar_get_ewrd_table(st + goto out_free; + } + ++ /* the tables start at element 3 */ ++ pos = 3; + for (i = 0; i < n_profiles; i++) { +- /* the tables start at element 3 */ +- int pos = 3; +- + /* The EWRD profiles officially go from 2 to 4, but we + * save them in sar_profiles[1-3] (because we don't + * have profile 0). So in the array we start from 1. diff --git a/patches.suse/iwlwifi-pcie-fix-locking-when-HW-not-ready.patch b/patches.suse/iwlwifi-pcie-fix-locking-when-HW-not-ready.patch new file mode 100644 index 0000000..51f3ef5 --- /dev/null +++ b/patches.suse/iwlwifi-pcie-fix-locking-when-HW-not-ready.patch @@ -0,0 +1,38 @@ +From e9848aed147708a06193b40d78493b0ef6abccf2 Mon Sep 17 00:00:00 2001 +From: Johannes Berg +Date: Fri, 28 Jan 2022 14:30:52 +0200 +Subject: [PATCH] iwlwifi: pcie: fix locking when "HW not ready" +Git-commit: e9848aed147708a06193b40d78493b0ef6abccf2 +References: git-fixes +Patch-mainline: v5.17-rc5 + +If we run into this error path, we shouldn't unlock the mutex +since it's not locked since. Fix this. + +Fixes: a6bd005fe92d ("iwlwifi: pcie: fix RF-Kill vs. firmware load race") +Signed-off-by: Johannes Berg +Signed-off-by: Luca Coelho +Signed-off-by: Kalle Valo +Link: https://lore.kernel.org/r/iwlwifi.20220128142706.5d16821d1433.Id259699ddf9806459856d6aefbdbe54477aecffd@changeid +Signed-off-by: Oliver Neukum +--- + drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/trans.c b/drivers/net/wireless/intel/iwlwifi/pcie/trans.c +index a63386a01232..ef14584fc0a1 100644 +--- a/drivers/net/wireless/intel/iwlwifi/pcie/trans.c ++++ b/drivers/net/wireless/intel/iwlwifi/pcie/trans.c +@@ -1329,8 +1329,7 @@ static int iwl_trans_pcie_start_fw(struct iwl_trans *trans, + /* This may fail if AMT took ownership of the device */ + if (iwl_pcie_prepare_card_hw(trans)) { + IWL_WARN(trans, "Exit HW not ready\n"); +- ret = -EIO; +- goto out; ++ return -EIO; + } + + iwl_enable_rfkill_int(trans); +-- +2.40.0 + diff --git a/patches.suse/iwlwifi-pcie-gen2-fix-locking-when-HW-not-ready.patch b/patches.suse/iwlwifi-pcie-gen2-fix-locking-when-HW-not-ready.patch new file mode 100644 index 0000000..e4833e0 --- /dev/null +++ b/patches.suse/iwlwifi-pcie-gen2-fix-locking-when-HW-not-ready.patch @@ -0,0 +1,38 @@ +From 4c29c1e27a1e178a219b3877d055e6dd643bdfda Mon Sep 17 00:00:00 2001 +From: Johannes Berg +Date: Fri, 28 Jan 2022 14:30:53 +0200 +Subject: [PATCH] iwlwifi: pcie: gen2: fix locking when "HW not ready" +Git-commit: 4c29c1e27a1e178a219b3877d055e6dd643bdfda +References: git-fixes +Patch-mainline: v5.17-rc5 + +If we run into this error path, we shouldn't unlock the mutex +since it's not locked since. Fix this in the gen2 code as well. + +Fixes: eda50cde58de ("iwlwifi: pcie: add context information support") +Signed-off-by: Johannes Berg +Signed-off-by: Luca Coelho +Signed-off-by: Kalle Valo +Link: https://lore.kernel.org/r/iwlwifi.20220128142706.b8b0dfce16ef.Ie20f0f7b23e5911350a2766524300d2915e7b677@changeid +Signed-off-by: Oliver Neukum +--- + drivers/net/wireless/intel/iwlwifi/pcie/trans-gen2.c | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/trans-gen2.c b/drivers/net/wireless/intel/iwlwifi/pcie/trans-gen2.c +index 0febdcacbd42..94f40c4d2421 100644 +--- a/drivers/net/wireless/intel/iwlwifi/pcie/trans-gen2.c ++++ b/drivers/net/wireless/intel/iwlwifi/pcie/trans-gen2.c +@@ -385,8 +385,7 @@ int iwl_trans_pcie_gen2_start_fw(struct iwl_trans *trans, + /* This may fail if AMT took ownership of the device */ + if (iwl_pcie_prepare_card_hw(trans)) { + IWL_WARN(trans, "Exit HW not ready\n"); +- ret = -EIO; +- goto out; ++ return -EIO; + } + + iwl_enable_rfkill_int(trans); +-- +2.40.0 + diff --git a/patches.suse/iwlwifi-pcie-reschedule-in-long-running-memory-reads.patch b/patches.suse/iwlwifi-pcie-reschedule-in-long-running-memory-reads.patch new file mode 100644 index 0000000..eddc78e --- /dev/null +++ b/patches.suse/iwlwifi-pcie-reschedule-in-long-running-memory-reads.patch @@ -0,0 +1,63 @@ +From 3d372c4edfd4dffb7dea71c6b096fb414782b776 Mon Sep 17 00:00:00 2001 +From: Johannes Berg +Date: Fri, 15 Jan 2021 13:05:58 +0200 +Subject: [PATCH] iwlwifi: pcie: reschedule in long-running memory reads +Git-commit: 3d372c4edfd4dffb7dea71c6b096fb414782b776 +References: git-fixes +Patch-mainline: v5.11-rc6 + +If we spin for a long time in memory reads that (for some reason in +hardware) take a long time, then we'll eventually get messages such +as + + watchdog: BUG: soft lockup - CPU#2 stuck for 24s! [kworker/2:2:272] + +This is because the reading really does take a very long time, and +we don't schedule, so we're hogging the CPU with this task, at least +if CONFIG_PREEMPT is not set, e.g. with CONFIG_PREEMPT_VOLUNTARY=y. + +Previously I misinterpreted the situation and thought that this was +only going to happen if we had interrupts disabled, and then fixed +this (which is good anyway, however), but that didn't always help; +looking at it again now I realized that the spin unlock will only +reschedule if CONFIG_PREEMPT is used. + +In order to avoid this issue, change the code to cond_resched() if +we've been spinning for too long here. + +Signed-off-by: Johannes Berg +Fixes: 04516706bb99 ("iwlwifi: pcie: limit memory read spin time") +Signed-off-by: Luca Coelho +Signed-off-by: Kalle Valo +Link: https://lore.kernel.org/r/iwlwifi.20210115130253.217a9d6a6a12.If964cb582ab0aaa94e81c4ff3b279eaafda0fd3f@changeid +Signed-off-by: Oliver Neukum +--- + drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +--- a/drivers/net/wireless/intel/iwlwifi/pcie/trans.c ++++ b/drivers/net/wireless/intel/iwlwifi/pcie/trans.c +@@ -2133,6 +2133,7 @@ static int iwl_trans_pcie_read_mem(struc + u32 *vals = buf; + + while (offs < dwords) { ++ bool resched = false; + /* limit the time we spin here under lock to 1/2s */ + ktime_t timeout = ktime_add_us(ktime_get(), 500 * USEC_PER_MSEC); + +@@ -2149,10 +2150,14 @@ static int iwl_trans_pcie_read_mem(struc + * do it once in 128 reads + */ + if (offs % 128 == 0 && ktime_after(ktime_get(), +- timeout)) ++ timeout)) { ++ resched = true; + break; ++ } + } + iwl_trans_release_nic_access(trans, &flags); ++ if (resched) ++ cond_resched(); + } else { + return -EBUSY; + } diff --git a/series.conf b/series.conf index 07524d3..f3067cf 100644 --- a/series.conf +++ b/series.conf @@ -54750,6 +54750,7 @@ patches.suse/tun-add-mutex_unlock-call-and-napi.skb-clearing-in-t.patch patches.suse/libertas-Fix-two-buffer-overflows-at-parsing-bss-des.patch patches.suse/iwlwifi-mvm-fix-NVM-check-for-3168-devices.patch + patches.suse/iwlwifi-fw-make-pos-static-in-iwl_sar_get_ewrd_table.patch patches.suse/0004-net-sonic-Add-mutual-exclusion-for-accessing-shared-.patch patches.suse/net_sched-fix-datalen-for-ematch.patch patches.suse/net-cxgb3_main-Add-CAP_NET_ADMIN-check-to-CHELSIO_GE.patch @@ -59076,6 +59077,7 @@ patches.suse/orinoco-Move-context-allocation-after-processing-the.patch patches.suse/cw1200-fix-missing-destroy_workqueue-on-error-in-cw1.patch patches.suse/ath6kl-fix-enum-conversion-warning.patch + patches.suse/ath10k-Fix-the-parsing-error-in-service-available-ev.patch patches.suse/ath10k-Fix-an-error-handling-path.patch patches.suse/ath10k-Release-some-resources-in-an-error-handling-p.patch patches.suse/ibmvnic-add-some-debugs.patch @@ -59542,6 +59544,7 @@ patches.suse/NFC-fix-possible-resource-leak.patch patches.suse/NFC-fix-resource-leak-when-target-index-is-invalid.patch patches.suse/mt7601u-fix-rx-buffer-refcounting.patch + patches.suse/iwlwifi-pcie-reschedule-in-long-running-memory-reads.patch patches.suse/team-protect-features-update-by-RCU-to-avoid-deadloc.patch patches.suse/igc-fix-link-speed-advertising.patch patches.suse/can-dev-prevent-potential-information-leak-in-can_fi.patch @@ -59610,6 +59613,7 @@ patches.suse/vmxnet3-Remove-buf_info-from-device-accessible-struc.patch patches.suse/ibmvnic-rework-to-ensure-SCRQ-entry-reads-are-proper.patch patches.suse/ibmvnic-remove-unnecessary-rmb-inside-ibmvnic_poll.patch + patches.suse/ath10k-Fix-error-handling-in-case-of-CE-pipe-init-fa.patch patches.suse/ath-Use-safer-key-clearing-with-key-cache-entries.patch patches.suse/ath9k-Clear-key-cache-explicitly-on-disabling-hardwa.patch patches.suse/ath-Export-ath_hw_keysetmac.patch @@ -60912,6 +60916,7 @@ patches.suse/wl1251-Fix-possible-buffer-overflow-in-wl1251_cmd_sc.patch patches.suse/cw1200-add-missing-MODULE_DEVICE_TABLE.patch patches.suse/ath9k-Fix-kernel-NULL-pointer-dereference-during-ath.patch + patches.suse/ath10k-add-missing-error-return-code-in-ath10k_pci_p.patch patches.suse/wireless-carl9170-fix-LEDS-build-errors-warnings.patch patches.suse/wcn36xx-Move-hal_buf-allocation-to-devm_kmalloc-in-p.patch patches.suse/ath10k-Fix-an-error-code-in-ath10k_add_interface.patch @@ -61743,7 +61748,9 @@ patches.suse/libertas-Fix-possible-memory-leak-in-probe-and-disco.patch patches.suse/wcn36xx-Fix-HT40-capability-for-2Ghz-band.patch patches.suse/wcn36xx-add-proper-DMA-memory-barriers-in-rx-path.patch + patches.suse/ath10k-fix-control-message-timeout.patch patches.suse/ath6kl-fix-control-message-timeout.patch + patches.suse/ath10k-fix-division-by-zero-in-send-path.patch patches.suse/ath6kl-fix-division-by-zero-in-send-path.patch patches.suse/rtl8187-fix-control-message-timeouts.patch patches.suse/msft-hv-2473-net-mana-Fix-the-netdev_err-s-vPort-argument-in-mana.patch @@ -62185,6 +62192,8 @@ patches.suse/cifs-mark-sessions-for-reconnection-in-helper-function.patch patches.suse/msft-hv-2522-PCI-hv-Fix-NUMA-node-assignment-when-kernel-boots-wi.patch patches.suse/mmc-block-fix-read-single-on-recovery-logic.patch + patches.suse/iwlwifi-pcie-fix-locking-when-HW-not-ready.patch + patches.suse/iwlwifi-pcie-gen2-fix-locking-when-HW-not-ready.patch patches.suse/net_sched-add-__rcu-annotation-to-netdev-qdisc.patch patches.suse/USB-zaurus-support-another-broken-Zaurus.patch patches.suse/net-usb-cdc_mbim-avoid-altsetting-toggling-for-Teli2.patch @@ -62290,6 +62299,7 @@ patches.suse/msft-hv-2523-net-mana-Add-handling-of-CQE_RX_TRUNCATED.patch patches.suse/msft-hv-2524-net-mana-Remove-unnecessary-check-of-cqe_type-in-man.patch patches.suse/net-asix-add-proper-error-handling-of-usb-read-error.patch + patches.suse/ath10k-fix-memory-overwrite-of-the-WoWLAN-wakeup-pac.patch patches.suse/ath5k-fix-OOB-in-ath5k_eeprom_read_pcal_info_5111.patch patches.suse/net-ibmvnic-Cleanup-workaround-doing-an-EOI-after-pa.patch patches.suse/ipv6-annotate-some-data-races-around-sk-sk_prot.patch @@ -62298,6 +62308,7 @@ patches.suse/ixgbe-add-the-ability-for-the-PF-to-disable-VF-link-.patch patches.suse/ixgbe-add-improvement-for-MDD-response-functionality.patch patches.suse/ixgbevf-add-disable-link-state.patch + patches.suse/iwlwifi-Fix-EIO-error-code-that-is-never-returned.patch patches.suse/msft-hv-2552-net-netvsc-remove-break-after-return.patch patches.suse/drivers-net-xgene-Fix-regression-in-CRC-stripping.patch patches.suse/llc-fix-netdevice-reference-leaks-in-llc_ui_bind.patch @@ -64226,6 +64237,7 @@ patches.kabi/NFS-Pass-error-information-to-the-pgio-error-cleanup.patch patches.kabi/PCI-endpoint-Fix-for-concurrent-memory-allocation-in.patch patches.kabi/intel_pmc_ipc-restore-ability-to-call-functions-with.patch + patches.kabi/struct-wmi_svc_avail_ev_arg-new-member-to-end.patch ######################################################## # You'd better have a good reason for adding a patch