<feed xmlns='http://www.w3.org/2005/Atom'>
<title>laptop-kernel/drivers/ufs/host, branch master</title>
<subtitle>Linux kernel tree for laptop</subtitle>
<id>https://git.zx2c4.com/laptop-kernel/atom/drivers/ufs/host?h=master</id>
<link rel='self' href='https://git.zx2c4.com/laptop-kernel/atom/drivers/ufs/host?h=master'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/laptop-kernel/'/>
<updated>2026-10-11T16:23:19Z</updated>
<entry>
<title>Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi</title>
<updated>2026-10-11T16:23:19Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2026-10-11T16:23:19Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/laptop-kernel/commit/?id=d5b6dc381db93ff2d1888f7d99c06e0bd85f4083'/>
<id>urn:sha1:d5b6dc381db93ff2d1888f7d99c06e0bd85f4083</id>
<content type='text'>
Pull SCSI fixes from James Bottomley:
 "Driver (and tape media changer) only fixes. Three of the fixes are
  about the same size, (ch, ufs decouble CQ and ufs avoid unsafe MMIO)
  but the unsafe MMIO is the least obvious logic change"

* tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
  scsi: ufs: core: Decouple CQ sweep from request iterator in MCQ
  scsi: ufs: core: Avoid unsafe MMIO reads in ufshcd_mcq_compl_all_cqes_lock()
  scsi: ch: Do not keep references to data transfer element devices
  scsi: ufs: mediatek: Handle mPHY power-on failures
  scsi: qedi: Initialize callback state before registration
  scsi: ufs: core: Hold a clock reference across the probe
</content>
</entry>
<entry>
<title>scsi: ufs: mediatek: Handle mPHY power-on failures</title>
<updated>2026-10-06T01:50:54Z</updated>
<author>
<name>Pengpeng Hou</name>
<email>hppiscas@163.com</email>
</author>
<published>2026-09-20T03:49:53Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/laptop-kernel/commit/?id=78e04810542da416d3bead707b60cec773f1524d'/>
<id>urn:sha1:78e04810542da416d3bead707b60cec773f1524d</id>
<content type='text'>
The MediaTek helper enables VA09 before powering on the mPHY, but ignores
the PHY result. A failure can leave VA09 enabled and publish
mphy_powered_on as true, so a later power-on attempt is skipped.

Check phy_power_on(), attempt to unwind VA09 on failure, and leave the
state flag unchanged. Propagate the helper result from host initialization
as well as its existing resume caller. Keep the original PHY error if the
supply rollback also fails, and report that rollback separately.

The issue was found by our static-analysis tool.

Fixes: 561e3a8726b2 ("scsi: ufs-mediatek: Fix unbalanced clock on/off")
Fixes: cf137b3ea49a ("scsi: ufs-mediatek: Support VA09 regulator operations")
Assisted-by: gpt 5
Signed-off-by: Pengpeng Hou &lt;hppiscas@163.com&gt;
Reviewed-by: Peter Wang &lt;peter.wang@mediatek.com&gt;
Reviewed-by: Stanley Jhu &lt;stanleyjhu@google.com&gt;
Link: https://patch.msgid.link/20260920034953.19535-1-hppiscas@163.com
Signed-off-by: Martin K. Petersen (Oracle) &lt;mkp@kernel.org&gt;
</content>
</entry>
<entry>
<title>Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi</title>
<updated>2026-09-25T21:41:52Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2026-09-25T21:41:52Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/laptop-kernel/commit/?id=049380360ca6f4cc22ac2f67fe95b98967c887f0'/>
<id>urn:sha1:049380360ca6f4cc22ac2f67fe95b98967c887f0</id>
<content type='text'>
Pull SCSI fixes from James Bottomley:
 "Mostly small driver fixes. The biggest fix is the one to the block
  zone handling which might trip for real or virtual hardware if the
  number of zones is &gt; 2^32"

* tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
  scsi: megaraid_sas: Protect megasas_get_ctrl_info() in megasas_resume()
  scsi: sd_zbc: Reject disks with too many zones
  scsi: block: Fix zones_cond out-of-bounds write on zone report
  scsi: leapraid: Avoid -Wformat-security warning
  scsi: devinfo: Add BLIST_SKIP_IO_HINTS for EMC Symmetrix
  scsi: libiscsi_tcp: Check the data direction of a Data-In PDU
  scsi: ufs: pltfrm: Add quirk for R-Car S4 lacking lanes-per-direction
  scsi: ufs: core: Keep internal commands dispatchable during error handling
</content>
</entry>
<entry>
<title>scsi: ufs: pltfrm: Add quirk for R-Car S4 lacking lanes-per-direction</title>
<updated>2026-09-16T01:46:36Z</updated>
<author>
<name>Geert Uytterhoeven</name>
<email>geert+renesas@glider.be</email>
</author>
<published>2026-09-14T14:00:01Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/laptop-kernel/commit/?id=c9ee6511332687ea714ad8ab86a53cb837d86eea'/>
<id>urn:sha1:c9ee6511332687ea714ad8ab86a53cb837d86eea</id>
<content type='text'>
Since commit e72323f3b09f ("scsi: ufs: core: Configure only active lanes
during link"), the following error is observed on R-Car S4:

    ufshcd-renesas e6860000.ufs: Tx lane mismatch [config,reported] [2,1]
    ufshcd-renesas e6860000.ufs: link startup failed -67
    ufshcd-renesas e6860000.ufs: error -ENOLINK: Initialization failed with error -67
    ufshcd-renesas e6860000.ufs: probe with driver ufshcd-renesas failed with error -67

R-Car S4 has one UFS lane per direction, as described in section 152.1 of
its hardware manual.  Without lanes-per-direction, the UFS platform driver
defaults to two lanes.

Previously, the core used PA_CONNECTEDRXDATALANES and
PA_CONNECTEDTXDATALANES to configure the link without checking them against
lanes-per-direction, so the missing property did not prevent
initialization.

While fixing the R-Car S4 DTS is the proper solution, doing only that would
still break backwards compatibility with existing DTBs.  Hence add a quirk
to let lanes-per-direction default to one on R-Car S4.

Fixes: e72323f3b09f9c89 ("scsi: ufs: core: Configure only active lanes during link")
Reported-by: Koichiro Den &lt;den@valinux.co.jp&gt;
Closes: https://lore.kernel.org/20260911073058.253000-1-den@valinux.co.jp
Cc: stable@vger.kernel.org # 7.2+
Signed-off-by: Geert Uytterhoeven &lt;geert+renesas@glider.be&gt;
Link: https://patch.msgid.link/ae0cc2bd764e6dfffce99db3d8b44a55887c508c.1789394185.git.geert+renesas@glider.be
Signed-off-by: Martin K. Petersen (Oracle) &lt;mkp@kernel.org&gt;
</content>
</entry>
<entry>
<title>Merge tag 'kmalloc_obj-v7.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux</title>
<updated>2026-09-06T03:45:18Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2026-09-06T03:45:18Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/laptop-kernel/commit/?id=1fc5a74b108fc90951890ec513ac81869f5eaff1'/>
<id>urn:sha1:1fc5a74b108fc90951890ec513ac81869f5eaff1</id>
<content type='text'>
Pull kmalloc_obj conversions from Kees Cook:
 "Another run of the Coccinelle script for converting kmalloc()
  family of allocations to kmalloc_obj() via the existing rules
  in scripts/coccinelle/api/kmalloc_objs.cocci"

* tag 'kmalloc_obj-v7.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux:
  treewide: refresh kmalloc_obj() conversions
  drm/amd/display: Fix harmless type mismatch in allocation
</content>
</entry>
<entry>
<title>treewide: refresh kmalloc_obj() conversions</title>
<updated>2026-09-05T04:37:00Z</updated>
<author>
<name>Kees Cook</name>
<email>kees+treewide@kernel.org</email>
</author>
<published>2026-09-02T22:31:14Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/laptop-kernel/commit/?id=3a2c4d55e32ad65efebdb6de44eef3bfa08bb49d'/>
<id>urn:sha1:3a2c4d55e32ad65efebdb6de44eef3bfa08bb49d</id>
<content type='text'>
This is another run of the Coccinelle script for converting kmalloc()
family of allocations to kmalloc_obj() via the existing rules in
scripts/coccinelle/api/kmalloc_objs.cocci

This catches both the set of kmalloc() uses added since the first
kmalloc_obj() conversions in v7.0 and adds a large group missed in the
first pass due to Coccinelle not interacting well with the cleanup.h
scoped_...() family of macros[1]. I worked around this with spatch's
"--macro-file" argument to a file with all the scoped_...() macros mapped
to Coccinelle's YACFE_ITERATOR[2] as that was the closest viable control
flow indicator I could find.

Build tested allmodconfig on x86, arm64, arm, loongarch, mips, powerpc,
riscv, and s390 with no new warnings.

Link: https://lore.kernel.org/lkml/202609021314.8A9C0B8@keescook/ [1]
Link: https://github.com/coccinelle/coccinelle/blob/master/standard.h [2]
Signed-off-by: Kees Cook &lt;kees+treewide@kernel.org&gt;
</content>
</entry>
<entry>
<title>scsi: ufs: ufs-pci: Add MCQ support for Intel UFS 4.0 controllers</title>
<updated>2026-08-29T02:12:57Z</updated>
<author>
<name>sangram kumar yerra</name>
<email>sangram.k.y@intel.com</email>
</author>
<published>2026-08-18T11:28:30Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/laptop-kernel/commit/?id=c46cc9cee39bd6f395ab9ac98b1794705df13d7c'/>
<id>urn:sha1:c46cc9cee39bd6f395ab9ac98b1794705df13d7c</id>
<content type='text'>
The Intel UFS 4.0 PCI variant (PCI ID 8086:D335) advertises MCQ support
in its capability register. However, ufshcd_alloc_mcq() also requires an
.op_runtime_config hook to locate the per-queue operation and runtime
(OPR) register blocks, which was not provided by this variant operations
table.

As a result, MCQ initialization fails and ufshcd_add_scsi_host() prints
"MCQ mode is disabled, err=%d\n" before falling back to legacy
single-doorbell (SDB) mode.

Add ufs_intel_mcq_config_resource() to initialize the MCQ configuration
base and add ufs_intel_op_runtime_config() to set up the OPR register
offsets and stride.

Wire both hooks into the variant operations table so MCQ is enabled when
supported by the hardware.

Fixes: 096cd6b7adf2 ("scsi: ufs: ufs-pci: Add support for Intel Nova Lake")
Signed-off-by: sangram kumar yerra &lt;sangram.k.y@intel.com&gt;
Reviewed-by: Adrian Hunter &lt;adrian.hunter@intel.com&gt;
Reviewed-by: Bart Van Assche &lt;bvanassche@acm.org&gt;
Link: https://patch.msgid.link/20260818112830.453402-3-sangram.k.y@intel.com
Signed-off-by: Martin K. Petersen (Oracle) &lt;mkp@kernel.org&gt;
</content>
</entry>
<entry>
<title>scsi: ufs: ufs-pci: Add support for Intel UFS 4.0 HS-Gear5</title>
<updated>2026-08-29T02:12:57Z</updated>
<author>
<name>sangram kumar yerra</name>
<email>sangram.k.y@intel.com</email>
</author>
<published>2026-08-18T11:28:29Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/laptop-kernel/commit/?id=ef675ea168453a9b3e635b8ac543f92938bdd03b'/>
<id>urn:sha1:ef675ea168453a9b3e635b8ac543f92938bdd03b</id>
<content type='text'>
Reliable HS-Gear5 operation on Intel UFS 4.0 controllers requires
configuring PA_INITIAL_ADAPT before changing the power mode. Without
this setting, the link fails to train reliably at Gear5.

Add a pwr_change_notify() hook to configure the adaptation mode before
the power mode transition. Enable this only for UFS 4.0 and later
controllers by checking hba-&gt;ufs_version.

Wire the hook into the existing Meteor Lake family variant operations
table (ufs_intel_mtl_hba_vops) instead of introducing a separate table,
since the Intel UFS 4.0 PCI variant (PCI ID 8086:D335) already uses this
vops table and the hook is internally gated on UFS version &gt;= 4.0.

Use PA_INITIAL_ADAPT when the negotiated TX power mode is FAST_MODE or
FASTAUTO_MODE. Otherwise, reset the adaptation mode to PA_NO_ADAPT,
which is the default setting.

Fixes: 096cd6b7adf2 ("scsi: ufs: ufs-pci: Add support for Intel Nova Lake")
Signed-off-by: sangram kumar yerra &lt;sangram.k.y@intel.com&gt;
Reviewed-by: Adrian Hunter &lt;adrian.hunter@intel.com&gt;
Reviewed-by: Bart Van Assche &lt;bvanassche@acm.org&gt;
Link: https://patch.msgid.link/20260818112830.453402-2-sangram.k.y@intel.com
Signed-off-by: Martin K. Petersen (Oracle) &lt;mkp@kernel.org&gt;
</content>
</entry>
<entry>
<title>scsi: ufs: ufs-qcom: Fix sequential read variance</title>
<updated>2026-08-29T01:55:10Z</updated>
<author>
<name>Nitin Rawat</name>
<email>nitin.rawat@oss.qualcomm.com</email>
</author>
<published>2026-08-25T14:52:03Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/laptop-kernel/commit/?id=b2ededcb271b37510366cbf6853be193d681ba5c'/>
<id>urn:sha1:b2ededcb271b37510366cbf6853be193d681ba5c</id>
<content type='text'>
The current devfreq downdifferential threshold of 5% causes overly
aggressive frequency downscaling, leading to performance degradation
sometimes during sequential read workloads.

Update the UFS devfreq downdifferential threshold to 65.  This widens
the hysteresis window and prevents overly aggressive downscaling,
ensuring that frequency is maintained for loads above 5% and scaling
down occurs only when utilization falls below this level, while scale-up
still triggers above the 70% threshold.

Reviewed-by: Konrad Dybcio &lt;konrad.dybcio@oss.qualcomm.com&gt;
Signed-off-by: Nitin Rawat &lt;nitin.rawat@oss.qualcomm.com&gt;
Link: https://patch.msgid.link/20260825145203.265579-3-nitin.rawat@oss.qualcomm.com
Signed-off-by: Martin K. Petersen (Oracle) &lt;mkp@kernel.org&gt;
</content>
</entry>
<entry>
<title>scsi: ufs: ufs-qcom: Restore HS/LS link startup mode for Qualcomm UFS controller v6.2+</title>
<updated>2026-08-29T01:55:10Z</updated>
<author>
<name>Nitin Rawat</name>
<email>nitin.rawat@oss.qualcomm.com</email>
</author>
<published>2026-08-25T14:52:02Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/laptop-kernel/commit/?id=a3756f53baf1830c65149cfcb81cb96360976cf3'/>
<id>urn:sha1:a3756f53baf1830c65149cfcb81cb96360976cf3</id>
<content type='text'>
The link startup mode (HS LSS - high-speed link startup, or LS LSS -
low-speed link startup) is decided in the boot stage based on the
bootconfig GPIO. This selection is carried forward through the secondary
stage bootloaders and finally to HLOS via the spare configuration
register (REG_UFS_DEBUG_SPARE_CFG).

On Qualcomm UFS controller v6.2 and later, bit 31 in the spare
configuration register indicates the high-speed link startup mode
selection, as per the Hardware Programming Guide (HPG).

The spare register value is read during host driver initialization but
gets cleared after UFS reset. Preserve the spare register value during
initialization and restore it during link startup to maintain the
bootloader-configured link startup mode.

Signed-off-by: Nitin Rawat &lt;nitin.rawat@oss.qualcomm.com&gt;
Tested-by: Mukesh Ojha &lt;mukesh.ojha@oss.qualcomm.com&gt;
Link: https://patch.msgid.link/20260825145203.265579-2-nitin.rawat@oss.qualcomm.com
Signed-off-by: Martin K. Petersen (Oracle) &lt;mkp@kernel.org&gt;
</content>
</entry>
</feed>
