From: Greg Kroah-Hartman Date: Fri, 29 Mar 2024 09:44:31 +0000 (+0100) Subject: 6.6-stable patches X-Git-Tag: v6.7.12~182 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=521c56a064281c6825b822b5b5e5a4b0b5e881ca;p=thirdparty%2Fkernel%2Fstable-queue.git 6.6-stable patches added patches: asoc-amd-yc-revert-fix-non-functional-mic-on-lenovo-21j2.patch wifi-iwlwifi-pcie-fix-rb-status-reading.patch wifi-rtw88-8821cu-fix-connection-failure.patch --- diff --git a/queue-6.6/asoc-amd-yc-revert-fix-non-functional-mic-on-lenovo-21j2.patch b/queue-6.6/asoc-amd-yc-revert-fix-non-functional-mic-on-lenovo-21j2.patch new file mode 100644 index 00000000000..c0b3ed3cd67 --- /dev/null +++ b/queue-6.6/asoc-amd-yc-revert-fix-non-functional-mic-on-lenovo-21j2.patch @@ -0,0 +1,52 @@ +From 861b3415e4dee06cc00cd1754808a7827b9105bf Mon Sep 17 00:00:00 2001 +From: Jiawei Wang +Date: Wed, 13 Mar 2024 09:58:52 +0800 +Subject: ASoC: amd: yc: Revert "Fix non-functional mic on Lenovo 21J2" + +From: Jiawei Wang + +commit 861b3415e4dee06cc00cd1754808a7827b9105bf upstream. + +This reverts commit ed00a6945dc32462c2d3744a3518d2316da66fcc, +which added a quirk entry to enable the Yellow Carp (YC) +driver for the Lenovo 21J2 laptop. + +Although the microphone functioned with the YC driver, it +resulted in incorrect driver usage. The Lenovo 21J2 is not a +Yellow Carp platform, but a Pink Sardine platform, which +already has an upstreamed driver. + +The microphone on the Lenovo 21J2 operates correctly with the +CONFIG_SND_SOC_AMD_PS flag enabled and does not require the +quirk entry. So this patch removes the quirk entry. + +Thanks to Mukunda Vijendar [1] for pointing this out. + +Link: https://lore.kernel.org/linux-sound/023092e1-689c-4b00-b93f-4092c3724fb6@amd.com/ [1] + +Signed-off-by: Jiawei Wang +Link: https://lore.kernel.org/linux-sound/023092e1-689c-4b00-b93f-4092c3724fb6@amd.com/ [1] +Link: https://msgid.link/r/20240313015853.3573242-2-me@jwang.link +Signed-off-by: Mark Brown +Cc: Luca Stefani +Signed-off-by: Greg Kroah-Hartman +--- + sound/soc/amd/yc/acp6x-mach.c | 7 ------- + 1 file changed, 7 deletions(-) + +--- a/sound/soc/amd/yc/acp6x-mach.c ++++ b/sound/soc/amd/yc/acp6x-mach.c +@@ -203,13 +203,6 @@ static const struct dmi_system_id yc_acp + .driver_data = &acp6x_card, + .matches = { + DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"), +- DMI_MATCH(DMI_PRODUCT_NAME, "21J2"), +- } +- }, +- { +- .driver_data = &acp6x_card, +- .matches = { +- DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"), + DMI_MATCH(DMI_PRODUCT_NAME, "21J0"), + } + }, diff --git a/queue-6.6/series b/queue-6.6/series index 6abffd99d23..40b8e88f496 100644 --- a/queue-6.6/series +++ b/queue-6.6/series @@ -247,3 +247,6 @@ iio-imu-inv_mpu6050-fix-fifo-parsing-when-empty.patch drm-i915-don-t-explode-when-the-dig-port-we-don-t-have-an-aux-ch.patch drm-amd-display-handle-range-offsets-in-vrr-ranges.patch x86-efistub-call-mixed-mode-boot-services-on-the-firmware-s-stack.patch +asoc-amd-yc-revert-fix-non-functional-mic-on-lenovo-21j2.patch +wifi-iwlwifi-pcie-fix-rb-status-reading.patch +wifi-rtw88-8821cu-fix-connection-failure.patch diff --git a/queue-6.6/wifi-iwlwifi-pcie-fix-rb-status-reading.patch b/queue-6.6/wifi-iwlwifi-pcie-fix-rb-status-reading.patch new file mode 100644 index 00000000000..508e8f8b126 --- /dev/null +++ b/queue-6.6/wifi-iwlwifi-pcie-fix-rb-status-reading.patch @@ -0,0 +1,100 @@ +From 9f9797c7de18d2ec6be4ef6e0abbaea585040b39 Mon Sep 17 00:00:00 2001 +From: Johannes Berg +Date: Wed, 30 Aug 2023 11:31:03 +0300 +Subject: wifi: iwlwifi: pcie: fix RB status reading + +From: Johannes Berg + +commit 9f9797c7de18d2ec6be4ef6e0abbaea585040b39 upstream. + +On newer hardware, a queue's RB status / write pointer +can be bigger than 4095 (0xFFF), so we cannot mask the +value by 0xFFF unconditionally. Since anyway that's +only necessary on older hardware, move the masking to +the helper function and apply it only for older HW. +This also moves the endian conversion in to handle it +more easily. + +Signed-off-by: Johannes Berg +Signed-off-by: Gregory Greenman +Link: https://lore.kernel.org/r/20230830112059.7be2a3fff6f4.I94f11dee314a4f7c1941d2d223936b1fa8aa9ee4@changeid +Signed-off-by: Johannes Berg +Signed-off-by: Aaron Ma +Signed-off-by: Greg Kroah-Hartman +--- + drivers/net/wireless/intel/iwlwifi/pcie/internal.h | 8 ++++---- + drivers/net/wireless/intel/iwlwifi/pcie/rx.c | 2 +- + drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 12 ++++-------- + 3 files changed, 9 insertions(+), 13 deletions(-) + +--- a/drivers/net/wireless/intel/iwlwifi/pcie/internal.h ++++ b/drivers/net/wireless/intel/iwlwifi/pcie/internal.h +@@ -190,17 +190,17 @@ struct iwl_rb_allocator { + * iwl_get_closed_rb_stts - get closed rb stts from different structs + * @rxq - the rxq to get the rb stts from + */ +-static inline __le16 iwl_get_closed_rb_stts(struct iwl_trans *trans, +- struct iwl_rxq *rxq) ++static inline u16 iwl_get_closed_rb_stts(struct iwl_trans *trans, ++ struct iwl_rxq *rxq) + { + if (trans->trans_cfg->device_family >= IWL_DEVICE_FAMILY_AX210) { + __le16 *rb_stts = rxq->rb_stts; + +- return READ_ONCE(*rb_stts); ++ return le16_to_cpu(READ_ONCE(*rb_stts)); + } else { + struct iwl_rb_status *rb_stts = rxq->rb_stts; + +- return READ_ONCE(rb_stts->closed_rb_num); ++ return le16_to_cpu(READ_ONCE(rb_stts->closed_rb_num)) & 0xFFF; + } + } + +--- a/drivers/net/wireless/intel/iwlwifi/pcie/rx.c ++++ b/drivers/net/wireless/intel/iwlwifi/pcie/rx.c +@@ -1510,7 +1510,7 @@ restart: + spin_lock(&rxq->lock); + /* uCode's read index (stored in shared DRAM) indicates the last Rx + * buffer that the driver may process (last buffer filled by ucode). */ +- r = le16_to_cpu(iwl_get_closed_rb_stts(trans, rxq)) & 0x0FFF; ++ r = iwl_get_closed_rb_stts(trans, rxq); + i = rxq->read; + + /* W/A 9000 device step A0 wrap-around bug */ +--- a/drivers/net/wireless/intel/iwlwifi/pcie/trans.c ++++ b/drivers/net/wireless/intel/iwlwifi/pcie/trans.c +@@ -2714,11 +2714,9 @@ static ssize_t iwl_dbgfs_rx_queue_read(s + pos += scnprintf(buf + pos, bufsz - pos, "\tfree_count: %u\n", + rxq->free_count); + if (rxq->rb_stts) { +- u32 r = __le16_to_cpu(iwl_get_closed_rb_stts(trans, +- rxq)); ++ u32 r = iwl_get_closed_rb_stts(trans, rxq); + pos += scnprintf(buf + pos, bufsz - pos, +- "\tclosed_rb_num: %u\n", +- r & 0x0FFF); ++ "\tclosed_rb_num: %u\n", r); + } else { + pos += scnprintf(buf + pos, bufsz - pos, + "\tclosed_rb_num: Not Allocated\n"); +@@ -3091,7 +3089,7 @@ static u32 iwl_trans_pcie_dump_rbs(struc + + spin_lock_bh(&rxq->lock); + +- r = le16_to_cpu(iwl_get_closed_rb_stts(trans, rxq)) & 0x0FFF; ++ r = iwl_get_closed_rb_stts(trans, rxq); + + for (i = rxq->read, j = 0; + i != r && j < allocated_rb_nums; +@@ -3387,9 +3385,7 @@ iwl_trans_pcie_dump_data(struct iwl_tran + /* Dump RBs is supported only for pre-9000 devices (1 queue) */ + struct iwl_rxq *rxq = &trans_pcie->rxq[0]; + /* RBs */ +- num_rbs = +- le16_to_cpu(iwl_get_closed_rb_stts(trans, rxq)) +- & 0x0FFF; ++ num_rbs = iwl_get_closed_rb_stts(trans, rxq); + num_rbs = (num_rbs - rxq->read) & RX_QUEUE_MASK; + len += num_rbs * (sizeof(*data) + + sizeof(struct iwl_fw_error_dump_rb) + diff --git a/queue-6.6/wifi-rtw88-8821cu-fix-connection-failure.patch b/queue-6.6/wifi-rtw88-8821cu-fix-connection-failure.patch new file mode 100644 index 00000000000..0a70ee7c90c --- /dev/null +++ b/queue-6.6/wifi-rtw88-8821cu-fix-connection-failure.patch @@ -0,0 +1,53 @@ +From 605d7c0b05eecb985273b1647070497142c470d3 Mon Sep 17 00:00:00 2001 +From: Bitterblue Smith +Date: Fri, 1 Mar 2024 00:34:13 +0200 +Subject: wifi: rtw88: 8821cu: Fix connection failure + +From: Bitterblue Smith + +commit 605d7c0b05eecb985273b1647070497142c470d3 upstream. + +Clear bit 8 of REG_SYS_STATUS1 after MAC power on. + +Without this, some RTL8821CU and RTL8811CU cannot connect to any +network: + +Feb 19 13:33:11 ideapad2 kernel: wlp3s0f3u2: send auth to + 90:55:de:__:__:__ (try 1/3) +Feb 19 13:33:13 ideapad2 kernel: wlp3s0f3u2: send auth to + 90:55:de:__:__:__ (try 2/3) +Feb 19 13:33:14 ideapad2 kernel: wlp3s0f3u2: send auth to + 90:55:de:__:__:__ (try 3/3) +Feb 19 13:33:15 ideapad2 kernel: wlp3s0f3u2: authentication with + 90:55:de:__:__:__ timed out + +The RTL8822CU and RTL8822BU out-of-tree drivers do this as well, so do +it for all three types of chips. + +Tested with RTL8811CU (Tenda U9 V2.0). + +Signed-off-by: Bitterblue Smith +Acked-by: Ping-Ke Shih +Signed-off-by: Kalle Valo +Link: https://msgid.link/aeeefad9-27c8-4506-a510-ef9a9a8731a4@gmail.com +Signed-off-by: Greg Kroah-Hartman +--- + drivers/net/wireless/realtek/rtw88/mac.c | 7 +++++++ + 1 file changed, 7 insertions(+) + +--- a/drivers/net/wireless/realtek/rtw88/mac.c ++++ b/drivers/net/wireless/realtek/rtw88/mac.c +@@ -309,6 +309,13 @@ static int rtw_mac_power_switch(struct r + pwr_seq = pwr_on ? chip->pwr_on_seq : chip->pwr_off_seq; + ret = rtw_pwr_seq_parser(rtwdev, pwr_seq); + ++ if (pwr_on && rtw_hci_type(rtwdev) == RTW_HCI_TYPE_USB) { ++ if (chip->id == RTW_CHIP_TYPE_8822C || ++ chip->id == RTW_CHIP_TYPE_8822B || ++ chip->id == RTW_CHIP_TYPE_8821C) ++ rtw_write8_clr(rtwdev, REG_SYS_STATUS1 + 1, BIT(0)); ++ } ++ + if (rtw_hci_type(rtwdev) == RTW_HCI_TYPE_SDIO) + rtw_write32(rtwdev, REG_SDIO_HIMR, imr); +