Changelog in Linux kernel 6.12.33

 
accel/ivpu: Add initial Panther Lake support [+ + +]
Author: Maciej Falkowski <maciej.falkowski@linux.intel.com>
Date:   Fri Oct 4 18:25:04 2024 +0200

    accel/ivpu: Add initial Panther Lake support
    
    commit c140244f0cfb9601dbc35e7ab90914954a76b3d1 upstream.
    
    Add support for the 5th generation of Intel NPU that
    is going to be present in PTL_P (Panther Lake) CPUs.
    NPU5 code reuses almost all of previous driver code.
    
    Signed-off-by: Maciej Falkowski <maciej.falkowski@linux.intel.com>
    Reviewed-by: Jeffrey Hugo <quic_jhugo@quicinc.com>
    Link: https://patchwork.freedesktop.org/patch/msgid/20241004162505.1695605-2-maciej.falkowski@linux.intel.com
    Signed-off-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

accel/ivpu: Update power island delays [+ + +]
Author: Karol Wachowski <karol.wachowski@intel.com>
Date:   Fri Oct 4 18:25:05 2024 +0200

    accel/ivpu: Update power island delays
    
    commit 88bdd1644ca28d48591b2a1e6e8b8c2b13f4bd3f upstream.
    
    Apply Hardware Architecture Specification compatible delays
    for main island power delivery for 50xx and above.
    
    Signed-off-by: Karol Wachowski <karol.wachowski@intel.com>
    Signed-off-by: Maciej Falkowski <maciej.falkowski@linux.intel.com>
    Reviewed-by: Jeffrey Hugo <quic_jhugo@quicinc.com>
    Link: https://patchwork.freedesktop.org/patch/msgid/20241004162505.1695605-3-maciej.falkowski@linux.intel.com
    Signed-off-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
acpi-cpufreq: Fix nominal_freq units to KHz in get_max_boost_ratio() [+ + +]
Author: Gautham R. Shenoy <gautham.shenoy@amd.com>
Date:   Thu May 29 14:21:43 2025 +0530

    acpi-cpufreq: Fix nominal_freq units to KHz in get_max_boost_ratio()
    
    commit cb6a85f38f456b086c366e346ebb67ffa70c7243 upstream.
    
    commit 083466754596 ("cpufreq: ACPI: Fix max-frequency computation")
    modified get_max_boost_ratio() to return the nominal_freq advertised
    in the _CPC object. This was for the purposes of computing the maximum
    frequency. The frequencies advertised in _CPC objects are in
    MHz. However, cpufreq expects the frequency to be in KHz. Since the
    nominal_freq returned by get_max_boost_ratio() was not in KHz but
    instead in MHz,the cpuinfo_max_frequency that was computed using this
    nominal_freq was incorrect and an invalid value which resulted in
    cpufreq reporting the P0 frequency as the cpuinfo_max_freq.
    
    Fix this by converting the nominal_freq to KHz before returning the
    same from get_max_boost_ratio().
    
    Reported-by: Manu Bretelle <chantr4@gmail.com>
    Closes: https://lore.kernel.org/lkml/aDaB63tDvbdcV0cg@HQ-GR2X1W2P57/
    Fixes: 083466754596 ("cpufreq: ACPI: Fix max-frequency computation")
    Signed-off-by: Gautham R. Shenoy <gautham.shenoy@amd.com>
    Cc: 6.14+ <stable@vger.kernel.org> # 6.14+
    Link: https://patch.msgid.link/20250529085143.709-1-gautham.shenoy@amd.com
    Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
block: fix adding folio to bio [+ + +]
Author: Ming Lei <ming.lei@redhat.com>
Date:   Wed Mar 12 22:51:36 2025 +0800

    block: fix adding folio to bio
    
    commit 26064d3e2b4d9a14df1072980e558c636fb023ea upstream.
    
    >4GB folio is possible on some ARCHs, such as aarch64, 16GB hugepage
    is supported, then 'offset' of folio can't be held in 'unsigned int',
    cause warning in bio_add_folio_nofail() and IO failure.
    
    Fix it by adjusting 'page' & trimming 'offset' so that `->bi_offset` won't
    be overflow, and folio can be added to bio successfully.
    
    Fixes: ed9832bc08db ("block: introduce folio awareness and add a bigger size from folio")
    Cc: Kundan Kumar <kundan.kumar@samsung.com>
    Cc: Matthew Wilcox (Oracle) <willy@infradead.org>
    Cc: Christoph Hellwig <hch@lst.de>
    Cc: Luis Chamberlain <mcgrof@kernel.org>
    Cc: Gavin Shan <gshan@redhat.com>
    Signed-off-by: Ming Lei <ming.lei@redhat.com>
    Reviewed-by: Matthew Wilcox (Oracle) <willy@infradead.org>
    Link: https://lore.kernel.org/r/20250312145136.2891229-1-ming.lei@redhat.com
    Signed-off-by: Jens Axboe <axboe@kernel.dk>
    [ The follow-up fix fbecd731de05 ("xfs: fix zoned GC data corruption due to
      wrong bv_offset") addresses issues in the file fs/xfs/xfs_zone_gc.c.  This
      file was first introduced in version v6.15-rc1. So don't backport the follow
      up fix to 6.12.y. ]
    Signed-off-by: Alva Lan <alvalan9@foxmail.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
Bluetooth: hci_qca: move the SoC type check to the right place [+ + +]
Author: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Date:   Tue May 27 09:47:37 2025 +0200

    Bluetooth: hci_qca: move the SoC type check to the right place
    
    commit 0fb410c914eb03c7e9d821e26d03bac0a239e5db upstream.
    
    Commit 3d05fc82237a ("Bluetooth: qca: set power_ctrl_enabled on NULL
    returned by gpiod_get_optional()") accidentally changed the prevous
    behavior where power control would be disabled without the BT_EN GPIO
    only on QCA_WCN6750 and QCA_WCN6855 while also getting the error check
    wrong. We should treat every IS_ERR() return value from
    devm_gpiod_get_optional() as a reason to bail-out while we should only
    set power_ctrl_enabled to false on the two models mentioned above. While
    at it: use dev_err_probe() to save a LOC.
    
    Cc: stable@vger.kernel.org
    Fixes: 3d05fc82237a ("Bluetooth: qca: set power_ctrl_enabled on NULL returned by gpiod_get_optional()")
    Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
    Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
    Tested-by: Hsin-chen Chuang <chharry@chromium.org>
    Reviewed-by: Hsin-chen Chuang <chharry@chromium.org>
    Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
Documentation: ACPI: Use all-string data node references [+ + +]
Author: Sakari Ailus <sakari.ailus@linux.intel.com>
Date:   Wed Apr 9 11:47:38 2025 +0300

    Documentation: ACPI: Use all-string data node references
    
    commit 6db0261f3776bde01ae916ad8e1cb2ded3ba1a2b upstream.
    
    Document that references to data nodes shall use string-only references
    instead of a device reference and a succession of the first package
    entries of hierarchical data node references.
    
    Fixes: 9880702d123f ("ACPI: property: Support using strings in reference properties")
    Cc: 6.8+ <stable@vger.kernel.org> # 6.8+
    Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
    Link: https://patch.msgid.link/20250409084738.3657079-1-sakari.ailus@linux.intel.com
    [ rjw: Clarifying edits ]
    Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
dt-bindings: phy: imx8mq-usb: fix fsl,phy-tx-vboost-level-microvolt property [+ + +]
Author: Xu Yang <xu.yang_2@nxp.com>
Date:   Wed Apr 30 17:44:59 2025 +0800

    dt-bindings: phy: imx8mq-usb: fix fsl,phy-tx-vboost-level-microvolt property
    
    commit 5b3a91b207c00a8d27f75ce8aaa9860844da72c8 upstream.
    
    The ticket TKT0676370 shows the description of TX_VBOOST_LVL is wrong in
    register PHY_CTRL3 bit[31:29].
    
      011: Corresponds to a launch amplitude of 1.12 V.
      010: Corresponds to a launch amplitude of 1.04 V.
      000: Corresponds to a launch amplitude of 0.88 V.
    
    After updated:
    
      011: Corresponds to a launch amplitude of 0.844 V.
      100: Corresponds to a launch amplitude of 1.008 V.
      101: Corresponds to a launch amplitude of 1.156 V.
    
    This will correct it accordingly.
    
    Fixes: b2e75563dc39 ("dt-bindings: phy: imx8mq-usb: add phy tuning properties")
    Cc: stable@vger.kernel.org
    Reviewed-by: Jun Li <jun.li@nxp.com>
    Signed-off-by: Xu Yang <xu.yang_2@nxp.com>
    Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
    Link: https://lore.kernel.org/r/20250430094502.2723983-1-xu.yang_2@nxp.com
    Signed-off-by: Vinod Koul <vkoul@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

dt-bindings: usb: cypress,hx3: Add support for all variants [+ + +]
Author: Lukasz Czechowski <lukasz.czechowski@thaumatec.com>
Date:   Fri Apr 25 17:18:07 2025 +0200

    dt-bindings: usb: cypress,hx3: Add support for all variants
    
    commit 1ad4b5a7de16806afc1aeaf012337e62af04e001 upstream.
    
    The Cypress HX3 hubs use different default PID value depending
    on the variant. Update compatibles list.
    Becasuse all hub variants use the same driver data, allow the
    dt node to have two compatibles: leftmost which matches the HW
    exactly, and the second one as fallback.
    
    Fixes: 1eca51f58a10 ("dt-bindings: usb: Add binding for Cypress HX3 USB 3.0 family")
    Cc: stable@vger.kernel.org # 6.6
    Cc: stable@vger.kernel.org # Backport of the patch ("dt-bindings: usb: usb-device: relax compatible pattern to a contains") from list: https://lore.kernel.org/linux-usb/20250418-dt-binding-usb-device-compatibles-v2-1-b3029f14e800@cherry.de/
    Cc: stable@vger.kernel.org # Backport of the patch in this series fixing product ID in onboard_dev_id_table in drivers/usb/misc/onboard_usb_dev.c driver
    Signed-off-by: Lukasz Czechowski <lukasz.czechowski@thaumatec.com>
    Reviewed-by: "Rob Herring (Arm)" <robh@kernel.org>
    Link: https://lore.kernel.org/r/20250425-onboard_usb_dev-v2-2-4a76a474a010@thaumatec.com
    [taken with Greg's blessing]
    Signed-off-by: Heiko Stuebner <heiko@sntech.de>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
f2fs: fix to avoid accessing uninitialized curseg [+ + +]
Author: Chao Yu <chao@kernel.org>
Date:   Mon Feb 24 18:29:23 2025 +0800

    f2fs: fix to avoid accessing uninitialized curseg
    
    commit 986c50f6bca109c6cf362b4e2babcb85aba958f6 upstream.
    
    syzbot reports a f2fs bug as below:
    
    F2FS-fs (loop3): Stopped filesystem due to reason: 7
    kworker/u8:7: attempt to access beyond end of device
    BUG: unable to handle page fault for address: ffffed1604ea3dfa
    RIP: 0010:get_ckpt_valid_blocks fs/f2fs/segment.h:361 [inline]
    RIP: 0010:has_curseg_enough_space fs/f2fs/segment.h:570 [inline]
    RIP: 0010:__get_secs_required fs/f2fs/segment.h:620 [inline]
    RIP: 0010:has_not_enough_free_secs fs/f2fs/segment.h:633 [inline]
    RIP: 0010:has_enough_free_secs+0x575/0x1660 fs/f2fs/segment.h:649
     <TASK>
     f2fs_is_checkpoint_ready fs/f2fs/segment.h:671 [inline]
     f2fs_write_inode+0x425/0x540 fs/f2fs/inode.c:791
     write_inode fs/fs-writeback.c:1525 [inline]
     __writeback_single_inode+0x708/0x10d0 fs/fs-writeback.c:1745
     writeback_sb_inodes+0x820/0x1360 fs/fs-writeback.c:1976
     wb_writeback+0x413/0xb80 fs/fs-writeback.c:2156
     wb_do_writeback fs/fs-writeback.c:2303 [inline]
     wb_workfn+0x410/0x1080 fs/fs-writeback.c:2343
     process_one_work kernel/workqueue.c:3236 [inline]
     process_scheduled_works+0xa66/0x1840 kernel/workqueue.c:3317
     worker_thread+0x870/0xd30 kernel/workqueue.c:3398
     kthread+0x7a9/0x920 kernel/kthread.c:464
     ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:148
     ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244
    
    Commit 8b10d3653735 ("f2fs: introduce FAULT_NO_SEGMENT") allows to trigger
    no free segment fault in allocator, then it will update curseg->segno to
    NULL_SEGNO, though, CP_ERROR_FLAG has been set, f2fs_write_inode() missed
    to check the flag, and access invalid curseg->segno directly in below call
    path, then resulting in panic:
    
    - f2fs_write_inode
     - f2fs_is_checkpoint_ready
      - has_enough_free_secs
       - has_not_enough_free_secs
        - __get_secs_required
         - has_curseg_enough_space
          - get_ckpt_valid_blocks
          : access invalid curseg->segno
    
    To avoid this issue, let's:
    - check CP_ERROR_FLAG flag in prior to f2fs_is_checkpoint_ready() in
    f2fs_write_inode().
    - in has_curseg_enough_space(), save curseg->segno into a temp variable,
    and verify its validation before use.
    
    Fixes: 8b10d3653735 ("f2fs: introduce FAULT_NO_SEGMENT")
    Reported-by: syzbot+b6b347b7a4ea1b2e29b6@syzkaller.appspotmail.com
    Closes: https://lore.kernel.org/all/67973c2b.050a0220.11b1bb.0089.GAE@google.com
    Signed-off-by: Chao Yu <chao@kernel.org>
    Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
    Signed-off-by: Alva Lan <alvalan9@foxmail.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
Linux: Linux 6.12.33 [+ + +]
Author: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Date:   Tue Jun 10 07:13:00 2025 -0400

    Linux 6.12.33
    
    Link: https://lore.kernel.org/r/20250607100717.910797456@linuxfoundation.org
    Tested-by: Salvatore Bonaccorso <carnil@debian.org>
    Tested-by: Markus Reichelt <lkt+2023@mareichelt.com>
    Tested-by: Ron Economos <re@w6rz.net>
    Tested-by: Linux Kernel Functional Testing <lkft@linaro.org>
    Tested-by: Peter Schneider <pschneider1968@googlemail.com>
    Tested-by: Pavel Machek (CIP) <pavel@denx.de>
    Tested-by: Mark Brown <broonie@kernel.org>
    Tested-by: Jon Hunter <jonathanh@nvidia.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
PCI/ASPM: Disable L1 before disabling L1 PM Substates [+ + +]
Author: Ajay Agarwal <ajayagarwal@google.com>
Date:   Mon Oct 7 08:59:17 2024 +0530

    PCI/ASPM: Disable L1 before disabling L1 PM Substates
    
    commit 7447990137bf06b2aeecad9c6081e01a9f47f2aa upstream.
    
    PCIe r6.2, sec 5.5.4, requires that:
    
      If setting either or both of the enable bits for ASPM L1 PM Substates,
      both ports must be configured as described in this section while ASPM L1
      is disabled.
    
    Previously, pcie_config_aspm_l1ss() assumed that "setting enable bits"
    meant "setting them to 1", and it configured L1SS as follows:
    
      - Clear L1SS enable bits
      - Disable L1
      - Configure L1SS enable bits as required
      - Enable L1 if required
    
    With this sequence, when disabling L1SS on an ARM A-core with a Synopsys
    DesignWare PCIe core, the CPU occasionally hangs when reading
    PCI_L1SS_CTL1, leading to a reboot when the CPU watchdog expires.
    
    Move the L1 disable to the caller (pcie_config_aspm_link(), where L1 was
    already enabled) so L1 is always disabled while updating the L1SS bits:
    
      - Disable L1
      - Clear L1SS enable bits
      - Configure L1SS enable bits as required
      - Enable L1 if required
    
    Change pcie_aspm_cap_init() similarly.
    
    Link: https://lore.kernel.org/r/20241007032917.872262-1-ajayagarwal@google.com
    Signed-off-by: Ajay Agarwal <ajayagarwal@google.com>
    [bhelgaas: comments, commit log, compute L1SS setting before config access]
    Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
    Tested-by: Johnny-CC Chang <Johnny-CC.Chang@mediatek.com>
    Signed-off-by: Macpaul Lin <macpaul.lin@mediatek.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
pinctrl: armada-37xx: set GPIO output value before setting direction [+ + +]
Author: Gabor Juhos <j4g8y7@gmail.com>
Date:   Wed May 14 21:18:33 2025 +0200

    pinctrl: armada-37xx: set GPIO output value before setting direction
    
    commit e6ebd4942981f8ad37189bbb36a3c8495e21ef4c upstream.
    
    Changing the direction before updating the output value in the
    OUTPUT_VAL register may result in a glitch on the output line
    if the previous value in the OUTPUT_VAL register is different
    from the one we want to set.
    
    In order to avoid that, update the output value before changing
    the direction.
    
    Cc: stable@vger.kernel.org
    Fixes: 6702abb3bf23 ("pinctrl: armada-37xx: Fix direction_output() callback behavior")
    Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
    Reviewed-by: Andrew Lunn <andrew@lunn.ch>
    Signed-off-by: Gabor Juhos <j4g8y7@gmail.com>
    Link: https://lore.kernel.org/20250514-pinctrl-a37xx-fixes-v2-2-07e9ac1ab737@gmail.com
    Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

pinctrl: armada-37xx: use correct OUTPUT_VAL register for GPIOs > 31 [+ + +]
Author: Gabor Juhos <j4g8y7@gmail.com>
Date:   Wed May 14 21:18:32 2025 +0200

    pinctrl: armada-37xx: use correct OUTPUT_VAL register for GPIOs > 31
    
    commit 947c93eb29c2a581c0b0b6d5f21af3c2b7ff6d25 upstream.
    
    The controller has two consecutive OUTPUT_VAL registers and both
    holds output value for 32 GPIOs. Due to a missing adjustment, the
    current code always uses the first register while setting the
    output value whereas it should use the second one for GPIOs > 31.
    
    Add the missing armada_37xx_update_reg() call to adjust the register
    according to the 'offset' parameter of the function to fix the issue.
    
    Cc: stable@vger.kernel.org
    Fixes: 6702abb3bf23 ("pinctrl: armada-37xx: Fix direction_output() callback behavior")
    Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
    Reviewed-by: Andrew Lunn <andrew@lunn.ch>
    Signed-off-by: Gabor Juhos <j4g8y7@gmail.com>
    Link: https://lore.kernel.org/20250514-pinctrl-a37xx-fixes-v2-1-07e9ac1ab737@gmail.com
    Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
Revert "cpufreq: tegra186: Share policy per cluster" [+ + +]
Author: Jon Hunter <jonathanh@nvidia.com>
Date:   Thu Jun 5 13:54:32 2025 +0100

    Revert "cpufreq: tegra186: Share policy per cluster"
    
    This reverts commit d95fdee2253e612216e72f29c65b92ec42d254eb which is
    upstream commit be4ae8c19492cd6d5de61ccb34ffb3f5ede5eec8.
    
    This commit is causing a suspend regression on Tegra186 Jetson TX2 with
    Linux v6.12.y kernels. This is not seen with Linux v6.15 that includes
    this change but indicates that there are there changes missing.
    Therefore, revert this change.
    
    Fixes: d95fdee2253e ("cpufreq: tegra186: Share policy per cluster")
    Link: https://lore.kernel.org/linux-tegra/bf1dabf7-0337-40e9-8b8e-4e93a0ffd4cc@nvidia.com/
    Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
Revert "drm/amd/display: more liberal vmin/vmax update for freesync" [+ + +]
Author: Aurabindo Pillai <aurabindo.pillai@amd.com>
Date:   Wed May 21 16:05:39 2025 -0400

    Revert "drm/amd/display: more liberal vmin/vmax update for freesync"
    
    commit 1b824eef269db44d068bbc0de74c94a8e8f9ce02 upstream.
    
    This reverts commit cfb2d41831ee5647a4ae0ea7c24971a92d5dfa0d since it
    causes regressions on certain configs. Revert until the issue can be
    isolated and debugged.
    
    Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/4238
    Signed-off-by: Aurabindo Pillai <aurabindo.pillai@amd.com>
    Acked-by: Alex Deucher <alexander.deucher@amd.com>
    Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
    Cc: stable@vger.kernel.org
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
rtc: Fix offset calculation for .start_secs < 0 [+ + +]
Author: Alexandre Mergnat <amergnat@baylibre.com>
Date:   Mon Apr 28 12:06:48 2025 +0200

    rtc: Fix offset calculation for .start_secs < 0
    
    commit fe9f5f96cfe8b82d0f24cbfa93718925560f4f8d upstream.
    
    The comparison
    
            rtc->start_secs > rtc->range_max
    
    has a signed left-hand side and an unsigned right-hand side.
    So the comparison might become true for negative start_secs which is
    interpreted as a (possibly very large) positive value.
    
    As a negative value can never be bigger than an unsigned value
    the correct representation of the (mathematical) comparison
    
            rtc->start_secs > rtc->range_max
    
    in C is:
    
            rtc->start_secs >= 0 && rtc->start_secs > rtc->range_max
    
    Use that to fix the offset calculation currently used in the
    rtc-mt6397 driver.
    
    Fixes: 989515647e783 ("rtc: Add one offset seconds to expand RTC range")
    Signed-off-by: Alexandre Mergnat <amergnat@baylibre.com>
    Reviewed-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
    Link: https://lore.kernel.org/r/20250428-enable-rtc-v4-2-2b2f7e3f9349@baylibre.com
    Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
    Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

rtc: Make rtc_time64_to_tm() support dates before 1970 [+ + +]
Author: Alexandre Mergnat <amergnat@baylibre.com>
Date:   Mon Apr 28 12:06:47 2025 +0200

    rtc: Make rtc_time64_to_tm() support dates before 1970
    
    commit 7df4cfef8b351fec3156160bedfc7d6d29de4cce upstream.
    
    Conversion of dates before 1970 is still relevant today because these
    dates are reused on some hardwares to store dates bigger than the
    maximal date that is representable in the device's native format.
    This prominently and very soon affects the hardware covered by the
    rtc-mt6397 driver that can only natively store dates in the interval
    1900-01-01 up to 2027-12-31. So to store the date 2028-01-01 00:00:00
    to such a device, rtc_time64_to_tm() must do the right thing for
    time=-2208988800.
    
    Signed-off-by: Alexandre Mergnat <amergnat@baylibre.com>
    Reviewed-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
    Link: https://lore.kernel.org/r/20250428-enable-rtc-v4-1-2b2f7e3f9349@baylibre.com
    Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
    Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
serial: jsm: fix NPE during jsm_uart_port_init [+ + +]
Author: Dustin Lundquist <dustin@null-ptr.net>
Date:   Tue May 6 11:18:45 2025 -0700

    serial: jsm: fix NPE during jsm_uart_port_init
    
    commit e3975aa899c0a3bbc10d035e699b142cd1373a71 upstream.
    
    No device was set which caused serial_base_ctrl_add to crash.
    
     BUG: kernel NULL pointer dereference, address: 0000000000000050
     Oops: Oops: 0000 [#1] PREEMPT SMP NOPTI
     CPU: 16 UID: 0 PID: 368 Comm: (udev-worker) Not tainted 6.12.25-amd64 #1  Debian 6.12.25-1
     RIP: 0010:serial_base_ctrl_add+0x96/0x120
     Call Trace:
      <TASK>
      serial_core_register_port+0x1a0/0x580
      ? __setup_irq+0x39c/0x660
      ? __kmalloc_cache_noprof+0x111/0x310
      jsm_uart_port_init+0xe8/0x180 [jsm]
      jsm_probe_one+0x1f4/0x410 [jsm]
      local_pci_probe+0x42/0x90
      pci_device_probe+0x22f/0x270
      really_probe+0xdb/0x340
      ? pm_runtime_barrier+0x54/0x90
      ? __pfx___driver_attach+0x10/0x10
      __driver_probe_device+0x78/0x110
      driver_probe_device+0x1f/0xa0
      __driver_attach+0xba/0x1c0
      bus_for_each_dev+0x8c/0xe0
      bus_add_driver+0x112/0x1f0
      driver_register+0x72/0xd0
      jsm_init_module+0x36/0xff0 [jsm]
      ? __pfx_jsm_init_module+0x10/0x10 [jsm]
      do_one_initcall+0x58/0x310
      do_init_module+0x60/0x230
    
    Tested with Digi Neo PCIe 8 port card.
    
    Fixes: 84a9582fd203 ("serial: core: Start managing serial controllers to enable runtime PM")
    Cc: stable <stable@kernel.org>
    Signed-off-by: Dustin Lundquist <dustin@null-ptr.net>
    Link: https://lore.kernel.org/r/3f31d4f75863614655c4673027a208be78d022ec.camel@null-ptr.net
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
thunderbolt: Do not double dequeue a configuration request [+ + +]
Author: Sergey Senozhatsky <senozhatsky@chromium.org>
Date:   Fri Mar 28 00:03:50 2025 +0900

    thunderbolt: Do not double dequeue a configuration request
    
    commit 0f73628e9da1ee39daf5f188190cdbaee5e0c98c upstream.
    
    Some of our devices crash in tb_cfg_request_dequeue():
    
     general protection fault, probably for non-canonical address 0xdead000000000122
    
     CPU: 6 PID: 91007 Comm: kworker/6:2 Tainted: G U W 6.6.65
     RIP: 0010:tb_cfg_request_dequeue+0x2d/0xa0
     Call Trace:
     <TASK>
     ? tb_cfg_request_dequeue+0x2d/0xa0
     tb_cfg_request_work+0x33/0x80
     worker_thread+0x386/0x8f0
     kthread+0xed/0x110
     ret_from_fork+0x38/0x50
     ret_from_fork_asm+0x1b/0x30
    
    The circumstances are unclear, however, the theory is that
    tb_cfg_request_work() can be scheduled twice for a request:
    first time via frame.callback from ring_work() and second
    time from tb_cfg_request().  Both times kworkers will execute
    tb_cfg_request_dequeue(), which results in double list_del()
    from the ctl->request_queue (the list poison deference hints
    at it: 0xdead000000000122).
    
    Do not dequeue requests that don't have TB_CFG_REQUEST_ACTIVE
    bit set.
    
    Signed-off-by: Sergey Senozhatsky <senozhatsky@chromium.org>
    Cc: stable@vger.kernel.org
    Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
tracing: Fix compilation warning on arm32 [+ + +]
Author: Pan Taixi <pantaixi@huaweicloud.com>
Date:   Mon May 26 09:37:31 2025 +0800

    tracing: Fix compilation warning on arm32
    
    commit 2fbdb6d8e03b70668c0876e635506540ae92ab05 upstream.
    
    On arm32, size_t is defined to be unsigned int, while PAGE_SIZE is
    unsigned long. This hence triggers a compilation warning as min()
    asserts the type of two operands to be equal. Casting PAGE_SIZE to size_t
    solves this issue and works on other target architectures as well.
    
    Compilation warning details:
    
    kernel/trace/trace.c: In function 'tracing_splice_read_pipe':
    ./include/linux/minmax.h:20:28: warning: comparison of distinct pointer types lacks a cast
      (!!(sizeof((typeof(x) *)1 == (typeof(y) *)1)))
                                ^
    ./include/linux/minmax.h:26:4: note: in expansion of macro '__typecheck'
       (__typecheck(x, y) && __no_side_effects(x, y))
        ^~~~~~~~~~~
    
    ...
    
    kernel/trace/trace.c:6771:8: note: in expansion of macro 'min'
            min((size_t)trace_seq_used(&iter->seq),
            ^~~
    
    Cc: stable@vger.kernel.org
    Link: https://lore.kernel.org/20250526013731.1198030-1-pantaixi@huaweicloud.com
    Fixes: f5178c41bb43 ("tracing: Fix oob write in trace_seq_to_buffer()")
    Reviewed-by: Jeongjun Park <aha310510@gmail.com>
    Signed-off-by: Pan Taixi <pantaixi@huaweicloud.com>
    Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 
usb: quirks: Add NO_LPM quirk for SanDisk Extreme 55AE [+ + +]
Author: Jiayi Li <lijiayi@kylinos.cn>
Date:   Thu May 8 13:59:47 2025 +0800

    usb: quirks: Add NO_LPM quirk for SanDisk Extreme 55AE
    
    commit 19f795591947596b5b9efa86fd4b9058e45786e9 upstream.
    
    This device exhibits I/O errors during file transfers due to unstable
    link power management (LPM) behavior. The kernel logs show repeated
    warm resets and eventual disconnection when LPM is enabled:
    
    [ 3467.810740] hub 2-0:1.0: state 7 ports 6 chg 0000 evt 0020
    [ 3467.810740] usb usb2-port5: do warm reset
    [ 3467.866444] usb usb2-port5: not warm reset yet, waiting 50ms
    [ 3467.907407] sd 0:0:0:0: [sda] tag#12 sense submit err -19
    [ 3467.994423] usb usb2-port5: status 02c0, change 0001, 10.0 Gb/s
    [ 3467.994453] usb 2-5: USB disconnect, device number 4
    
    The error -19 (ENODEV) occurs when the device disappears during write
    operations. Adding USB_QUIRK_NO_LPM disables link power management
    for this specific device, resolving the stability issues.
    
    Signed-off-by: Jiayi Li <lijiayi@kylinos.cn>
    Cc: stable <stable@kernel.org>
    Link: https://lore.kernel.org/r/20250508055947.764538-1-lijiayi@kylinos.cn
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
USB: serial: pl2303: add new chip PL2303GC-Q20 and PL2303GT-2AB [+ + +]
Author: Charles Yeh <charlesyeh522@gmail.com>
Date:   Wed May 21 21:23:54 2025 +0800

    USB: serial: pl2303: add new chip PL2303GC-Q20 and PL2303GT-2AB
    
    commit d3a889482bd5abf2bbdc1ec3d2d49575aa160c9c upstream.
    
    Add new bcd (0x905) to support PL2303GT-2AB (TYPE_HXN).
    Add new bcd (0x1005) to support PL2303GC-Q20 (TYPE_HXN).
    
    Signed-off-by: Charles Yeh <charlesyeh522@gmail.com>
    Cc: stable@vger.kernel.org
    Signed-off-by: Johan Hovold <johan@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
usb: storage: Ignore UAS driver for SanDisk 3.2 Gen2 storage device [+ + +]
Author: Hongyu Xie <xiehongyu1@kylinos.cn>
Date:   Mon May 19 10:33:28 2025 +0800

    usb: storage: Ignore UAS driver for SanDisk 3.2 Gen2 storage device
    
    commit a541acceedf4f639f928f41fbb676b75946dc295 upstream.
    
    SanDisk 3.2 Gen2 storage device(0781:55e8) doesn't work well with UAS.
    Log says,
    [    6.507865][ 3] [  T159] usb 2-1.4: new SuperSpeed Gen 1 USB device number 4 using xhci_hcd
    [    6.540314][ 3] [  T159] usb 2-1.4: New USB device found, idVendor=0781, idProduct=55e8, bcdDevice= 0.01
    [    6.576304][ 3] [  T159] usb 2-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
    [    6.584727][ 3] [  T159] usb 2-1.4: Product: SanDisk 3.2 Gen2
    [    6.590459][ 3] [  T159] usb 2-1.4: Manufacturer: SanDisk
    [    6.595845][ 3] [  T159] usb 2-1.4: SerialNumber: 03021707022525140940
    [    7.230852][ 0] [  T265] usbcore: registered new interface driver usb-storage
    [    7.251247][ 0] [  T265] scsi host3: uas
    [    7.255280][ 0] [  T265] usbcore: registered new interface driver uas
    [    7.270498][ 1] [  T192] scsi 3:0:0:0: Direct-Access     SanDisk  Extreme Pro DDE1 0110 PQ: 0 ANSI: 6
    [    7.299588][ 3] [  T192] scsi 3:0:0:1: Enclosure         SanDisk  SES Device       0110 PQ: 0 ANSI: 6
    [    7.321681][ 3] [  T192] sd 3:0:0:0: Attached scsi generic sg1 type 0
    [    7.328185][ 3] [  T192] scsi 3:0:0:1: Attached scsi generic sg2 type 13
    [    7.328804][ 0] [  T191] sd 3:0:0:0: [sda] 976773168 512-byte logical blocks: (500 GB/466 GiB)
    [    7.343486][ 0] [  T191] sd 3:0:0:0: [sda] 4096-byte physical blocks
    [    7.364611][ 0] [  T191] sd 3:0:0:0: [sda] Write Protect is off
    [    7.370524][ 0] [  T191] sd 3:0:0:0: [sda] Mode Sense: 3d 00 10 00
    [    7.390655][ 0] [  T191] sd 3:0:0:0: [sda] Write cache: enabled, read cache: enabled, supports DPO and FUA
    [    7.401363][ 0] [  T191] sd 3:0:0:0: [sda] Optimal transfer size 1048576 bytes
    [    7.436010][ 0] [  T191]  sda: sda1
    [    7.450850][ 0] [  T191] sd 3:0:0:0: [sda] Attached SCSI disk
    [    7.470218][ 4] [  T262] scsi 3:0:0:1: Failed to get diagnostic page 0x1
    [    7.474869][ 0] [    C0] sd 3:0:0:0: [sda] tag#0 data cmplt err -75 uas-tag 2 inflight: CMD
    [    7.476911][ 4] [  T262] scsi 3:0:0:1: Failed to bind enclosure -19
    [    7.485330][ 0] [    C0] sd 3:0:0:0: [sda] tag#0 CDB: Read(10) 28 00 00 00 00 28 00 00 10 00
    [    7.491593][ 4] [  T262] ses 3:0:0:1: Attached Enclosure device
    [   38.066980][ 4] [  T192] sd 3:0:0:0: [sda] tag#4 uas_eh_abort_handler 0 uas-tag 5 inflight: CMD IN
    [   38.076012][ 4] [  T192] sd 3:0:0:0: [sda] tag#4 CDB: Read(10) 28 00 00 00 01 08 00 00 f8 00
    [   38.086485][ 4] [  T192] sd 3:0:0:0: [sda] tag#3 uas_eh_abort_handler 0 uas-tag 1 inflight: CMD IN
    [   38.095515][ 4] [  T192] sd 3:0:0:0: [sda] tag#3 CDB: Read(10) 28 00 00 00 00 10 00 00 08 00
    [   38.104122][ 4] [  T192] sd 3:0:0:0: [sda] tag#2 uas_eh_abort_handler 0 uas-tag 4 inflight: CMD IN
    [   38.113152][ 4] [  T192] sd 3:0:0:0: [sda] tag#2 CDB: Read(10) 28 00 00 00 00 88 00 00 78 00
    [   38.121761][ 4] [  T192] sd 3:0:0:0: [sda] tag#1 uas_eh_abort_handler 0 uas-tag 3 inflight: CMD IN
    [   38.130791][ 4] [  T192] sd 3:0:0:0: [sda] tag#1 CDB: Read(10) 28 00 00 00 00 48 00 00 30 00
    [   38.139401][ 4] [  T192] sd 3:0:0:0: [sda] tag#0 uas_eh_abort_handler 0 uas-tag 2 inflight: CMD
    [   38.148170][ 4] [  T192] sd 3:0:0:0: [sda] tag#0 CDB: Read(10) 28 00 00 00 00 28 00 00 10 00
    [   38.178980][ 2] [  T304] scsi host3: uas_eh_device_reset_handler start
    [   38.901540][ 2] [  T304] usb 2-1.4: reset SuperSpeed Gen 1 USB device number 4 using xhci_hcd
    [   38.936791][ 2] [  T304] scsi host3: uas_eh_device_reset_handler success
    
    Device decriptor is below,
    Bus 002 Device 006: ID 0781:55e8 SanDisk Corp. SanDisk 3.2 Gen2
    Device Descriptor:
      bLength                18
      bDescriptorType         1
      bcdUSB               3.20
      bDeviceClass            0
      bDeviceSubClass         0
      bDeviceProtocol         0
      bMaxPacketSize0         9
      idVendor           0x0781 SanDisk Corp.
      idProduct          0x55e8
      bcdDevice            0.01
      iManufacturer           1 SanDisk
      iProduct                2 SanDisk 3.2 Gen2
      iSerial                 3 03021707022525140940
      bNumConfigurations      1
      Configuration Descriptor:
        bLength                 9
        bDescriptorType         2
        wTotalLength       0x0079
        bNumInterfaces          1
        bConfigurationValue     1
        iConfiguration          0
        bmAttributes         0x80
          (Bus Powered)
        MaxPower              896mA
        Interface Descriptor:
          bLength                 9
          bDescriptorType         4
          bInterfaceNumber        0
          bAlternateSetting       0
          bNumEndpoints           2
          bInterfaceClass         8 Mass Storage
          bInterfaceSubClass      6 SCSI
          bInterfaceProtocol     80 Bulk-Only
          iInterface              0
          Endpoint Descriptor:
            bLength                 7
            bDescriptorType         5
            bEndpointAddress     0x82  EP 2 IN
            bmAttributes            2
              Transfer Type            Bulk
              Synch Type               None
              Usage Type               Data
            wMaxPacketSize     0x0400  1x 1024 bytes
            bInterval               0
            bMaxBurst              15
          Endpoint Descriptor:
            bLength                 7
            bDescriptorType         5
            bEndpointAddress     0x01  EP 1 OUT
            bmAttributes            2
              Transfer Type            Bulk
              Synch Type               None
              Usage Type               Data
            wMaxPacketSize     0x0400  1x 1024 bytes
            bInterval               0
            bMaxBurst              15
        Interface Descriptor:
          bLength                 9
          bDescriptorType         4
          bInterfaceNumber        0
          bAlternateSetting       1
          bNumEndpoints           4
          bInterfaceClass         8 Mass Storage
          bInterfaceSubClass      6 SCSI
          bInterfaceProtocol     98
          iInterface              0
          Endpoint Descriptor:
            bLength                 7
            bDescriptorType         5
            bEndpointAddress     0x01  EP 1 OUT
            bmAttributes            2
              Transfer Type            Bulk
              Synch Type               None
              Usage Type               Data
            wMaxPacketSize     0x0400  1x 1024 bytes
            bInterval               0
            bMaxBurst               0
            Command pipe (0x01)
          Endpoint Descriptor:
            bLength                 7
            bDescriptorType         5
            bEndpointAddress     0x84  EP 4 IN
            bmAttributes            2
              Transfer Type            Bulk
              Synch Type               None
              Usage Type               Data
            wMaxPacketSize     0x0400  1x 1024 bytes
            bInterval               0
            bMaxBurst              15
            MaxStreams             32
            Status pipe (0x02)
          Endpoint Descriptor:
            bLength                 7
            bDescriptorType         5
            bEndpointAddress     0x82  EP 2 IN
            bmAttributes            2
              Transfer Type            Bulk
              Synch Type               None
              Usage Type               Data
            wMaxPacketSize     0x0400  1x 1024 bytes
            bInterval               0
            bMaxBurst              15
            MaxStreams             32
            Data-in pipe (0x03)
          Endpoint Descriptor:
            bLength                 7
            bDescriptorType         5
            bEndpointAddress     0x03  EP 3 OUT
            bmAttributes            2
              Transfer Type            Bulk
              Synch Type               None
              Usage Type               Data
            wMaxPacketSize     0x0400  1x 1024 bytes
            bInterval               0
            bMaxBurst              15
            MaxStreams             32
            Data-out pipe (0x04)
    Binary Object Store Descriptor:
      bLength                 5
      bDescriptorType        15
      wTotalLength       0x002a
      bNumDeviceCaps          3
      USB 2.0 Extension Device Capability:
        bLength                 7
        bDescriptorType        16
        bDevCapabilityType      2
        bmAttributes   0x0000f41e
          BESL Link Power Management (LPM) Supported
        BESL value     1024 us
        Deep BESL value    61440 us
      SuperSpeed USB Device Capability:
        bLength                10
        bDescriptorType        16
        bDevCapabilityType      3
        bmAttributes         0x00
        wSpeedsSupported   0x000e
          Device can operate at Full Speed (12Mbps)
          Device can operate at High Speed (480Mbps)
          Device can operate at SuperSpeed (5Gbps)
        bFunctionalitySupport   1
          Lowest fully-functional device speed is Full Speed (12Mbps)
        bU1DevExitLat          10 micro seconds
        bU2DevExitLat        2047 micro seconds
      SuperSpeedPlus USB Device Capability:
        bLength                20
        bDescriptorType        16
        bDevCapabilityType     10
        bmAttributes         0x00000001
          Sublink Speed Attribute count 1
          Sublink Speed ID count 0
        wFunctionalitySupport   0x1100
        bmSublinkSpeedAttr[0]   0x000a4030
          Speed Attribute ID: 0 10Gb/s Symmetric RX SuperSpeedPlus
        bmSublinkSpeedAttr[1]   0x000a40b0
          Speed Attribute ID: 0 10Gb/s Symmetric TX SuperSpeedPlus
    Device Status:     0x0000
      (Bus Powered)
    
    So ignore UAS driver for this device.
    
    Signed-off-by: Hongyu Xie <xiehongyu1@kylinos.cn>
    Cc: stable <stable@kernel.org>
    Link: https://lore.kernel.org/r/20250519023328.1498856-1-xiehongyu1@kylinos.cn
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

usb: typec: ucsi: fix Clang -Wsign-conversion warning [+ + +]
Author: Qasim Ijaz <qasdev00@gmail.com>
Date:   Tue Apr 22 14:47:17 2025 +0100

    usb: typec: ucsi: fix Clang -Wsign-conversion warning
    
    commit f4239ace2dd8606f6824757f192965a95746da05 upstream.
    
    debugfs.c emits the following warnings when compiling with the -Wsign-conversion flag with clang 15:
    
    drivers/usb/typec/ucsi/debugfs.c:58:27: warning: implicit conversion changes signedness: 'int' to 'u32' (aka 'unsigned int') [-Wsign-conversion]
                    ucsi->debugfs->status = ret;
                                          ~ ^~~
    drivers/usb/typec/ucsi/debugfs.c:71:25: warning: implicit conversion changes signedness: 'u32' (aka 'unsigned int') to 'int' [-Wsign-conversion]
                    return ucsi->debugfs->status;
                    ~~~~~~ ~~~~~~~~~~~~~~~^~~~~~
    
    During ucsi_cmd() we see:
    
            if (ret < 0) {
                    ucsi->debugfs->status = ret;
                    return ret;
            }
    
    But "status" is u32 meaning unsigned wrap-around occurs when assigning a value which is < 0 to it, this obscures the real status.
    
    To fix this make the "status" of type int since ret is also of type int.
    
    Fixes: df0383ffad64 ("usb: typec: ucsi: Add debugfs for ucsi commands")
    Cc: stable@vger.kernel.org
    Signed-off-by: Qasim Ijaz <qasdev00@gmail.com>
    Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
    Link: https://lore.kernel.org/r/20250422134717.66218-1-qasdev00@gmail.com
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

usb: usbtmc: Fix timeout value in get_stb [+ + +]
Author: Dave Penkler <dpenkler@gmail.com>
Date:   Wed May 21 14:16:56 2025 +0200

    usb: usbtmc: Fix timeout value in get_stb
    
    commit 342e4955a1f1ce28c70a589999b76365082dbf10 upstream.
    
    wait_event_interruptible_timeout requires a timeout argument
    in units of jiffies. It was being called in usbtmc_get_stb
    with the usb timeout value which is in units of milliseconds.
    
    Pass the timeout argument converted to jiffies.
    
    Fixes: 048c6d88a021 ("usb: usbtmc: Add ioctls to set/get usb timeout")
    Cc: stable@vger.kernel.org
    Signed-off-by: Dave Penkler <dpenkler@gmail.com>
    Link: https://lore.kernel.org/r/20250521121656.18174-4-dpenkler@gmail.com
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>