]> git.ipfire.org Git - thirdparty/kernel/linux.git/log
thirdparty/kernel/linux.git
2 months agoscsi: virtio_scsi: Move INIT_WORK calls to virtscsi_probe()
Joshua Daley [Wed, 25 Mar 2026 18:08:56 +0000 (19:08 +0100)] 
scsi: virtio_scsi: Move INIT_WORK calls to virtscsi_probe()

The last step of virtscsi_handle_event() is to call
virtscsi_kick_event(), which calls INIT_WORK on its own work
item. INIT_WORK resets the work item's data bits to 0.

If this occurs while the work item is being flushed by
cancel_work_sync(), then kernel/workqueue.c/work_offqd_enable triggers a
kernel warning, as it expects the "disable" bit to be 1:

[   21.450115] workqueue: work disable count underflowed
[   21.450117] WARNING: CPU: 1 PID: 56 at kernel/workqueue.c:4328 enable_work+0x10a/0x120
...
[   21.450171] Call Trace:
[   21.450173]  [<000003db2e5bdc3e>] enable_work+0x10e/0x120
[   21.450176] ([<000003db2e5bdc3a>] enable_work+0x10a/0x120)
[   21.450178]  [<000003db2e5bdd86>] cancel_work_sync+0x86/0xa0
[   21.450181]  [<000003daae97d9e4>] virtscsi_remove+0xb4/0xd0 [virtio_scsi]
[   21.450184]  [<000003db2ef3b5ca>] virtio_dev_remove+0x6a/0xd0
[   21.450186]  [<000003db2ef9106c>] device_release_driver_internal+0x1ac/0x260
[   21.450190]  [<000003db2ef8edc8>] bus_remove_device+0xf8/0x190
[   21.450192]  [<000003db2ef88d72>] device_del+0x142/0x340
[   21.450194]  [<000003db2ef88fa0>] device_unregister+0x30/0xa0
[   21.450196]  [<000003db2ef3b2fa>] unregister_virtio_device+0x2a/0x40

This warning may occur if a controller is detached immediately following
a disk detach.

Move the INIT_WORK call to prevent this. Don't re-init event list work
items in virtscsi_kick_event(), init them only once in virtscsi_probe()
instead.

Signed-off-by: Joshua Daley <jdaley@linux.ibm.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Link: https://patch.msgid.link/20260325180857.3675854-2-jdaley@linux.ibm.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2 months agoscsi: fc: Fix typo in fc_els.h
Dave Marquardt [Tue, 24 Mar 2026 16:56:25 +0000 (11:56 -0500)] 
scsi: fc: Fix typo in fc_els.h

Fixed spelling error in fe_els.h. Change "caause" to "cause".

Signed-off-by: Dave Marquardt <davemarq@linux.ibm.com>
Link: https://patch.msgid.link/20260324-fix-typo-v1-1-601f4fde35bc@linux.ibm.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2 months agoscsi: target: Replace strncpy() with strscpy() in VPD dump functions
Kees Cook [Mon, 23 Mar 2026 17:13:15 +0000 (10:13 -0700)] 
scsi: target: Replace strncpy() with strscpy() in VPD dump functions

Replace the deprecated[1] strncpy() with strscpy() in
transport_dump_vpd_proto_id(), transport_dump_vpd_assoc(),
transport_dump_vpd_ident_type(), and transport_dump_vpd_ident().

All four functions follow the same pattern: a local
buf[VPD_TMP_BUF_SIZE] (254 bytes) is zeroed with memset(), populated
via sprintf()/snprintf() (always NUL-terminated), then conditionally
copied to p_buf with strncpy(). The p_buf destination is used as a
C string by all callers in target_core_configfs.c: strlen(buf) and
sprintf(page+len, "%s", buf) to build sysfs output.

NUL-padding is not required: callers in target_core_configfs.c
pre-zero p_buf with memset() or initializer before calling these
functions, and consume p_buf only as a NUL-terminated C string via
strlen() and "%s", never exposing trailing bytes.

No behavioral change: the source buf is always NUL-terminated and
shorter than VPD_TMP_BUF_SIZE, so strscpy() produces identical output.

Link: https://github.com/KSPP/linux/issues/90
Signed-off-by: Kees Cook <kees@kernel.org>
Reviewed-by: Kees Cook <keescook@chromium.org>
Link: https://patch.msgid.link/20260323171311.work.101-kees@kernel.org
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2 months agoscsi: esas2r: Fix __printf annotation on esas2r_log_master()
Arnd Bergmann [Mon, 23 Mar 2026 09:57:39 +0000 (10:57 +0100)] 
scsi: esas2r: Fix __printf annotation on esas2r_log_master()

clang-22 started warning about functions that take printf format
strings:

drivers/scsi/esas2r/esas2r_log.c:160:50: error: diagnostic behavior may be improved by adding the 'format(printf, 3, 0)' attribute to the declaration of 'esas2r_log_master' [-Werror,-Wmissing-format-attribute]
  121 |                 retval = vsnprintf(buffer, buflen, format, args);
      |                                                                ^
drivers/scsi/esas2r/esas2r_log.c:121:12: note: 'esas2r_log_master' declared here
  121 | static int esas2r_log_master(const long level,
      |            ^

The warning already got silenced for gcc but not clang in the past.
Rather than modify that hack to turn it off for both, just add the
attribute as suggested and remove the pragma again.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Link: https://patch.msgid.link/20260323100027.1975646-1-arnd@kernel.org
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2 months agoscsi: ufs: rockchip: Drop unused include
Andy Shevchenko [Fri, 20 Mar 2026 21:56:06 +0000 (22:56 +0100)] 
scsi: ufs: rockchip: Drop unused include

This driver includes the legacy header <linux/gpio.h> but does not use
any symbols from it. Drop the inclusion.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Reviewed-by: Shawn Lin <shawn.lin@rock-chips.com>
Link: https://patch.msgid.link/20260320215606.3236516-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2 months agoscsi: lpfc: Use the crc32c() function
Eric Biggers [Mon, 16 Mar 2026 22:36:31 +0000 (15:36 -0700)] 
scsi: lpfc: Use the crc32c() function

lpfc_cgn_calc_crc32(data, size, crc) is really just an open-coded version
of ~crc32c(bitrev32(crc), data, size).  However, all callers pass crc ==
~0, so it can be simplified even further to just ~crc32c(~0, data, size).
Remove the crc argument and implement it that way.

While we're at it, also use proper types in the function prototype.

Signed-off-by: Eric Biggers <ebiggers@kernel.org>
Link: https://patch.msgid.link/20260316223631.72361-1-ebiggers@kernel.org
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2 months agoscsi: ufs: core: Handle MCQ IAG events
vamshi gajjela [Tue, 10 Mar 2026 19:03:08 +0000 (00:33 +0530)] 
scsi: ufs: core: Handle MCQ IAG events

Add support for handling aggregation-based interrupts when operating in MCQ
mode.

In legacy interrupt mode, an IE.IAGES is triggered when the counter or
timer threshold is reached. To manage this, the handler now resets the
aggregation counter and timer by writing to the MCQIACRy.CTR register.

Since the register layout of MCQIACRy is identical to the existing UTRIACR
register, this implementation reuses the previously defined bitfield masks
to maintain consistency and reduce code duplication.

Extend ufshcd_handle_mcq_cq_events() with a boolean iag parameter.  If set,
the handler resets the MCQ IAG counter and timer.

Define MCQ_IAG_EVENT_STATUS (0x200000) and include it in
UFSHCD_ENABLE_MCQ_INTRS to ensure the interrupt is unmasked during
initialization.

Signed-off-by: Vamshi Gajjela <vamshigajjela@google.com>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Link: https://patch.msgid.link/20260310190308.2474956-1-vamshigajjela@google.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2 months agoscsi: ufs: rockchip,rk3576-ufshc: dt-bindings: Add new mphy reset item
Shawn Lin [Fri, 13 Mar 2026 02:21:07 +0000 (10:21 +0800)] 
scsi: ufs: rockchip,rk3576-ufshc: dt-bindings: Add new mphy reset item

Add the mphy reset property to the devicetree bindings for the Rockchip
RK3576 UFS host controller. The mphy reset signal is used to reset the
physical adapter. Resetting other components while leaving the mphy unreset
may occasionally prevent the UFS controller from successfully linking up
with the device.

This addresses an intermittent hardware bug where the UFS link fails to
establish under specific timing conditions with certain chips. While
difficult to reproduce initially, this issue was consistently observed in
downstream testing and requires explicit mphy reset control for full
stability.

Although this change increases the maxItems for resets and adds a new entry
(which technically alters the binding ABI), it does not break compatibility
for existing Linux systems. The driver uses
devm_reset_control_array_get_exclusive() to manage resets, allowing it to
function correctly with both older Device Trees (without the mphy entry)
and newer ones.

Fixes: d90e92023771 ("scsi: ufs: dt-bindings: Document Rockchip UFS host controller")
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Link: https://patch.msgid.link/1773368467-109650-1-git-send-email-shawn.lin@rock-chips.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2 months agoscsi: ufs: qcom: dt-bindings: Document the Eliza UFS controller
Abel Vesa [Wed, 11 Mar 2026 13:04:04 +0000 (15:04 +0200)] 
scsi: ufs: qcom: dt-bindings: Document the Eliza UFS controller

Document the UFS Controller on the Eliza Platform.

The IP block version here is 6.0.0, exactly the same as on SM8650.

While MCQ reg range is also available on the already documented platforms,
enforce only starting with Eliza.

Signed-off-by: Abel Vesa <abel.vesa@oss.qualcomm.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Link: https://patch.msgid.link/20260311-eliza-bindings-ufs-v3-1-498b26864182@oss.qualcomm.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2 months agoscsi: target: core: Fix integer overflow in UNMAP bounds check
Junrui Luo [Wed, 4 Mar 2026 15:42:58 +0000 (23:42 +0800)] 
scsi: target: core: Fix integer overflow in UNMAP bounds check

sbc_execute_unmap() checks LBA + range does not exceed the device capacity,
but does not guard against LBA + range wrapping around on 64-bit overflow.

Add an overflow check matching the pattern already used for WRITE_SAME in
the same file.

Fixes: 86d7182985d2 ("target: Add sbc_execute_unmap() helper")
Reported-by: Yuhao Jiang <danisjiang@gmail.com>
Signed-off-by: Junrui Luo <moonafterrain@outlook.com>
Link: https://patch.msgid.link/SYBPR01MB7881593C61AD52C69FBDB0BDAF7CA@SYBPR01MB7881.ausprd01.prod.outlook.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2 months agoscsi: ufs: host: mediatek: Add VCC on delay for stability
Ed Tsai [Tue, 10 Mar 2026 00:52:30 +0000 (08:52 +0800)] 
scsi: ufs: host: mediatek: Add VCC on delay for stability

Introduce a delay after enabling UFS5 VCC for MT6995 to ensure voltage
stability before refclk activation.

Signed-off-by: Ed Tsai <ed.tsai@mediatek.com>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Link: https://patch.msgid.link/20260310005230.4001904-6-ed.tsai@mediatek.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2 months agoscsi: ufs: core: Add quirks for VCC ramp-up delay
Ed Tsai [Tue, 10 Mar 2026 00:52:28 +0000 (08:52 +0800)] 
scsi: ufs: core: Add quirks for VCC ramp-up delay

On some platforms, the VCC regulator has a slow ramp-up time. Add a delay
after enabling VCC to ensure voltage has fully stabilized before we enable
the clocks.

Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Ed Tsai <ed.tsai@mediatek.com>
Link: https://patch.msgid.link/20260310005230.4001904-4-ed.tsai@mediatek.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2 months agoscsi: ufs: ufs-pci: Add support for Intel Nova Lake
Adrian Hunter [Mon, 9 Mar 2026 08:58:15 +0000 (10:58 +0200)] 
scsi: ufs: ufs-pci: Add support for Intel Nova Lake

Add PCI ID to support Intel Nova Lake, same as Intel Meteor Lake (MTL).

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Link: https://patch.msgid.link/20260309085815.55216-1-adrian.hunter@intel.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2 months agoscsi: target: core: Fix complete_type use
Mike Christie [Sat, 7 Mar 2026 22:06:30 +0000 (16:06 -0600)] 
scsi: target: core: Fix complete_type use

There were two copy and paste type of errors where I swapped 'complete'
with 'submit' names. Use the correct variables and definitions.

This problem was found by Dmitry Bogdanov and this patch builds on top of
his patch to fix a second instance that was found.

Fixes: 06933066d88a ("scsi: target: Add support for completing commands from backend context")
Signed-off-by: Dmitry Bogdanov <d.bogdanov@yadro.com>
[mnc: Fixed second instance]
Signed-off-by: Mike Christie <michael.christie@oracle.com>
Link: https://patch.msgid.link/20260307220630.131008-1-michael.christie@oracle.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2 months agoscsi: qla2xxx: Add support to report MPI FW state
Nilesh Javali [Thu, 5 Mar 2026 09:33:37 +0000 (15:03 +0530)] 
scsi: qla2xxx: Add support to report MPI FW state

MPI firmware state was returned as 0.  Get MPI FW state to proceed with
flash image validation.

A new sysfs node 'mpi_fw_state' is added to report MPI firmware state:

    /sys/class/scsi_host/hostXX/mpi_fw_state

Fixes: d74181ca110e ("scsi: qla2xxx: Add bsg interface to support firmware img validation")
Signed-off-by: Nilesh Javali <njavali@marvell.com>
Link: https://patch.msgid.link/20260305093337.2007205-1-njavali@marvell.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2 months agoscsi: hisi_sas: Fix the risk of overflow in bitwise logical operations
Yihang Li [Thu, 5 Mar 2026 06:47:00 +0000 (14:47 +0800)] 
scsi: hisi_sas: Fix the risk of overflow in bitwise logical operations

Fix a few constants defined via macros that had overflow risks.

Signed-off-by: Yihang Li <liyihang9@huawei.com>
Link: https://patch.msgid.link/20260305064700.116033-3-liyihang9@huawei.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2 months agoscsi: hisi_sas: Correct printing format issues
Yihang Li [Thu, 5 Mar 2026 06:46:59 +0000 (14:46 +0800)] 
scsi: hisi_sas: Correct printing format issues

There are some print format errors, fix them.

Signed-off-by: Yihang Li <liyihang9@huawei.com>
Link: https://patch.msgid.link/20260305064700.116033-2-liyihang9@huawei.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2 months agoscsi: ufs: core: Avoid IRQ thread wakeup during active UIC command
Peter Wang [Fri, 6 Mar 2026 05:43:02 +0000 (13:43 +0800)] 
scsi: ufs: core: Avoid IRQ thread wakeup during active UIC command

Only return IRQ_WAKE_THREAD when MCQ and ESI are not enabled and no UIC
command is active. The default UIC command timeout is 500ms, Using threaded
IRQs during an active UIC command increases the risk of timeout due to
possible preemption by other system IRQs.

Signed-off-by: Peter Wang <peter.wang@mediatek.com>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Link: https://patch.msgid.link/20260306054419.3816557-1-peter.wang@mediatek.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2 months agoscsi: ufs: core: Add support to notify userspace of UniPro QoS events
Can Guo [Thu, 5 Mar 2026 11:08:56 +0000 (03:08 -0800)] 
scsi: ufs: core: Add support to notify userspace of UniPro QoS events

The UniPro stack manages to repair many potential Link problems without the
need to notify the Application Layer. Repair mechanisms of the stack
include L2 re-transmission and successful handling of PA_INIT.req.
Nevertheless, any successful repair sequence requires Link bandwidth that
is no longer vailable for the Application. Therefore, it may be useful for
an Application to understand how often such repair attempts are made.

The DME implements Quality of Service monitoring using a simple counting
scheme, counting error events and comparing them against the number of
correctly received or transmitted bytes. When the error counter exceeds a
programmed threshold before the byte counter overflows, a DME_QoS.ind is
issued to the Application and both counters are reset. When the byte
counter overflows before the error counter has reached the programmed
threshold, both counters are reset without triggering a DME_QoS.ind.

The DME provides Link quality monitoring for the following purposes:

1. Detection of re-occurring repaired fatal error conditions on the Link
   (PA_INIT loop). This kind of detection is useful if capabilities
   exchanged between local and peer permit a potential operation at a
   higher M-PHY Gear, but the physical interconnect between local and peer
   Device does not, or, after Line quality degradation, no longer satisfies
   channel characteristics.

2. Detection of degraded inbound or outbound Link quality, to allow an
   Application to issue an ADAPT sequence for a Link running in HS-G4 or
   higher HS Gears. This kind of detection is used to monitor a slowly
   degrading Link quality, e.g., one being affected by temperature and
   voltage variations, against the expected M-PHY bit error rate.

Userspace can configure and enable UniPro QoS via UniPro QoS Attributes
(via UFS BSG) and get notified by dme_qos_notification without polling
UniPro QoS Status attribute. The dme_qos_notification attribute is a
bitfield with the following bit assignments:

   Bit Description
   === ======================================
   0 DME QoS Monitor has been reset by host
   1 QoS from TX is detected
   2 QoS from RX is detected
   3 QoS from PA_INIT is detected

Signed-off-by: Can Guo <can.guo@oss.qualcomm.com>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Reviewed-by: Peter Wang <peter.wang@mediatek.com>
Link: https://patch.msgid.link/20260305110856.959211-2-can.guo@oss.qualcomm.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2 months agoscsi: core: Drop using the host_lock to protect async_scan race condition
Chaohai Chen [Thu, 5 Mar 2026 02:51:24 +0000 (10:51 +0800)] 
scsi: core: Drop using the host_lock to protect async_scan race condition

Previously, host_lock was used to prevent bit-set conflicts in async_scan,
but this approach introduced naked reads in some code paths.

Convert async_scan from a bitfield to a bool type to eliminate bit-level
conflicts entirely. Use __guarded_by(&scan_mutex) to indicate that the
async_scan variable is protected by scan_mutex.

Signed-off-by: Chaohai Chen <wdhh6@aliyun.com>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Reviewed-by: John Garry <john.g.garry@oracle.com>
Link: https://patch.msgid.link/20260305025125.3649517-1-wdhh6@aliyun.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2 months agoMerge patch series "scsi: target: Add support for completing commands from backend...
Martin K. Petersen [Sun, 1 Mar 2026 02:05:49 +0000 (21:05 -0500)] 
Merge patch series "scsi: target: Add support for completing commands from backend context"

The following patches made over Linus's current tree allow users to
tell the target layer to perform direct completions instead of always
deferring to LIO's completion workqueue. When the frontend driver
already has multiple worker threads (or you are doing a LUN per target
with a single thread per target) then bypassing the LIO workqueue can
increase performance 20-30%.

Link: https://patch.msgid.link/20260222232946.7637-1-michael.christie@oracle.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2 months agoscsi: vhost-scsi: Report direction completion support
Mike Christie [Sun, 22 Feb 2026 23:27:04 +0000 (17:27 -0600)] 
scsi: vhost-scsi: Report direction completion support

This has vhost-scsi report that it supports direct completions.

When using a worker task per queue or group of queues with fast backends
then enabling direct completion and submissions increases performance
20-30% with workloads like:

  fio --filename=/dev/sdb  --direct=1 --rw=randrw --bs=8K \
      --ioengine=libaio --iodepth=128  --numjobs=$jobs

As jobs matches and passes the number of vCPUs in the VM then the
benefit increases.

However, when using a single worker then queueing completions and
submissions is best as the worker is busy handling mapping data and
setting/tearing down commands.

Signed-off-by: Mike Christie <michael.christie@oracle.com>
Link: https://patch.msgid.link/20260222232946.7637-5-michael.christie@oracle.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2 months agoscsi: target: Allow userspace to set the completion type
Mike Christie [Sun, 22 Feb 2026 23:27:03 +0000 (17:27 -0600)] 
scsi: target: Allow userspace to set the completion type

This allows userspace to request if we complete in the backend context
or the frontend driver. It works the same as submission where you can
write 0 to 2 to complete_type:

 0 - Use the fabric driver's preference.

 1 - Complete from the backend calling context if the fabric supports
     it.

 2 - Queue the completion to LIO's completion workqueue.

Signed-off-by: Mike Christie <michael.christie@oracle.com>
Link: https://patch.msgid.link/20260222232946.7637-4-michael.christie@oracle.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2 months agoscsi: target: Use driver completion preference by default
Mike Christie [Sun, 22 Feb 2026 23:27:02 +0000 (17:27 -0600)] 
scsi: target: Use driver completion preference by default

This has us use the driver's completion preference by default. There is
no behavior changes with this patch and we queue completion to LIO's
completion workqueue by default.

Signed-off-by: Mike Christie <michael.christie@oracle.com>
Link: https://patch.msgid.link/20260222232946.7637-3-michael.christie@oracle.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2 months agoscsi: target: Add support for completing commands from backend context
Mike Christie [Sun, 22 Feb 2026 23:27:01 +0000 (17:27 -0600)] 
scsi: target: Add support for completing commands from backend context

To complete a command several drivers just drop their reference and add
it to list to be processed by a driver specific thread. So there's no
need to go from backend context to the LIO thread then to the driver's
thread. When avoiding the LIO thread, IOPS can increase from 20-30% for
workloads like:

  fio --filename=/dev/sdb  --direct=1 --rw=randrw --bs=8K \
    --ioengine=libaio --iodepth=128  --numjobs=$jobs

where increasing jobs increases the performance improvement (this is
using NVMe drives with LIO's submit_type=1 to directly submit).

Add the infrastructure so drivers and userspace can control how to
complete a command like is done for the submission path. In this commit
there is no behavior change and we continue to defer to the LIO
workqueue thread. In the subsequent commits we will allow drivers to
report what they support and allow userspace to control the behavior.

Signed-off-by: Mike Christie <michael.christie@oracle.com>
Link: https://patch.msgid.link/20260222232946.7637-2-michael.christie@oracle.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2 months agoscsi: sd: Enable sector size > PAGE_SIZE in SCSI sd driver
Swarna Prabhu [Thu, 19 Feb 2026 04:37:42 +0000 (20:37 -0800)] 
scsi: sd: Enable sector size > PAGE_SIZE in SCSI sd driver

The WRITE SAME(16) and WRITE SAME(10) SCSI commands use a page from a
dedicated mempool (sd_page_pool) for their payload. This pool was
initialized to allocate single pages, which was sufficient as long as the
device sector size did not exceed the PAGE_SIZE.

Given that block layer now supports block size upto 64KB, i.e. beyond
PAGE_SIZE, initialize a large page pool in sd_probe() if a higher sector
device is attached, ensuring atomicity. Adapt sd_set_special_bvec() to use
large page pool when a higher sector size device is attached. Hence enable
sector sizes > PAGE_SIZE in SCSI sd driver.

Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
Signed-off-by: Swarna Prabhu <s.prabhu@samsung.com>
Co-developed-by: Pankaj Raghav <p.raghav@samsung.com>
Signed-off-by: Pankaj Raghav <p.raghav@samsung.com>
Link: https://patch.msgid.link/20260219043741.276729-2-sw.prabhu6@gmail.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2 months agoscsi: sg: Remove deprecated sg-big-buff
Yang Erkun [Tue, 27 Jan 2026 06:20:44 +0000 (14:20 +0800)] 
scsi: sg: Remove deprecated sg-big-buff

These deprecated sysctl has been broken since commit 26d1c80fd61e
("scsi/sg: move sg-big-buff sysctl to scsi/sg.c") and nobody has found
this. I believe it's time to remove it, which will allow us to clean up a
significant amount of code.

Signed-off-by: Yang Erkun <yangerkun@huawei.com>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Link: https://patch.msgid.link/20260127062044.3034148-4-yangerkun@huawei.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2 months agoscsi: sg: Resolve soft lockup issue when opening /dev/sgX
Yang Erkun [Tue, 27 Jan 2026 06:20:43 +0000 (14:20 +0800)] 
scsi: sg: Resolve soft lockup issue when opening /dev/sgX

The parameter def_reserved_size defines the default buffer size reserved
for each Sg_fd and should be restricted to a range between 0 and 1,048,576
(see https://tldp.org/HOWTO/SCSI-Generic-HOWTO/proc.html).  Although the
function sg_proc_write_dressz enforces this limit, it is possible to bypass
it by directly modifying the module parameter as shown below, which then
causes a soft lockup:

echo -1 > /sys/module/sg/parameters/def_reserved_size
exec 4<> /dev/sg0

watchdog: BUG: soft lockup - CPU#5 stuck for 26 seconds! [bash:537]
Modules loaded:
CPU: 5 UID: 0 PID: 537 Command: bash, kernel version 6.19.0-rc3+ #134,
PREEMPT disabled
Hardware: QEMU Standard PC (i440FX + PIIX, 1996), BIOS version
1.16.1-2.fc37 dated 04/01/2014
...
Call Trace:

  sg_build_reserve+0x5c/0xa0
  sg_add_sfp+0x168/0x270
  sg_open+0x16e/0x340
  chrdev_open+0xbe/0x230
  do_dentry_open+0x175/0x480
  vfs_open+0x34/0xf0
  do_open+0x265/0x3d0
  path_openat+0x110/0x290
  do_filp_open+0xc3/0x170
  do_sys_openat2+0x71/0xe0
  __x64_sys_openat+0x6d/0xa0
  do_syscall_64+0x62/0x310
  entry_SYSCALL_64_after_hwframe+0x76/0x7e

The fix is to use module_param_cb to validate and reject invalid values
assigned to def_reserved_size.

Fixes: 6460e75a104d ("[SCSI] sg: fixes for large page_size")
Signed-off-by: Yang Erkun <yangerkun@huawei.com>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Link: https://patch.msgid.link/20260127062044.3034148-3-yangerkun@huawei.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2 months agoscsi: sg: Fix sysctl sg-big-buff register during sg_init()
Yang Erkun [Tue, 27 Jan 2026 06:20:42 +0000 (14:20 +0800)] 
scsi: sg: Fix sysctl sg-big-buff register during sg_init()

Commit 26d1c80fd61e ("scsi/sg: move sg-big-buff sysctl to scsi/sg.c") made
a mistake. sysctl sg-big-buff was not created because the call to
register_sg_sysctls() was placed on the wrong code path.

Fixes: 26d1c80fd61e ("scsi/sg: move sg-big-buff sysctl to scsi/sg.c")
Signed-off-by: Yang Erkun <yangerkun@huawei.com>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Link: https://patch.msgid.link/20260127062044.3034148-2-yangerkun@huawei.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2 months agoscsi: core: Add 'serial' sysfs attribute for SCSI/SATA
Igor Pylypiv [Mon, 9 Feb 2026 21:21:51 +0000 (13:21 -0800)] 
scsi: core: Add 'serial' sysfs attribute for SCSI/SATA

Add a 'serial' sysfs attribute for SCSI and SATA devices. This attribute
exposes the Unit Serial Number, which is derived from the Device
Identification Vital Product Data (VPD) page 0x80.

Whitespace is stripped from the retrieved serial number to handle the
different alignment (right-aligned for SCSI, potentially left-aligned for
SATA). As noted in SAT-5 10.5.3, "Although SPC-5 defines the PRODUCT SERIAL
NUMBER field as right-aligned, ACS-5 does not require its SERIAL NUMBER
field to be right-aligned. Therefore, right-alignment of the PRODUCT SERIAL
NUMBER field for the translation is not assured."

This attribute is used by tools such as lsblk to display the serial number
of block devices.

[mkp: length adjustment]

Signed-off-by: Igor Pylypiv <ipylypiv@google.com>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Link: https://patch.msgid.link/20260209212151.342151-1-ipylypiv@google.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
3 months agoscsi: ufs: qcom,sc7180-ufshc: dt-bindings: Add UFSHC compatible for x1e80100
Pradeep P V K [Wed, 11 Feb 2026 13:29:24 +0000 (18:59 +0530)] 
scsi: ufs: qcom,sc7180-ufshc: dt-bindings: Add UFSHC compatible for x1e80100

Add UFS Host Controller (UFSHC) compatible for x1e80100 SoC. Use SM8550
as a fallback since x1e80100 is fully compatible with it.

Qualcomm UFSHC is no longer compatible with JEDEC UFS-2.0 binding.
Avoid using the "jedec,ufs-2.0" string in the compatible property.

[mkp: conflict resolution]

Acked-by: Manivannan Sadhasivam <mani@kernel.org>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Signed-off-by: Pradeep P V K <pradeep.pragallapati@oss.qualcomm.com>
Link: https://patch.msgid.link/20260211132926.3716716-2-pradeep.pragallapati@oss.qualcomm.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
3 months agoscsi: ufs: qcom,sc7180-ufshc: dt-bindings: Document the Milos UFS Controller
Luca Weiss [Mon, 12 Jan 2026 13:53:15 +0000 (14:53 +0100)] 
scsi: ufs: qcom,sc7180-ufshc: dt-bindings: Document the Milos UFS Controller

Document the UFS Controller on the Milos SoC.

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
Link: https://patch.msgid.link/20260112-milos-ufs-v2-2-d3ce4f61f030@fairphone.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
3 months agoscsi: lpfc: ELIMINATE kernel-doc warnings in lpfc.h
Randy Dunlap [Tue, 24 Feb 2026 23:49:54 +0000 (15:49 -0800)] 
scsi: lpfc: ELIMINATE kernel-doc warnings in lpfc.h

Avoid all kernel-doc warnings in lpfc.h:

 - Use the correct function parameter name

 - Add a '*' to a kernel-doc line

 - Repair the function Returns: comments

Fixes these warnings:

Warning: drivers/scsi/lpfc/lpfc.h:1674 No description found for return
 value of 'lpfc_next_online_cpu'
Warning: drivers/scsi/lpfc/lpfc.h:1686 No description found for return
 value of 'lpfc_next_present_cpu'
Warning: drivers/scsi/lpfc/lpfc.h:1700 function parameter 'eq' not
 described in 'lpfc_sli4_mod_hba_eq_delay'
Warning: drivers/scsi/lpfc/lpfc.h:1755 bad line: --------------------------
Warning: drivers/scsi/lpfc/lpfc.h:1759 No description found for return
 value of 'lpfc_is_vmid_enabled'

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Reviewed-by: Justin Tee <justin.tee@broadcom.com>
Link: https://patch.msgid.link/20260224234954.3606638-1-rdunlap@infradead.org
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
3 months agoscsi: megaraid_sas: Protect more code with instance->reset_mutex
Bart Van Assche [Mon, 23 Feb 2026 22:00:30 +0000 (14:00 -0800)] 
scsi: megaraid_sas: Protect more code with instance->reset_mutex

megasas_get_device_list() and megasas_get_snapdump_properties() may unlock
instance->reset_mutex indirectly. Hence, hold reset_mutex while calling
these functions.

Cc: Kashyap Desai <kashyap.desai@broadcom.com>
Cc: Sumit Saxena <sumit.saxena@broadcom.com>
Cc: Shivasharan S <shivasharan.srikanteshwara@broadcom.com>
Cc: Chandrakanth patil <chandrakanth.patil@broadcom.com>
Cc: James E.J. Bottomley <James.Bottomley@HansenPartnership.com>
Cc: Martin K. Petersen <martin.petersen@oracle.com>
Cc: megaraidlinux.pdl@broadcom.com
Cc: linux-scsi@vger.kernel.org
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Link: https://patch.msgid.link/20260223220102.2158611-31-bart.vanassche@linux.dev
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
3 months agoscsi: fnic: Make fnic_queuecommand() easier to analyze
Bart Van Assche [Mon, 23 Feb 2026 22:00:29 +0000 (14:00 -0800)] 
scsi: fnic: Make fnic_queuecommand() easier to analyze

Move a spin_unlock_irqrestore() call such that the io_lock_acquired
variable can be eliminated. This patch prepares for enabling the Clang
thread-safety analyzer.

Cc: Satish Kharat <satishkh@cisco.com>
Cc: Sesidhar Baddela <sebaddel@cisco.com>
Cc: Karan Tilak Kumar <kartilak@cisco.com>
Cc: James E.J. Bottomley <James.Bottomley@HansenPartnership.com>
Cc: Martin K. Petersen <martin.petersen@oracle.com>
Cc: linux-scsi@vger.kernel.org
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Reviewed-by: Karan Tilak Kumar <kartilak@cisco.com>
Link: https://patch.msgid.link/20260223220102.2158611-30-bart.vanassche@linux.dev
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
3 months agoMerge patch series "fnic 1.8.0.3 update"
Martin K. Petersen [Sat, 28 Feb 2026 22:16:17 +0000 (17:16 -0500)] 
Merge patch series "fnic 1.8.0.3 update"

Karan Tilak Kumar <kartilak@cisco.com> says:

Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
3 months agoscsi: fnic: Bump up version number
Karan Tilak Kumar [Tue, 17 Feb 2026 22:39:43 +0000 (14:39 -0800)] 
scsi: fnic: Bump up version number

Bump up version number.

Tested-by: Karan Tilak Kumar <kartilak@cisco.com>
Reviewed-by: Sesidhar Baddela <sebaddel@cisco.com>
Reviewed-by: Arulprabhu Ponnusamy <arulponn@cisco.com>
Reviewed-by: Gian Carlo Boffa <gcboffa@cisco.com>
Reviewed-by: Arun Easi <aeasi@cisco.com>
Reviewed-by: Hannes Reinecke <hare@kernel.org>
Signed-off-by: Karan Tilak Kumar <kartilak@cisco.com>
Link: https://patch.msgid.link/20260217223943.7938-5-kartilak@cisco.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
3 months agoscsi: fnic: Refactor in_remove flag and call to fnic_fcpio_reset()
Karan Tilak Kumar [Tue, 17 Feb 2026 22:39:42 +0000 (14:39 -0800)] 
scsi: fnic: Refactor in_remove flag and call to fnic_fcpio_reset()

Modify logic to remove unnecessary acquire/release of spinlock to set
in_remove flag. There's also no need to check for init status to call
fnic_fcpio_reset.

Tested-by: Karan Tilak Kumar <kartilak@cisco.com>
Reviewed-by: Sesidhar Baddela <sebaddel@cisco.com>
Reviewed-by: Arulprabhu Ponnusamy <arulponn@cisco.com>
Reviewed-by: Gian Carlo Boffa <gcboffa@cisco.com>
Reviewed-by: Arun Easi <aeasi@cisco.com>
Reviewed-by: Hannes Reinecke <hare@kernel.org>
Signed-off-by: Karan Tilak Kumar <kartilak@cisco.com>
Co-developed-by: Hannes Reinecke <hare@kernel.org>
Link: https://patch.msgid.link/20260217223943.7938-4-kartilak@cisco.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
3 months agoscsi: fnic: Rename fnic_scsi_fcpio_reset()
Karan Tilak Kumar [Tue, 17 Feb 2026 22:39:41 +0000 (14:39 -0800)] 
scsi: fnic: Rename fnic_scsi_fcpio_reset()

The function has no dependency on SCSI/FCP, so rename it to
fnic_fcpio_reset() and move it to fnic_fcs.c

Tested-by: Karan Tilak Kumar <kartilak@cisco.com>
Reviewed-by: Sesidhar Baddela <sebaddel@cisco.com>
Reviewed-by: Arulprabhu Ponnusamy <arulponn@cisco.com>
Reviewed-by: Gian Carlo Boffa <gcboffa@cisco.com>
Reviewed-by: Arun Easi <aeasi@cisco.com>
Reviewed-by: Hannes Reinecke <hare@kernel.org>
Reviewed-by: Lee Duncan <lduncan@suse.com>
Signed-off-by: Karan Tilak Kumar <kartilak@cisco.com>
Co-developed-by: Hannes Reinecke <hare@kernel.org>
Link: https://patch.msgid.link/20260217223943.7938-3-kartilak@cisco.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
3 months agoscsi: fnic: Do not use GFP_ZERO for mempools
Karan Tilak Kumar [Tue, 17 Feb 2026 22:39:40 +0000 (14:39 -0800)] 
scsi: fnic: Do not use GFP_ZERO for mempools

One cannot use the GFP_ZERO flag for mempool allocation, so use
memset() instead.

Tested-by: Karan Tilak Kumar <kartilak@cisco.com>
Reviewed-by: Sesidhar Baddela <sebaddel@cisco.com>
Reviewed-by: Arulprabhu Ponnusamy <arulponn@cisco.com>
Reviewed-by: Gian Carlo Boffa <gcboffa@cisco.com>
Reviewed-by: Arun Easi <aeasi@cisco.com>
Reviewed-by: Hannes Reinecke <hare@kernel.org>
Reviewed-by: Lee Duncan <lduncan@suse.com>
Signed-off-by: Karan Tilak Kumar <kartilak@cisco.com>
Co-developed-by: Hannes Reinecke <hare@kernel.org>
Link: https://patch.msgid.link/20260217223943.7938-2-kartilak@cisco.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
3 months agoscsi: fnic: Use mempool for receive frames
Karan Tilak Kumar [Tue, 17 Feb 2026 22:39:39 +0000 (14:39 -0800)] 
scsi: fnic: Use mempool for receive frames

The receive frames are constantly replenished so we should rather use a
mempool here.

fip_frame_queue is an rxq. Deallocate it in fnic_free_rxq().

Tested-by: Karan Tilak Kumar <kartilak@cisco.com>
Reviewed-by: Sesidhar Baddela <sebaddel@cisco.com>
Reviewed-by: Arulprabhu Ponnusamy <arulponn@cisco.com>
Reviewed-by: Gian Carlo Boffa <gcboffa@cisco.com>
Reviewed-by: Arun Easi <aeasi@cisco.com>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Karan Tilak Kumar <kartilak@cisco.com>
Co-developed-by: Hannes Reinecke <hare@kernel.org>
Link: https://patch.msgid.link/20260217223943.7938-1-kartilak@cisco.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
3 months agoscsi: ufs: core: Support UFSHCI 4.1 CQ entry tag
Peter Wang [Tue, 10 Feb 2026 07:17:30 +0000 (15:17 +0800)] 
scsi: ufs: core: Support UFSHCI 4.1 CQ entry tag

The UFSHCI 4.1 specification introduces a new completion queue (CQ) entry
format, allowing the tag to be obtained directly.

Signed-off-by: Peter Wang <peter.wang@mediatek.com>
Reviewed-by: Bean Huo <beanhuo@micron.com>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Link: https://patch.msgid.link/20260210071834.1837878-1-peter.wang@mediatek.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
3 months agoscsi: ufs: core: Add debug log for MCQ command timeout
Peter Wang [Tue, 10 Feb 2026 06:41:44 +0000 (14:41 +0800)] 
scsi: ufs: core: Add debug log for MCQ command timeout

It is difficult to debug situations where an MCQ command timeout occurs,
the corresponding CQ tag response is received, but the request is not
completed.  Add a one-line log to indicate when the CQ entry is abnormal.

Signed-off-by: Peter Wang <peter.wang@mediatek.com>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Link: https://patch.msgid.link/20260210070837.1820710-3-peter.wang@mediatek.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
3 months agoscsi: ufs: core: Add debug log for UIC command timeout
Peter Wang [Tue, 10 Feb 2026 06:41:43 +0000 (14:41 +0800)] 
scsi: ufs: core: Add debug log for UIC command timeout

It is difficult to debug when a UIC command timeout occurs simultaneously
with a UIC command complete interrupt.  Currently, we only see the timeout
log without any debug information, making it unclear whether the UFS device
failed to respond or the host entered an incorrect state.  Add a one-line
log to cover this situation.

Signed-off-by: Peter Wang <peter.wang@mediatek.com>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Link: https://patch.msgid.link/20260210070837.1820710-2-peter.wang@mediatek.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
3 months agoscsi: BusLogic: Replace deprecated strcpy() + strcat() in blogic_rdconfig()
Thorsten Blum [Tue, 24 Feb 2026 14:48:27 +0000 (15:48 +0100)] 
scsi: BusLogic: Replace deprecated strcpy() + strcat() in blogic_rdconfig()

strcpy() is deprecated [1] and using strcat() is discouraged. Replace
them with scnprintf().  No functional changes.

Link: https://www.kernel.org/doc/html/latest/process/deprecated.html#strcpy
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Link: https://patch.msgid.link/20260224144828.585577-1-thorsten.blum@linux.dev
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
3 months agoMerge patch series "Update lpfc to revision 14.4.0.14"
Martin K. Petersen [Tue, 24 Feb 2026 18:08:32 +0000 (13:08 -0500)] 
Merge patch series "Update lpfc to revision 14.4.0.14"

Justin Tee <justintee8345@gmail.com> says:

Update lpfc to revision 14.4.0.14

This patch set contains updates to log messaging, trivial typecast and
pointer changes, bug fixes related to kref accounting and cleanup
handling, an update to a WQE submission bitfield, and restriction of
first burst to specific HBAs only.

The patches were cut against Martin's 6.20/scsi-queue tree.

Link: https://patch.msgid.link/20260212213008.149873-1-justintee8345@gmail.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
3 months agoscsi: lpfc: Update lpfc version to 14.4.0.14
Justin Tee [Thu, 12 Feb 2026 21:30:08 +0000 (13:30 -0800)] 
scsi: lpfc: Update lpfc version to 14.4.0.14

Update lpfc version to 14.4.0.14.

Signed-off-by: Justin Tee <justin.tee@broadcom.com>
Link: https://patch.msgid.link/20260212213008.149873-14-justintee8345@gmail.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
3 months agoscsi: lpfc: Update copyright year string for 2026
Justin Tee [Thu, 12 Feb 2026 21:30:07 +0000 (13:30 -0800)] 
scsi: lpfc: Update copyright year string for 2026

Update copyright string to 2026 for this version patch set.

Signed-off-by: Justin Tee <justin.tee@broadcom.com>
Link: https://patch.msgid.link/20260212213008.149873-13-justintee8345@gmail.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
3 months agoscsi: lpfc: Restrict first burst to non-FCoE and SLI4 adapters only
Justin Tee [Thu, 12 Feb 2026 21:30:06 +0000 (13:30 -0800)] 
scsi: lpfc: Restrict first burst to non-FCoE and SLI4 adapters only

First burst is only supported on adapters running in SLI4 mode and that
are non-FCoE based.  Include sli_rev and FCoE mode checks before setting
the write transfer ready disabled bit in PRLIs.

Signed-off-by: Justin Tee <justin.tee@broadcom.com>
Link: https://patch.msgid.link/20260212213008.149873-12-justintee8345@gmail.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
3 months agoscsi: lpfc: Update class of service bit field to 3 bits for WQE submissions
Justin Tee [Thu, 12 Feb 2026 21:30:05 +0000 (13:30 -0800)] 
scsi: lpfc: Update class of service bit field to 3 bits for WQE submissions

WQE submissions only require a 3 bit field when specifying the class of
service to use.  So, update WQE submission paths to use a 3 bit field
instead of 0x0f as the bit mask.  A NLP_FCP_CLASS_MASK bitmask is
defined to ensure only a 3 bit mask is used.

Signed-off-by: Justin Tee <justin.tee@broadcom.com>
Link: https://patch.msgid.link/20260212213008.149873-11-justintee8345@gmail.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
3 months agoscsi: lpfc: Add clean up of aborted NVMe commands during PCI fcn reset
Justin Tee [Thu, 12 Feb 2026 21:30:04 +0000 (13:30 -0800)] 
scsi: lpfc: Add clean up of aborted NVMe commands during PCI fcn reset

When handling a PCI function reset, notification to the NVMe transport
layer is skipped for outstanding aborted NVMe I/O.  Introduce a new
routine called lpfc_nvme_flush_abts_list(), which notifies upper NVMe
transport layer of outstanding aborted NVMe I/O that are not planned to
be completed normally due to a PCI function reset request.

Signed-off-by: Justin Tee <justin.tee@broadcom.com>
Link: https://patch.msgid.link/20260212213008.149873-10-justintee8345@gmail.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
3 months agoscsi: lpfc: Fix incorrect txcmplq_cnt during cleanup in lpfc_sli_abort_ring()
Justin Tee [Thu, 12 Feb 2026 21:30:03 +0000 (13:30 -0800)] 
scsi: lpfc: Fix incorrect txcmplq_cnt during cleanup in lpfc_sli_abort_ring()

When a port is offline in lpfc_sli_abort_ring, the phba->txcmplq is
cleared but the phba->txcmplq_cnt is not reset to zero.  This can
sometimes result in a phba->txcmplq_cnt that never reaches zero, which
hangs the cleanup process.

Update lpfc_sli_abort_ring so that txcmplq_cnt is reset to zero and also
ensure that the LPFC_IO_ON_TXCMPLQ flag is properly cleared.

Signed-off-by: Justin Tee <justin.tee@broadcom.com>
Link: https://patch.msgid.link/20260212213008.149873-9-justintee8345@gmail.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
3 months agoscsi: lpfc: Cleanup error exit paths in lpfc_fdmi_cmd() and associated messages
Justin Tee [Thu, 12 Feb 2026 21:30:02 +0000 (13:30 -0800)] 
scsi: lpfc: Cleanup error exit paths in lpfc_fdmi_cmd() and associated messages

Error labels in lpfc_fdmi_cmd() accidentally return success status and
can potentially leak memory.  Change error exit path status to return a
non-zero value using a common exit path for failure cases. The error
path also frees allocated memory and provides logging.

Signed-off-by: Justin Tee <justin.tee@broadcom.com>
Link: https://patch.msgid.link/20260212213008.149873-8-justintee8345@gmail.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
3 months agoscsi: lpfc: Remove unnecessary ndlp kref get in lpfc_check_nlp_post_devloss
Justin Tee [Thu, 12 Feb 2026 21:30:01 +0000 (13:30 -0800)] 
scsi: lpfc: Remove unnecessary ndlp kref get in lpfc_check_nlp_post_devloss

When NLP_IN_RECOV_POST_DEV_LOSS is set, the initial node reference
remains held while recovery is in progress.  Taking a reference when
NLP_IN_RECOV_POST_DEV_LOSS is cleared results in an additional reference
being held.  This causes an extra reference when cleaning up lpfc_vport
instances.  Thus, remove the extraneous ndlp kref get in
lpfc_check_nlp_post_devloss.

Signed-off-by: Justin Tee <justin.tee@broadcom.com>
Link: https://patch.msgid.link/20260212213008.149873-7-justintee8345@gmail.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
3 months agoscsi: lpfc: Reduce pointer chasing when accessing vmid_flag
Justin Tee [Thu, 12 Feb 2026 21:30:00 +0000 (13:30 -0800)] 
scsi: lpfc: Reduce pointer chasing when accessing vmid_flag

For all FLOGI completions, the vport->phba->pport pointer is actually a
pointer to the original vport pointer because FLOGIs always complete on
the physical lpfc_vport object.  Thus, we can reduce the
vport->phba->pport->vmid_flag dereference to simply vport->vmid_flag.

Signed-off-by: Justin Tee <justin.tee@broadcom.com>
Link: https://patch.msgid.link/20260212213008.149873-6-justintee8345@gmail.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
3 months agoscsi: lpfc: Use min_t() instead of min() in lpfc_sli4_driver_resource_setup
Justin Tee [Thu, 12 Feb 2026 21:29:59 +0000 (13:29 -0800)] 
scsi: lpfc: Use min_t() instead of min() in lpfc_sli4_driver_resource_setup

The member called cfg_sg_dma_buf_size is declared as a u32, while the
min comparator's second argument called SLI4_PAGE_SIZE is a #define.
Proper comparison should be using the same type, therefore change to use
min_t.

Signed-off-by: Justin Tee <justin.tee@broadcom.com>
Link: https://patch.msgid.link/20260212213008.149873-5-justintee8345@gmail.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
3 months agoscsi: lpfc: Add log messages to fabric login error labels
Justin Tee [Thu, 12 Feb 2026 21:29:58 +0000 (13:29 -0800)] 
scsi: lpfc: Add log messages to fabric login error labels

Should fabric login or related initialization mailbox commands fail,
there are no log messages to notify which step encountered an issue.
Update error label paths to log when unexpected fabric login issues
occur.

Signed-off-by: Justin Tee <justin.tee@broadcom.com>
Link: https://patch.msgid.link/20260212213008.149873-4-justintee8345@gmail.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
3 months agoscsi: lpfc: Log discarded and insufficient RQE buffer events
Justin Tee [Thu, 12 Feb 2026 21:29:57 +0000 (13:29 -0800)] 
scsi: lpfc: Log discarded and insufficient RQE buffer events

An RCQE with statuses indicating that an RQE is dropped or when there
are insufficient buffers to receive new RQEs are currently occuring
silently.  Add a new log message to warn when such events occur.

Signed-off-by: Justin Tee <justin.tee@broadcom.com>
Link: https://patch.msgid.link/20260212213008.149873-3-justintee8345@gmail.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
3 months agoscsi: lpfc: Update log message when ndlp kref get is unsuccessful
Justin Tee [Thu, 12 Feb 2026 21:29:56 +0000 (13:29 -0800)] 
scsi: lpfc: Update log message when ndlp kref get is unsuccessful

If kref_get_unless_zero on ndlp->kref is unsuccessful, then there's no
point to log kref_read(&ndlp->kref) because it will of course be zero.
In such cases, ndlp->vport would also be an invalid pointer.  Thus, use
pr_info() instead of lpfc_printf_vlog() to log when a kref get is
attempted on an ndlp with a zero kref.

Signed-off-by: Justin Tee <justin.tee@broadcom.com>
Link: https://patch.msgid.link/20260212213008.149873-2-justintee8345@gmail.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
3 months agoLinux 7.0-rc1 v7.0-rc1
Linus Torvalds [Sun, 22 Feb 2026 21:18:59 +0000 (13:18 -0800)] 
Linux 7.0-rc1

3 months agoMerge tag 'fsverity-for-linus' of git://git.kernel.org/pub/scm/fs/fsverity/linux
Linus Torvalds [Sun, 22 Feb 2026 21:12:04 +0000 (13:12 -0800)] 
Merge tag 'fsverity-for-linus' of git://git.kernel.org/pub/scm/fs/fsverity/linux

Pull fsverity fixes from Eric Biggers:

 - Fix a build error on parisc

 - Remove the non-large-folio-aware function fsverity_verify_page()

* tag 'fsverity-for-linus' of git://git.kernel.org/pub/scm/fs/fsverity/linux:
  fsverity: fix build error by adding fsverity_readahead() stub
  fsverity: remove fsverity_verify_page()
  f2fs: make f2fs_verify_cluster() partially large-folio-aware
  f2fs: remove unnecessary ClearPageUptodate in f2fs_verify_cluster()

3 months agoMerge tag 'libcrypto-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Sun, 22 Feb 2026 21:09:33 +0000 (13:09 -0800)] 
Merge tag 'libcrypto-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/linux

Pull crypto library fix from Eric Biggers:
 "Fix a big endian specific issue in the PPC64-optimized AES code"

* tag 'libcrypto-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/linux:
  lib/crypto: powerpc/aes: Fix rndkey_from_vsx() on big endian CPUs

3 months agoCREDITS: Add -next to Stephen Rothwell's entry
Mark Brown [Tue, 17 Feb 2026 13:10:46 +0000 (13:10 +0000)] 
CREDITS: Add -next to Stephen Rothwell's entry

Stephen retired and stepped back from -next maintainership, update his
entry in CREDITS to recognise his 18 years of hard work making it what
it is today and all the impact it's had on our development process.

Also update to his current GnuPG key while we're here.

Acked-by: Stephen Rothwell <sfr@canb.auug.org.au>
Acked-by: SeongJae Park <sj@kernel.org>
Reviewed-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
Acked-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
3 months agox509: select CONFIG_CRYPTO_LIB_SHA256
Arnd Bergmann [Tue, 17 Feb 2026 08:26:49 +0000 (08:26 +0000)] 
x509: select CONFIG_CRYPTO_LIB_SHA256

The x509 public key code gained a dependency on the sha256 hash
implementation, causing a rare link time failure in randconfig
builds:

  arm-linux-gnueabi-ld: crypto/asymmetric_keys/x509_public_key.o: in function `x509_get_sig_params':
  x509_public_key.c:(.text.x509_get_sig_params+0x12): undefined reference to `sha256'
  arm-linux-gnueabi-ld: (sha256): Unknown destination type (ARM/Thumb) in crypto/asymmetric_keys/x509_public_key.o
  x509_public_key.c:(.text.x509_get_sig_params+0x12): dangerous relocation: unsupported relocation

Select the necessary library code from Kconfig.

Fixes: 2c62068ac86b ("x509: Separately calculate sha256 for blacklist")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: David Howells <dhowells@redhat.com>
Reviewed-by: Eric Biggers <ebiggers@kernel.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
3 months agoxz: fix arm fdt compile error for kmalloc replacement
Haiyue Wang [Sun, 22 Feb 2026 12:11:00 +0000 (20:11 +0800)] 
xz: fix arm fdt compile error for kmalloc replacement

Align to the commit bf4afc53b77a ("Convert 'alloc_obj' family to use the
new default GFP_KERNEL argument") update the 'kmalloc_obj' declaration
for userspace to fix below compile error:

  In file included from arch/arm/boot/compressed/../../../../lib/decompress_unxz.c:241,
                   from arch/arm/boot/compressed/decompress.c:56:
  arch/arm/boot/compressed/../../../../lib/xz/xz_dec_stream.c: In function 'xz_dec_init':
  arch/arm/boot/compressed/../../../../lib/xz/xz_dec_stream.c:787:28: error: implicit declaration of function 'kmalloc_obj'; did you mean 'kmalloc'? [-Wimplicit-function-declaration]
     787 |         struct xz_dec *s = kmalloc_obj(*s);
         |                            ^~~~~~~~~~~
         |                            kmalloc

Signed-off-by: Haiyue Wang <haiyuewa@163.com>
Fixes: 69050f8d6d07 ("treewide: Replace kmalloc with kmalloc_obj for non-scalar types")
Fixes: bf4afc53b77a ("Convert 'alloc_obj' family to use the new default GFP_KERNEL argument")
Reviewed-by: Kees Cook <kees@kernel.org>
Acked-by: Lasse Collin <lasse.collin@tukaani.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
3 months agoMerge tag 'rtc-7.0' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux
Linus Torvalds [Sun, 22 Feb 2026 17:43:11 +0000 (09:43 -0800)] 
Merge tag 'rtc-7.0' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux

Pull RTC updates from Alexandre Belloni:

 - loongson: Loongson-2K0300 support

 - s35390a: nvmem support

 - zynqmp: rework calibration

* tag 'rtc-7.0' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux:
  rtc: ds1390: fix number of bytes read from RTC
  rtc: class: Remove duplicate check for alarm
  rtc: optee: simplify OP-TEE context match
  rtc: interface: Alarm race handling should not discard preceding error
  rtc: s35390a: implement nvmem support
  rtc: loongson: Add Loongson-2K0300 support
  dt-bindings: rtc: loongson: Document Loongson-2K0300 compatible
  dt-bindings: rtc: loongson: Correct Loongson-1C interrupts property
  dt-bindings: rtc: renesas,rz-rtca3: Add RZ/V2N support
  dt-bindings: rtc: cpcap: convert to schema
  rtc: zynqmp: use dynamic max and min offset ranges
  rtc: zynqmp: rework set_offset
  rtc: zynqmp: rework read_offset
  rtc: zynqmp: check calibration max value
  rtc: zynqmp: correct frequency value
  rtc: amlogic-a4: Remove IRQF_ONESHOT
  rtc: pcf8563: use correct of_node for output clock
  rtc: max31335: use correct CONFIG symbol in IS_REACHABLE()
  rtc: nvvrs: Add ARCH_TEGRA to the NV VRS RTC driver

3 months agoMerge tag 'rust-fixes-7.0' of git://git.kernel.org/pub/scm/linux/kernel/git/ojeda...
Linus Torvalds [Sun, 22 Feb 2026 16:43:31 +0000 (08:43 -0800)] 
Merge tag 'rust-fixes-7.0' of git://git.kernel.org/pub/scm/linux/kernel/git/ojeda/linux

Pull rust fixes from Miguel Ojeda:
 "Toolchain and infrastructure:

   - Pass '-Zunstable-options' flag required by the future Rust 1.95.0

   - Fix 'objtool' warning for Rust 1.84.0

  'kernel' crate:

   - 'irq' module: add missing bound detected by the future Rust 1.95.0

   - 'list' module: add missing 'unsafe' blocks and placeholder safety
     comments to macros (an issue for future callers within the crate)

  'pin-init' crate:

   - Clean Clippy warning that changed behavior in the future Rust
     1.95.0"

* tag 'rust-fixes-7.0' of git://git.kernel.org/pub/scm/linux/kernel/git/ojeda/linux:
  rust: list: Add unsafe blocks for container_of and safety comments
  rust: pin-init: replace clippy `expect` with `allow`
  rust: irq: add `'static` bounds to irq callbacks
  objtool/rust: add one more `noreturn` Rust function
  rust: kbuild: pass `-Zunstable-options` for Rust 1.95.0

3 months agoMerge tag 'trace-rv-7.0-2' of git://git.kernel.org/pub/scm/linux/kernel/git/trace...
Linus Torvalds [Sun, 22 Feb 2026 16:40:13 +0000 (08:40 -0800)] 
Merge tag 'trace-rv-7.0-2' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace

Pull runtime verifier fix from Steven Rostedt:

 - Fix multiple definition of __pcpu_unique_da_mon_this

   After refactoring monitors, we used static per-cpu variables with the
   same names across different per-cpu monitors. This is explicitly
   disallowed for modules on some architectures (alpha) or if
   CONFIG_DEBUG_FORCE_WEAK_PER_CPU is enabled (e.g. Fedora's debug
   kernel). Make sure all those variables have different names to avoid
   compilation issues.

* tag 'trace-rv-7.0-2' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace:
  rv: Fix multiple definition of __pcpu_unique_da_mon_this

3 months agoConvert remaining multi-line kmalloc_obj/flex GFP_KERNEL uses
Kees Cook [Sun, 22 Feb 2026 07:46:04 +0000 (23:46 -0800)] 
Convert remaining multi-line kmalloc_obj/flex GFP_KERNEL uses

Conversion performed via this Coccinelle script:

  // SPDX-License-Identifier: GPL-2.0-only
  // Options: --include-headers-for-types --all-includes --include-headers --keep-comments
  virtual patch

  @gfp depends on patch && !(file in "tools") && !(file in "samples")@
  identifier ALLOC = {kmalloc_obj,kmalloc_objs,kmalloc_flex,
      kzalloc_obj,kzalloc_objs,kzalloc_flex,
    kvmalloc_obj,kvmalloc_objs,kvmalloc_flex,
    kvzalloc_obj,kvzalloc_objs,kvzalloc_flex};
  @@

   ALLOC(...
  - , GFP_KERNEL
   )

  $ make coccicheck MODE=patch COCCI=gfp.cocci

Build and boot tested x86_64 with Fedora 42's GCC and Clang:

Linux version 6.19.0+ (user@host) (gcc (GCC) 15.2.1 20260123 (Red Hat 15.2.1-7), GNU ld version 2.44-12.fc42) #1 SMP PREEMPT_DYNAMIC 1970-01-01
Linux version 6.19.0+ (user@host) (clang version 20.1.8 (Fedora 20.1.8-4.fc42), LLD 20.1.8) #1 SMP PREEMPT_DYNAMIC 1970-01-01

Signed-off-by: Kees Cook <kees@kernel.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
3 months agoConvert more 'alloc_obj' cases to default GFP_KERNEL arguments
Linus Torvalds [Sun, 22 Feb 2026 04:03:00 +0000 (20:03 -0800)] 
Convert more 'alloc_obj' cases to default GFP_KERNEL arguments

This converts some of the visually simpler cases that have been split
over multiple lines.  I only did the ones that are easy to verify the
resulting diff by having just that final GFP_KERNEL argument on the next
line.

Somebody should probably do a proper coccinelle script for this, but for
me the trivial script actually resulted in an assertion failure in the
middle of the script.  I probably had made it a bit _too_ trivial.

So after fighting that far a while I decided to just do some of the
syntactically simpler cases with variations of the previous 'sed'
scripts.

The more syntactically complex multi-line cases would mostly really want
whitespace cleanup anyway.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
3 months agoConvert 'alloc_flex' family to use the new default GFP_KERNEL argument
Linus Torvalds [Sun, 22 Feb 2026 01:06:51 +0000 (17:06 -0800)] 
Convert 'alloc_flex' family to use the new default GFP_KERNEL argument

This is the exact same thing as the 'alloc_obj()' version, only much
smaller because there are a lot fewer users of the *alloc_flex()
interface.

As with alloc_obj() version, this was done entirely with mindless brute
force, using the same script, except using 'flex' in the pattern rather
than 'objs*'.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
3 months agoConvert 'alloc_obj' family to use the new default GFP_KERNEL argument
Linus Torvalds [Sun, 22 Feb 2026 00:37:42 +0000 (16:37 -0800)] 
Convert 'alloc_obj' family to use the new default GFP_KERNEL argument

This was done entirely with mindless brute force, using

    git grep -l '\<k[vmz]*alloc_objs*(.*, GFP_KERNEL)' |
        xargs sed -i 's/\(alloc_objs*(.*\), GFP_KERNEL)/\1)/'

to convert the new alloc_obj() users that had a simple GFP_KERNEL
argument to just drop that argument.

Note that due to the extreme simplicity of the scripting, any slightly
more complex cases spread over multiple lines would not be triggered:
they definitely exist, but this covers the vast bulk of the cases, and
the resulting diff is also then easier to check automatically.

For the same reason the 'flex' versions will be done as a separate
conversion.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
3 months agoadd default_gfp() helper macro and use it in the new *alloc_obj() helpers
Linus Torvalds [Sun, 22 Feb 2026 00:14:11 +0000 (16:14 -0800)] 
add default_gfp() helper macro and use it in the new *alloc_obj() helpers

Most simple allocations use GFP_KERNEL, and with the new allocation
helpers being introduced, let's just take advantage of that to simplify
that default case.

It's a numbers game:

    git grep 'alloc_obj(' |
sed 's/.*\(GFP_[_A-Z]*\).*/\1/' |
sort | uniq -c | sort -n | tail

shows that about 90% of all those new allocator instances just use that
standard GFP_KERNEL.

Those helpers are already macros, and we can easily just make it be the
default case when the gfp argument is missing.

And yes, we could do that for all the legacy interfaces too, but let's
keep it to just the new ones at least for now, since those all got
converted recently anyway, so this is not any "extra" noise outside of
that limited conversion.

And, in fact, I want to do this before doing the -rc1 release, exactly
so that we don't get extra merge conflicts.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
3 months agoslab.h: disable completely broken overflow handling in flex allocations
Linus Torvalds [Sat, 21 Feb 2026 23:12:09 +0000 (15:12 -0800)] 
slab.h: disable completely broken overflow handling in flex allocations

Commit 69050f8d6d07 ("treewide: Replace kmalloc with kmalloc_obj for
non-scalar types") started using the new allocation helpers, and in the
process showed that they were completely non-working.

The overflow logic in overflows_flex_counter_type() is completely the
wrong way around, and that broke __alloc_flex() completely.  By chance,
the resulting code was then such a mess that clang generated
sufficiently garbage code that objtool warned about it all.  Which made
it somewhat quicker to narrow things down.

While fixing overflows_flex_counter_type() would presumably fix this
all, I'm excising the whole broken overflow logic from __alloc_flex(),
because we don't want that kind of code in basic allocation functions
anyway.

That (no longer) broken overflows_flex_counter_type() thing needs to be
inserted into the actual __set_flex_counter() logic in the unlikely case
that we ever want this at all.  And made conditional.

Fixes: 81cee9166a90 ("compiler_types: Introduce __flex_counter() and family")
Fixes: 69050f8d6d07 ("treewide: Replace kmalloc with kmalloc_obj for non-scalar types")
Cc: Kees Cook <kees@kernel.org>
Link: https://lore.kernel.org/all/CAHk-=whEd020BYzGTzYrENjD9Z5_82xx6h8HsQvH5xDSnv0=Hw@mail.gmail.com/
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
3 months agoMerge tag 'kmalloc_obj-treewide-v7.0-rc1' of git://git.kernel.org/pub/scm/linux/kerne...
Linus Torvalds [Sat, 21 Feb 2026 19:02:58 +0000 (11:02 -0800)] 
Merge tag 'kmalloc_obj-treewide-v7.0-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux

Pull kmalloc_obj conversion from Kees Cook:
 "This does the tree-wide conversion to kmalloc_obj() and friends using
  coccinelle, with a subsequent small manual cleanup of whitespace
  alignment that coccinelle does not handle.

  This uncovered a clang bug in __builtin_counted_by_ref(), so the
  conversion is preceded by disabling that for current versions of
  clang.  The imminent clang 22.1 release has the fix.

  I've done allmodconfig build tests for x86_64, arm64, i386, and arm. I
  did defconfig builds for alpha, m68k, mips, parisc, powerpc, riscv,
  s390, sparc, sh, arc, csky, xtensa, hexagon, and openrisc"

* tag 'kmalloc_obj-treewide-v7.0-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux:
  kmalloc_obj: Clean up after treewide replacements
  treewide: Replace kmalloc with kmalloc_obj for non-scalar types
  compiler_types: Disable __builtin_counted_by_ref for Clang

3 months agoMerge tag 'perf-tools-for-v7.0-1-2026-02-21' of git://git.kernel.org/pub/scm/linux...
Linus Torvalds [Sat, 21 Feb 2026 18:51:08 +0000 (10:51 -0800)] 
Merge tag 'perf-tools-for-v7.0-1-2026-02-21' of git://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools

Pull perf tools updates from Arnaldo Carvalho de Melo:

 - Introduce 'perf sched stats' tool with record/report/diff workflows
   using schedstat counters

 - Add a faster libdw based addr2line implementation and allow selecting
   it or its alternatives via 'perf config addr2line.style='

 - Data-type profiling fixes and improvements including the ability to
   select fields using 'perf report''s -F/-fields, e.g.:

     'perf report --fields overhead,type'

 - Add 'perf test' regression tests for Data-type profiling with C and
   Rust workloads

 - Fix srcline printing with inlines in callchains, make sure this has
   coverage in 'perf test'

 - Fix printing of leaf IP in LBR callchains

 - Fix display of metrics without sufficient permission in 'perf stat'

 - Print all machines in 'perf kvm report -vvv', not just the host

 - Switch from SHA-1 to BLAKE2s for build ID generation, remove SHA-1
   code

 - Fix 'perf report's histogram entry collapsing with '-F' option

 - Use system's cacheline size instead of a hardcoded value in 'perf
   report'

 - Allow filtering conversion by time range in 'perf data'

 - Cover conversion to CTF using 'perf data' in 'perf test'

 - Address newer glibc const-correctness (-Werror=discarded-qualifiers)
   issues

 - Fixes and improvements for ARM's CoreSight support, simplify ARM SPE
   event config in 'perf mem', update docs for 'perf c2c' including the
   ARM events it can be used with

 - Build support for generating metrics from arch specific python
   script, add extra AMD, Intel, ARM64 metrics using it

 - Add AMD Zen 6 events and metrics

 - Add JSON file with OpenHW Risc-V CVA6 hardware counters

 - Add 'perf kvm' stats live testing

 - Add more 'perf stat' tests to 'perf test'

 - Fix segfault in `perf lock contention -b/--use-bpf`

 - Fix various 'perf test' cases for s390

 - Build system cleanups, bump minimum shellcheck version to 0.7.2

 - Support building the capstone based annotation routines as a plugin

 - Allow passing extra Clang flags via EXTRA_BPF_FLAGS

* tag 'perf-tools-for-v7.0-1-2026-02-21' of git://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools: (255 commits)
  perf test script: Add python script testing support
  perf test script: Add perl script testing support
  perf script: Allow the generated script to be a path
  perf test: perf data --to-ctf testing
  perf test: Test pipe mode with data conversion --to-json
  perf json: Pipe mode --to-ctf support
  perf json: Pipe mode --to-json support
  perf check: Add libbabeltrace to the listed features
  perf build: Allow passing extra Clang flags via EXTRA_BPF_FLAGS
  perf test data_type_profiling.sh: Skip just the Rust tests if code_with_type workload is missing
  tools build: Fix feature test for rust compiler
  perf libunwind: Fix calls to thread__e_machine()
  perf stat: Add no-affinity flag
  perf evlist: Reduce affinity use and move into iterator, fix no affinity
  perf evlist: Missing TPEBS close in evlist__close()
  perf evlist: Special map propagation for tool events that read on 1 CPU
  perf stat-shadow: In prepare_metric fix guard on reading NULL perf_stat_evsel
  Revert "perf tool_pmu: More accurately set the cpus for tool events"
  tools build: Emit dependencies file for test-rust.bin
  tools build: Make test-rust.bin be removed by the 'clean' target
  ...

3 months agoMerge tag 'cocci-7.0-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jlawall...
Linus Torvalds [Sat, 21 Feb 2026 18:25:42 +0000 (10:25 -0800)] 
Merge tag 'cocci-7.0-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jlawall/linux

Pull coccinelle updates from Julia Lawall:
 "This simplifies and clarifies the handling of output generated by
  Coccinelle that is sent to standard error.

  By default, this goes to /dev/null. Remind the user of that and
  encourage them to provide another file name (Benjamin Philip)"

* tag 'cocci-7.0-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jlawall/linux:
  Documentation: Coccinelle: document debug log handling
  scripts: coccicheck: warn on unset debug file
  scripts: coccicheck: simplify debug file handling

3 months agoMerge tag 'ntb-7.0' of https://github.com/jonmason/ntb
Linus Torvalds [Sat, 21 Feb 2026 18:20:32 +0000 (10:20 -0800)] 
Merge tag 'ntb-7.0' of https://github.com/jonmason/ntb

Pull NTB (PCIe non-transparent bridge) updates from Jon Mason:
 "NTB updates include debugfs improvements, correctness fixes, cleanups,
  and new hardware support:

  ntb_transport QP stats are converted to seq_file, a tx_memcpy_offload
  module parameter is introduced with associated ordering fixes, and a
  debugfs queue name truncation bug is corrected.

  Additional fixes address format specifier mismatches in ntb_tool and
  boundary conditions in the Switchtec driver, while unused MSI helpers
  are removed and the codebase migrates to dma_map_phys().

  Intel Gen6 (Diamond Rapids) NTB support is also added"

* tag 'ntb-7.0' of https://github.com/jonmason/ntb:
  NTB: ntb_transport: Use seq_file for QP stats debugfs
  NTB: ntb_transport: Fix too small buffer for debugfs_name
  ntb/ntb_tool: correct sscanf format for u64 and size_t in tool_peer_mw_trans_write
  ntb: intel: Add Intel Gen6 NTB support for DiamondRapids
  NTB/msi: Remove unused functions
  ntb: ntb_hw_switchtec: Increase MAX_MWS limit to 256
  ntb: ntb_hw_switchtec: Fix array-index-out-of-bounds access
  ntb: ntb_hw_switchtec: Fix shift-out-of-bounds for 0 mw lut
  NTB: epf: allow built-in build
  ntb: migrate to dma_map_phys instead of map_page
  NTB: ntb_transport: Add 'tx_memcpy_offload' module option
  NTB: ntb_transport: Remove unused 'retries' field from ntb_queue_entry

3 months agoMerge tag 'io_uring-20260221' of git://git.kernel.org/pub/scm/linux/kernel/git/axboe...
Linus Torvalds [Sat, 21 Feb 2026 18:05:49 +0000 (10:05 -0800)] 
Merge tag 'io_uring-20260221' of git://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux

Pull io_uring fixes from Jens Axboe:

 - A fix for a missing URING_CMD128 opcode check, fixing an issue with
   the SQE mixed mode support introduced in 6.19. Merged late due to
   having multiple dependencies

 - Add sqe->cmd size checking for big SQEs, similar to what we have for
   normal sized SQEs

 - Fix a race condition in zcrx, that leads to a double free

* tag 'io_uring-20260221' of git://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux:
  io_uring: Add size check for sqe->cmd
  io_uring: add IORING_OP_URING_CMD128 to opcode checks
  io_uring/zcrx: fix user_ref race between scrub and refill paths

3 months agoMerge tag 'fixes-2026-02-21' of git://git.kernel.org/pub/scm/linux/kernel/git/rppt...
Linus Torvalds [Sat, 21 Feb 2026 17:58:22 +0000 (09:58 -0800)] 
Merge tag 'fixes-2026-02-21' of git://git.kernel.org/pub/scm/linux/kernel/git/rppt/memblock

Pull memblock fix from Mike Rapoport:
 "Fix detection of NUMA node for CXL windows

  phys_to_target_node() may assign a CXL Fixed Memory Window to the
  wrong NUMA node when a CXL node resides in the gap of discontinuous
  System RAM node.

  Fix this by checking both numa_meminfo and numa_reserved_meminfo,
  preferring the reserved NID when the address appears in both"

* tag 'fixes-2026-02-21' of git://git.kernel.org/pub/scm/linux/kernel/git/rppt/memblock:
  mm: numa_memblks: Identify the accurate NUMA ID of CFMW

3 months agoMerge tag 'sched_ext-for-7.0-fixes' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sat, 21 Feb 2026 17:38:59 +0000 (09:38 -0800)] 
Merge tag 'sched_ext-for-7.0-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/sched_ext

Pull sched_ext fixes from Tejun Heo:

 - Various bug fixes for the example schedulers and selftests

* tag 'sched_ext-for-7.0-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/sched_ext:
  tools/sched_ext: fix getopt not re-parsed on restart
  tools/sched_ext: scx_userland: fix data races on shared counters
  tools/sched_ext: scx_pair: fix stride == 0 crash on single-CPU systems
  tools/sched_ext: scx_central: fix CPU_SET and skeleton leak on early exit
  tools/sched_ext: scx_userland: fix stale data on restart
  tools/sched_ext: scx_flatcg: fix potential stack overflow from VLA in fcg_read_stats
  selftests/sched_ext: Fix rt_stall flaky failure
  tools/sched_ext: scx_userland: fix restart and stats thread lifecycle bugs
  tools/sched_ext: scx_central: fix sched_setaffinity() call with the set size
  tools/sched_ext: scx_flatcg: zero-initialize stats counter array

3 months agoMerge tag 'v7.0-rc-part2-ksmbd-server-fixes' of git://git.samba.org/ksmbd
Linus Torvalds [Sat, 21 Feb 2026 17:11:32 +0000 (09:11 -0800)] 
Merge tag 'v7.0-rc-part2-ksmbd-server-fixes' of git://git.samba.org/ksmbd

Pull smb server fixes from Steve French:
 "Two small fixes:

   - fix potential deadlock

   - minor cleanup"

* tag 'v7.0-rc-part2-ksmbd-server-fixes' of git://git.samba.org/ksmbd:
  ksmbd: call ksmbd_vfs_kern_path_end_removing() on some error paths
  smb: server: Remove duplicate include of misc.h

3 months agoDocumentation: Coccinelle: document debug log handling
Benjamin Philip [Tue, 6 Jan 2026 19:08:36 +0000 (00:38 +0530)] 
Documentation: Coccinelle: document debug log handling

The current debug documentation does not mention that logs are printed
to stdout unless DEBUG_FILE is set. It also doesn't mention that
Coccinelle cannot overwrite debug files.

Document this behaviour in the examples and reference it in the
debugging section.

Signed-off-by: Benjamin Philip <benjamin.philip495@gmail.com>
Signed-off-by: Julia Lawall <julia.lawall@inria.fr>
3 months agoscripts: coccicheck: warn on unset debug file
Benjamin Philip [Tue, 6 Jan 2026 19:08:35 +0000 (00:38 +0530)] 
scripts: coccicheck: warn on unset debug file

coccicheck prints debug logs to stdout unless a debug file has been set.
This makes it hard to read coccinelle's suggested changes, especially
for someone new to coccicheck.

From this commit, we warn about this behaviour from within the script on
an unset debug file. Explicitly setting the debug file to /dev/null
suppresses the warning while keeping the default.

Signed-off-by: Benjamin Philip <benjamin.philip495@gmail.com>
Signed-off-by: Julia Lawall <julia.lawall@inria.fr>
3 months agoscripts: coccicheck: simplify debug file handling
Benjamin Philip [Tue, 6 Jan 2026 19:08:34 +0000 (00:38 +0530)] 
scripts: coccicheck: simplify debug file handling

This commit separates handling unset files and pre-existing files. It
also eliminates a duplicated check for unset files in run_cmd_parmap().

Signed-off-by: Benjamin Philip <benjamin.philip495@gmail.com>
Signed-off-by: Julia Lawall <julia.lawall@inria.fr>
3 months agokmalloc_obj: Clean up after treewide replacements
Kees Cook [Sat, 21 Feb 2026 08:12:19 +0000 (00:12 -0800)] 
kmalloc_obj: Clean up after treewide replacements

Coccinelle doesn't handle re-indenting line escapes. Fix the 2 places
where these got misaligned.

Remove 2 now-redundant type casts, found with:
$ git grep -P 'struct (\S+).*\)\s*k\S+alloc_(objs?|flex)\(struct \1'

Signed-off-by: Kees Cook <kees@kernel.org>
3 months agotreewide: Replace kmalloc with kmalloc_obj for non-scalar types
Kees Cook [Sat, 21 Feb 2026 07:49:23 +0000 (23:49 -0800)] 
treewide: Replace kmalloc with kmalloc_obj for non-scalar types

This is the result of running the Coccinelle script from
scripts/coccinelle/api/kmalloc_objs.cocci. The script is designed to
avoid scalar types (which need careful case-by-case checking), and
instead replace kmalloc-family calls that allocate struct or union
object instances:

Single allocations: kmalloc(sizeof(TYPE), ...)
are replaced with: kmalloc_obj(TYPE, ...)

Array allocations: kmalloc_array(COUNT, sizeof(TYPE), ...)
are replaced with: kmalloc_objs(TYPE, COUNT, ...)

Flex array allocations: kmalloc(struct_size(PTR, FAM, COUNT), ...)
are replaced with: kmalloc_flex(*PTR, FAM, COUNT, ...)

(where TYPE may also be *VAR)

The resulting allocations no longer return "void *", instead returning
"TYPE *".

Signed-off-by: Kees Cook <kees@kernel.org>
3 months agocompiler_types: Disable __builtin_counted_by_ref for Clang
Kees Cook [Fri, 20 Feb 2026 21:15:58 +0000 (13:15 -0800)] 
compiler_types: Disable __builtin_counted_by_ref for Clang

Unfortunately, there is a corner case of __builtin_counted_by_ref()
usage that crashes[1] Clang since support was introduced in Clang 19.
Disable it prior to Clang 22. Found while tested kmalloc_obj treewide
refactoring (via kmalloc_flex() usage).

Link: https://github.com/llvm/llvm-project/issues/182575
Signed-off-by: Kees Cook <kees@kernel.org>
3 months agotools/sched_ext: fix getopt not re-parsed on restart
David Carlier [Wed, 18 Feb 2026 19:22:35 +0000 (19:22 +0000)] 
tools/sched_ext: fix getopt not re-parsed on restart

After goto restart, optind retains its advanced position from the
previous getopt loop, causing getopt() to immediately return -1.
This silently drops all command-line options on the restarted skeleton.

Reset optind to 1 at the restart label so options are re-parsed.

Affected schedulers: scx_simple, scx_central, scx_flatcg, scx_pair,
scx_sdt, scx_cpu0.

Signed-off-by: David Carlier <devnexen@gmail.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
3 months agotools/sched_ext: scx_userland: fix data races on shared counters
David Carlier [Wed, 18 Feb 2026 19:22:23 +0000 (19:22 +0000)] 
tools/sched_ext: scx_userland: fix data races on shared counters

The stats thread reads nr_vruntime_enqueues, nr_vruntime_dispatches,
nr_vruntime_failed, and nr_curr_enqueued concurrently with the main
thread writing them, with no synchronization.

Use __atomic builtins with relaxed ordering for all accesses to these
counters to eliminate the data races.

Only display accuracy is affected, not scheduling correctness.

Signed-off-by: David Carlier <devnexen@gmail.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
3 months agoMerge tag 'spi-fix-v7.0-merge-window' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sat, 21 Feb 2026 01:14:36 +0000 (17:14 -0800)] 
Merge tag 'spi-fix-v7.0-merge-window' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi

Pull spi fixes from Mark Brown:
 "There's a relatively large but ultimately simple fix for spidev here
  which addresses some ABBA races by simplifying down to just using a
  single lock, it's not clear to me that there was ever any benefit in
  having the two separate locks in the first place.

  We also have simple missing error check fix in in the wpcm-fiu driver"

* tag 'spi-fix-v7.0-merge-window' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi:
  spi: spidev: fix lock inversion between spi_lock and buf_lock
  spi: wpcm-fiu: Fix potential NULL pointer dereference in wpcm_fiu_probe()

3 months agoMerge tag 'regulator-fix-v7.0-merge-window' of git://git.kernel.org/pub/scm/linux...
Linus Torvalds [Sat, 21 Feb 2026 01:11:55 +0000 (17:11 -0800)] 
Merge tag 'regulator-fix-v7.0-merge-window' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator

Pull regulator fixes from Mark Brown:
 "A few driver specific fixes, plus a patch from Bjorn which removes a
  fixed limit on regulator names that was breaking some Qualcomm
  systems"

* tag 'regulator-fix-v7.0-merge-window' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator:
  regulator: s2mps11: fix pctrlsel macro usage in s2mpg10_of_parse_cb()
  regulator: s2mps11: drop redundant sanity checks in s2mpg10_of_parse_cb()
  regulator: core: Remove regulator supply_name length limit
  regulator: mt6363: Fix interrmittent timeout

3 months agoMerge tag 'pci-v7.0-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci
Linus Torvalds [Sat, 21 Feb 2026 01:05:52 +0000 (17:05 -0800)] 
Merge tag 'pci-v7.0-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci

Pull pci fixes from Bjorn Helgaas:

 - Fix bridge window selection bug that prevented resource assignment
   (Kai-Heng Feng)

 - Fix bridge window sizing, which failed to assign resources for
   windows containing only optional resources (ROMs, SR-IOV BARs, etc)
   (Ilpo Järvinen)

 - Select CONFIGFS_FS when PCI_EPF_TEST is enabled to avoid a link error
   (Arnd Bergmann)

 - Fix recently merged Endpoint inbound submapping feature (Koichiro
   Den)

* tag 'pci-v7.0-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci:
  PCI: dwc: ep: Always clear IB maps on BAR update
  PCI: dwc: ep: Return after clearing BAR-match inbound mapping
  PCI: endpoint: pci-epf-test: Select configfs
  PCI: Account fully optional bridge windows correctly
  PCI: Validate window resource type in pbus_select_window_for_type()

3 months agoMerge tag 'dmi-for-v7.0' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare...
Linus Torvalds [Sat, 21 Feb 2026 00:18:48 +0000 (16:18 -0800)] 
Merge tag 'dmi-for-v7.0' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging

Pull dmi update from Jean Delvare:

 - include product_family info in dmi-id modalias

* tag 'dmi-for-v7.0' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging:
  firmware/dmi: Include product_family info to modalias

3 months agoMerge tag 'gpio-fixes-for-v7.0-rc1' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sat, 21 Feb 2026 00:10:54 +0000 (16:10 -0800)] 
Merge tag 'gpio-fixes-for-v7.0-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux

Pull gpio fixes from Bartosz Golaszewski:

 - add a missing IS_ERR() check in gpio-nomadik

 - fix a NULL-pointer dereference in GPIO character device code

 - restore label matching in swnode-lookup due to reported regressions
   in existing users (this will get removed again once we audit and
   update all drivers)

 - fix remove path in GPIO sysfs code

 - normalize the return value of gpio_chip::get() in gpio-amd-fch

* tag 'gpio-fixes-for-v7.0-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux:
  gpio: amd-fch: ionly return allowed values from amd_fch_gpio_get()
  gpio: sysfs: fix chip removal with GPIOs exported over sysfs
  gpio: swnode: restore the swnode-name-against-chip-label matching
  gpio: cdev: Avoid NULL dereference in linehandle_create()
  gpio: nomadik: Add missing IS_ERR() check

3 months agoMerge tag 'i2c-for-7.0-part2' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa...
Linus Torvalds [Fri, 20 Feb 2026 23:54:48 +0000 (15:54 -0800)] 
Merge tag 'i2c-for-7.0-part2' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux

Pull more i2c updates from Wolfram Sang:
 "Designware:
   - refactor the transfer path to support I2C_M_STOP
   - handle pm runtime by using the active auto try macros
   - handle controllers lacking explicit START and STOP conditions
   - general cleanups

  Other i2c drivers:
   - qualcomm: add support for qcs8300-cci
   - amd8111: general cleanups
   - cp2112: add DT bindings"

* tag 'i2c-for-7.0-part2' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
  dt-bindings: i2c: Add CP2112 HID USB to SMBus Bridge
  i2c: amd8111: switch to devm_ functions
  i2c: amd8111: Remove spaces in MODULE_* macros
  i2c: designware-platdrv: fix cleanup on probe failure
  i2c: designware-platdrv: simplify reset control
  dt-bindings: i2c: qcom-cci: Document qcs8300 compatible
  i2c: designware: Remove dead code in AMD ISP case
  i2c: designware: Support of controller with IC_EMPTYFIFO_HOLD_MASTER disabled
  i2c: designware: Use runtime PM macro for auto-cleanup
  i2c: designware: Implement I2C_M_STOP support

3 months agoMerge tag 'sound-fix-7.0-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai...
Linus Torvalds [Fri, 20 Feb 2026 23:47:44 +0000 (15:47 -0800)] 
Merge tag 'sound-fix-7.0-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

Pull sound fixes from Takashi Iwai:
 "Here are a bunch of updates, but there should be no big surprises;
  mostly device-specific quirks and fix-ups or non-code changes:

   - Quirks for ASoC AMD, HD-audio and USB-audio

   - Fixes in ASoC fsl, rockchip, renesas, aw codecs

   - Fixes for USB-audio packet handling in the implicit feedback mode

   - Updates of SPDX license IDs in some files"

* tag 'sound-fix-7.0-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (28 commits)
  ASoC: rockchip: i2s-tdm: Use param rate if not provided by set_sysclk
  ALSA: hda/hdmi: Add quirk for TUXEDO IBS14G6
  ASoC: dt-bindings: asahi-kasei,ak5558: Fix the supply names
  ASoC: dt-bindings: asahi-kasei,ak4458: Fix the supply names
  ASoC: dt-bindings: asahi-kasei,ak4458: set unevaluatedProperties:false
  ASoC: amd: amd_sdw: add machine driver quirk for Lenovo models
  ASoC: amd: acp: Add ACP7.0 match entries for Realtek parts
  ALSA: echoaudio: Add SPDX ids to some files
  ALSA: isa: Add SPDX id lines to some files
  ALSA: core: Add SPDX license id to files
  ASoC: tas2783A: add explicit port prepare handling
  ASoC: renesas: rz-ssi: Fix playback and capture
  ALSA: hda/realtek: Fix headset mic on ASUS Zenbook 14 UX3405MA
  ALSA: hda/conexant: Fix headphone jack handling on Acer Swift SF314
  ASoC: qcom: sm8250: Add quinary MI2S support
  ASoC: amd: yc: Add DMI quirk for ASUS Vivobook Pro 15X M6501RR
  ALSA: usb-audio: Avoid potentially repeated XRUN error messages
  ALSA: usb-audio: Add sanity check for OOB writes at silencing
  ALSA: usb-audio: Optimize the copy of packet sizes for implicit fb handling
  ALSA: usb-audio: Update the number of packets properly at receiving
  ...

3 months agoMerge tag 'drm-next-2026-02-21' of https://gitlab.freedesktop.org/drm/kernel
Linus Torvalds [Fri, 20 Feb 2026 23:36:38 +0000 (15:36 -0800)] 
Merge tag 'drm-next-2026-02-21' of https://gitlab.freedesktop.org/drm/kernel

Pull drm fixes from Dave Airlie:
 "This is the fixes and cleanups for the end of the merge window, it's
  nearly all amdgpu, with some amdkfd, then a pagemap core fix, i915/xe
  display fixes, and some xe driver fixes.

  Nothing seems out of the ordinary, except amdgpu is a little more
  volume than usual.

  pagemap:
   - drm/pagemap: pass pagemap_addr by reference

  amdgpu:
   - DML 2.1 fixes
   - Panel replay fixes
   - Display writeback fixes
   - MES 11 old firmware compat fix
   - DC CRC improvements
   - DPIA fixes
   - XGMI fixes
   - ASPM fix
   - SMU feature bit handling fixes
   - DC LUT fixes
   - RAS fixes
   - Misc memory leak in error path fixes
   - SDMA queue reset fixes
   - PG handling fixes
   - 5 level GPUVM page table fix
   - SR-IOV fix
   - Queue reset fix
   - SMU 13.x fixes
   - DC resume lag fix
   - MPO fixes
   - DCN 3.6 fix
   - VSDB fixes
   - HWSS clean up
   - Replay fixes
   - DCE cursor fixes
   - DCN 3.5 SR DDR5 latency fixes
   - HPD fixes
   - Error path unwind fixes
   - SMU13/14 mode1 reset fixes
   - PSP 15 updates
   - SMU 15 updates
   - Sync fix in amdgpu_dma_buf_move_notify()
   - HAINAN fix
   - PSP 13.x fix
   - GPUVM locking fix
   - Fixes for DC analog support
   - DC FAMS fixes
   - DML 2.1 fixes
   - eDP fixes
   - Misc DC fixes
   - Fastboot fix
   - 3DLUT fixes
   - GPUVM fixes
   - 64bpp format fix
   - Fix for MacBooks with switchable gfx

  amdkfd:
   - Fix possible double deletion of validate list
   - Event setup fix
   - Device disconnect regression fix
   - APU GTT as VRAM fix
   - Fix piority inversion with MQDs
   - NULL check fix

  radeon:
   - HAINAN fix

  i915/xe display:
   - Regresion fix for HDR 4k displays (#15503)
   - Fixup for Dell XPS 13 7390 eDP rate limit
   - Memory leak fix on ACPI _DSM handling
   - Add missing slice count check during DP mode validation

  xe:
   - drm/xe: Prevent VFs from exposing the CCS mode sysfs file
   - SRIOV related fixes
   - PAT cache fix
   - MMIO read fix
   - W/a fixes
   - Adjust type of xe_modparam.force_vram_bar_size
   - Wedge mode fix
   - HWMon fix

* tag 'drm-next-2026-02-21' of https://gitlab.freedesktop.org/drm/kernel: (143 commits)
  drm/amd/display: Remove unneeded DAC link encoder register
  drm/amd/display: Enable DAC in DCE link encoder
  drm/amd/display: Set CRTC source for DAC using registers
  drm/amd/display: Initialize DAC in DCE link encoder using VBIOS
  drm/amd/display: Turn off DAC in DCE link encoder using VBIOS
  drm/amd/display: Don't call find_analog_engine() twice
  drm/amdgpu: fix 4-level paging if GMC supports 57-bit VA v2
  drm/amdgpu: keep vga memory on MacBooks with switchable graphics
  drm/amdgpu: Set atomics to true for xgmi
  drm/amdkfd: Check for NULL return values
  drm/amd/display: Use same max plane scaling limits for all 64 bpp formats
  drm/amdgpu: Set vmid0 PAGE_TABLE_DEPTH for GFX12.1
  drm/amdkfd: Disable MQD queue priority
  drm/amd/display: Remove conditional for shaper 3DLUT power-on
  drm/amd/display: Check return of shaper curve to HW format
  drm/amd/display: Correct logic check error for fastboot
  drm/amd/display: Skip eDP detection when no sink
  Revert "drm/amd/display: Add Gfx Base Case For Linear Tiling Handling"
  Revert "drm/amd/display: Correct hubp GfxVersion verification"
  Revert "drm/amd/display: Add Handling for gfxversion DcGfxBase"
  ...

3 months agoMerge tag 'fbdev-for-7.0-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Fri, 20 Feb 2026 23:24:21 +0000 (15:24 -0800)] 
Merge tag 'fbdev-for-7.0-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/linux-fbdev

Pull more fbdev updates from Helge Deller:
 "Code cleanups for the au1100fb fbdev driver (Uwe Kleine-König)"

* tag 'fbdev-for-7.0-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/linux-fbdev:
  fbdev: au1100fb: Replace license boilerplate by SPDX header
  fbdev: au1100fb: Fold au1100fb.h into its only user
  fbdev: au1100fb: Replace custom printk wrappers by pr_*
  fbdev: au1100fb: Make driver compilable on non-mips platforms
  fbdev: au1100fb: Use proper conversion specifiers in printk formats
  fbdev: au1100fb: Mark several local functions as static
  fbdev: au1100fb: Don't store device specific data in global variables

3 months agoMerge tag 'trace-v7.0-2' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux...
Linus Torvalds [Fri, 20 Feb 2026 23:05:26 +0000 (15:05 -0800)] 
Merge tag 'trace-v7.0-2' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace

Pull tracing fixes from Steven Rostedt:

 - Fix possible dereference of uninitialized pointer

   When validating the persistent ring buffer on boot up, if the first
   validation fails, a reference to "head_page" is performed in the
   error path, but it skips over the initialization of that variable.
   Move the initialization before the first validation check.

 - Fix use of event length in validation of persistent ring buffer

   On boot up, the persistent ring buffer is checked to see if it is
   valid by several methods. One being to walk all the events in the
   memory location to make sure they are all valid. The length of the
   event is used to move to the next event. This length is determined by
   the data in the buffer. If that length is corrupted, it could
   possibly make the next event to check located at a bad memory
   location.

   Validate the length field of the event when doing the event walk.

 - Fix function graph on archs that do not support use of ftrace_ops

   When an architecture defines HAVE_DYNAMIC_FTRACE_WITH_ARGS, it means
   that its function graph tracer uses the ftrace_ops of the function
   tracer to call its callbacks. This allows a single registered
   callback to be called directly instead of checking the callback's
   meta data's hash entries against the function being traced.

   For architectures that do not support this feature, it must always
   call the loop function that tests each registered callback (even if
   there's only one). The loop function tests each callback's meta data
   against its hash of functions and will call its callback if the
   function being traced is in its hash map.

   The issue was that there was no check against this and the direct
   function was being called even if the architecture didn't support it.
   This meant that if function tracing was enabled at the same time as a
   callback was registered with the function graph tracer, its callback
   would be called for every function that the function tracer also
   traced, even if the callback's meta data only wanted to be called
   back for a small subset of functions.

   Prevent the direct calling for those architectures that do not
   support it.

 - Fix references to trace_event_file for hist files

   The hist files used event_file_data() to get a reference to the
   associated trace_event_file the histogram was attached to. This would
   return a pointer even if the trace_event_file is about to be freed
   (via RCU). Instead it should use the event_file_file() helper that
   returns NULL if the trace_event_file is marked to be freed so that no
   new references are added to it.

 - Wake up hist poll readers when an event is being freed

   When polling on a hist file, the task is only awoken when a hist
   trigger is triggered. This means that if an event is being freed
   while there's a task waiting on its hist file, it will need to wait
   until the hist trigger occurs to wake it up and allow the freeing to
   happen. Note, the event will not be completely freed until all
   references are removed, and a hist poller keeps a reference. But it
   should still be woken when the event is being freed.

* tag 'trace-v7.0-2' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace:
  tracing: Wake up poll waiters for hist files when removing an event
  tracing: Fix checking of freed trace_event_file for hist files
  fgraph: Do not call handlers direct when not using ftrace_ops
  tracing: ring-buffer: Fix to check event length before using
  ring-buffer: Fix possible dereference of uninitialized pointer