Skip to content

Conversation

@PlaidCat
Copy link
Collaborator

This is the attempt at a re-builder built on Cron and some internal tools, but the same process is as follows as previous rebuilds

  • Download all unprocessed src.rpm
  • for each src,pm
    • Find all commits in changelog up to last known tag ... in this case 5.14.0-611
    • Re-play commits in reverse order (oldest in change log to newest) with git cherry-pick
    • After replay replace ENTIRE code in branch with rpmbuild -bp from corresponding src.rpm.
    • Tag Rebuild branch

Rebuild Splat Inspection

kernel-5.14.0-611.13.1.el9_7

[jmaple@devbox kernel-src-tree]$ cat ciq/ciq_backports/kernel-5.14.0-611.13.1.el9_7/rebuild.details.txt
Rebuild_History BUILDABLE
Rebuilding Kernel from rpm changelog with Fuzz Limit: 87.50%
Number of commits in upstream range v5.14~1..kernel-mainline: 337791
Number of commits in rpm: 38
Number of commits matched with upstream: 32 (84.21%)
Number of commits in upstream but not in rpm: 337759
Number of commits NOT found in upstream: 6 (15.79%)

Rebuilding Kernel on Branch rocky9_7_rebuild_kernel-5.14.0-611.13.1.el9_7 for kernel-5.14.0-611.13.1.el9_7
Clean Cherry Picks: 7 (21.88%)
Empty Cherry Picks: 25 (78.12%)
_______________________________

__EMPTY COMMITS__________________________
2df8e64e01c10a4b75ea7797629f9e764a840eb0 dpll: Add basic Microchip ZL3073x support
b7d907d1f84a3c51d7fcc83e30a0227cfea77172 dpll: zl3073x: Fetch invariants during probe
a99a9f0ebdaaae14fe1d69d046633bce6110d0c2 dpll: zl3073x: Read DPLL types and pin properties from system firmware
75a71ecc24125f92eaed45f0b9bd90373f73ec6f dpll: zl3073x: Register DPLL devices and pins
9686c8b0167605232fc777a14907089e092a23e6 dpll: zl3073x: Implement input pin selection in manual mode
12ba92f0a6defd60cb0c518c69fce19d7d27660d dpll: zl3073x: Add support to get/set priority on input pins
bf33c93c1a160301a577d098c700411545e9a0c2 dpll: zl3073x: Implement input pin state setting in automatic mode
ce26d7ca50a5298e025a92190b697de4903cea77 dpll: zl3073x: Add support to get/set frequency on pins
634ca2cb06d2117020908cdf7ca8556a92801fee dpll: zl3073x: Add support to get/set esync on pins
86ed4cd5fc0d4388cc083bee7ded8d9894a56b69 dpll: zl3073x: Add support to get phase offset on connected input pin
b7dbde2b82cc9523227c4f8ae5aa79b70ba36e22 dpll: zl3073x: Implement phase offset monitor feature
6287262f761e5a75c6316a7fd101abafd7a1d033 dpll: zl3073x: Add support to adjust phase
904c99ea36bb7d0333b4e0cc5e9e835c51e99316 dpll: zl3073x: Add support to get fractional frequency offset
fa582ca7e187a15e772e6a72fe035f649b387a60 dpll: zl3073x: Fix build failure
a4f0866e3dbbf3fee4078bce0b78d65a0875c0bc dpll: Make ZL3073X invisible
4eabe4cc0958e28ceaf592bbb62c234339642e41 dpll: zl3073x: ZL3073X_I2C and ZL3073X_SPI should depend on NET
ebb1031c51377829b21e1c58e8eccc479e4921b7 dpll: zl3073x: Refactor DPLL initialization
fcb8b32a68fd40b0440cb9468cf6f6ab9de9f3c5 dpll: zl3073x: Handle missing or corrupted flash configuration
259ede9da4ec8159c312aa60015a3aecbb67f348 dpll: zl3073x: Add functions to access hardware registers
3639bd087679f77c3fdedc6922f2cb01bb6ecbaf dpll: zl3073x: Add low-level flash functions
ca017409da6944310d2a9d8744f5ebc81179ce19 dpll: zl3073x: Add firmware loading functionality
a1e891fe4ae8df3ba17d75c270f1877e282c9d2c dpll: zl3073x: Implement devlink flash callback
347afa39042728267550fa7a5ab5e9af52671add dpll: zl3073x: Fix double free in zl3073x_devlink_flash_update()
f3426ac54c42c3260096ddc50b5470eb179fb06a dpll: zl3073x: Increase maximum size of flash utility
40c17a02de41f12dd713309c7d2546117c577d29 dpll: zl3073x: Fix output pin registration

__CHANGES NOT IN UPSTREAM________________
Porting to Rocky Linux 9, debranding and Rocky branding'
Ensure aarch64 kernel is not compressed'
x86/hyperv: Fix kdump on Azure CVMs
dpll: zl3073x: fix kernel-doc name and missing parameter in fw.c
redhat/configs: enable CONFIG_ZL3073X*
redhat/configs: enable CONFIG_I2C_MUX_PCA954x on x86

Build

[jmaple@devbox code]$ egrep -B 5 -A 5 "\[TIMER\]|^Starting Build" $(ls -t kbuild* | head -n1)
/mnt/code/kernel-src-tree-build
Running make mrproper...
  CLEAN   scripts/basic
  CLEAN   scripts/kconfig
  CLEAN   include/config include/generated
[TIMER]{MRPROPER}: 5s
x86_64 architecture detected, copying config
'configs/kernel-x86_64-rhel.config' -> '.config'
Setting Local Version for build
CONFIG_LOCALVERSION="-rocky9_7_rebuild-2d407efe1dcc"
Making olddefconfig
--
  HOSTCC  scripts/kconfig/util.o
  HOSTLD  scripts/kconfig/conf
#
# configuration written to .config
#
Starting Build
  SYSHDR  arch/x86/include/generated/uapi/asm/unistd_32.h
  SYSHDR  arch/x86/include/generated/uapi/asm/unistd_64.h
  SYSHDR  arch/x86/include/generated/uapi/asm/unistd_x32.h
  SYSTBL  arch/x86/include/generated/asm/syscalls_32.h
  SYSHDR  arch/x86/include/generated/asm/unistd_32_ia32.h
--
  LD [M]  sound/x86/snd-hdmi-lpe-audio.ko
  BTF [M] sound/virtio/virtio_snd.ko
  LD [M]  sound/xen/snd_xen_front.ko
  BTF [M] sound/x86/snd-hdmi-lpe-audio.ko
  BTF [M] sound/xen/snd_xen_front.ko
[TIMER]{BUILD}: 1525s
Making Modules
  INSTALL /lib/modules/5.14.0-rocky9_7_rebuild-2d407efe1dcc/kernel/arch/x86/crypto/blake2s-x86_64.ko
  INSTALL /lib/modules/5.14.0-rocky9_7_rebuild-2d407efe1dcc/kernel/arch/x86/crypto/blowfish-x86_64.ko
  INSTALL /lib/modules/5.14.0-rocky9_7_rebuild-2d407efe1dcc/kernel/arch/x86/crypto/camellia-aesni-avx-x86_64.ko
  INSTALL /lib/modules/5.14.0-rocky9_7_rebuild-2d407efe1dcc/kernel/arch/x86/crypto/camellia-aesni-avx2.ko
--
  SIGN    /lib/modules/5.14.0-rocky9_7_rebuild-2d407efe1dcc/kernel/sound/xen/snd_xen_front.ko
  STRIP   /lib/modules/5.14.0-rocky9_7_rebuild-2d407efe1dcc/kernel/sound/usb/snd-usb-audio.ko
  SIGN    /lib/modules/5.14.0-rocky9_7_rebuild-2d407efe1dcc/kernel/sound/virtio/virtio_snd.ko
  SIGN    /lib/modules/5.14.0-rocky9_7_rebuild-2d407efe1dcc/kernel/sound/usb/snd-usb-audio.ko
  DEPMOD  /lib/modules/5.14.0-rocky9_7_rebuild-2d407efe1dcc
[TIMER]{MODULES}: 10s
Making Install
sh ./arch/x86/boot/install.sh 5.14.0-rocky9_7_rebuild-2d407efe1dcc \
        arch/x86/boot/bzImage System.map "/boot"
[TIMER]{INSTALL}: 23s
Checking kABI
kABI check passed
Setting Default Kernel to /boot/vmlinuz-5.14.0-rocky9_7_rebuild-2d407efe1dcc and Index to 0
Hopefully Grub2.0 took everything ... rebooting after time metrices
[TIMER]{MRPROPER}: 5s
[TIMER]{BUILD}: 1525s
[TIMER]{MODULES}: 10s
[TIMER]{INSTALL}: 23s
[TIMER]{TOTAL} 1568s
Rebooting in 10 seconds

KSelfTests

[jmaple@devbox code]$ ~/workspace/auto_kernel_history_rebuild/Rocky10/rocky10/code/get_kselftest_diff.sh
kselftest.5.14.0-rocky9_7_rebuild-99ff44356097.log
313
kselftest.5.14.0-jmaple_rlc-9_5.14.0-611.9.1.el9_7-4edb6878037a+.log
311
kselftest.5.14.0-rocky9_7_rebuild-386d677a861c.log
313
kselftest.5.14.0-rocky9_7_rebuild-2d407efe1dcc.log
313
Before: kselftest.5.14.0-rocky9_7_rebuild-386d677a861c.log
After: kselftest.5.14.0-rocky9_7_rebuild-2d407efe1dcc.log
Diff:
No differences found.

jira KERNEL-311
Rebuild_History Non-Buildable kernel-5.14.0-611.13.1.el9_7
commit-author Ivan Vecera <ivecera@redhat.com>
commit 0afcee1

Add a common DT schema for DPLL device and its associated pins.
The DPLL (device phase-locked loop) is a device used for precise clock
synchronization in networking and telecom hardware.

The device includes one or more DPLLs (channels) and one or more
physical input/output pins.

Each DPLL channel is used either to provide a pulse-per-clock signal or
to drive an Ethernet equipment clock.

The input and output pins have the following properties:
* label: specifies board label
* connection type: specifies its usage depending on wiring
* list of supported or allowed frequencies: depending on how the pin
  is connected and where)
* embedded sync capability: indicates whether the pin supports this

	Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
	Signed-off-by: Ivan Vecera <ivecera@redhat.com>
	Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Link: https://patch.msgid.link/20250704182202.1641943-2-ivecera@redhat.com
	Signed-off-by: Jakub Kicinski <kuba@kernel.org>
(cherry picked from commit 0afcee1)
	Signed-off-by: Jonathan Maple <jmaple@ciq.com>
jira KERNEL-311
Rebuild_History Non-Buildable kernel-5.14.0-611.13.1.el9_7
commit-author Ivan Vecera <ivecera@redhat.com>
commit 9f149c5

Add DT bindings for Microchip Azurite DPLL chip family. These chips
provide up to 5 independent DPLL channels, 10 differential or
single-ended inputs and 10 differential or 20 single-ended outputs.
They can be connected via I2C or SPI busses.

	Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
	Signed-off-by: Ivan Vecera <ivecera@redhat.com>
	Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Link: https://patch.msgid.link/20250704182202.1641943-3-ivecera@redhat.com
	Signed-off-by: Jakub Kicinski <kuba@kernel.org>
(cherry picked from commit 9f149c5)
	Signed-off-by: Jonathan Maple <jmaple@ciq.com>
jira KERNEL-311
Rebuild_History Non-Buildable kernel-5.14.0-611.13.1.el9_7
commit-author Andy Shevchenko <andriy.shevchenko@linux.intel.com>
commit aea672d

The proposed spi_get_device_match_data() helper is for retrieving
a driver data associated with the ID in an ID table. First, it tries
to get driver data of the device enumerated by firmware interface
(usually Device Tree or ACPI). If none is found it falls back to
the SPI ID table matching.

	Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20221020195421.10482-1-andriy.shevchenko@linux.intel.com
	Signed-off-by: Mark Brown <broonie@kernel.org>
(cherry picked from commit aea672d)
	Signed-off-by: Jonathan Maple <jmaple@ciq.com>
jira KERNEL-311
Rebuild_History Non-Buildable kernel-5.14.0-611.13.1.el9_7
commit-author Ivan Vecera <ivecera@redhat.com>
commit 2df8e64
Empty-Commit: Cherry-Pick Conflicts during history rebuild.
Will be included in final tarball splat. Ref for failed cherry-pick at:
ciq/ciq_backports/kernel-5.14.0-611.13.1.el9_7/2df8e64e.failed

Microchip Azurite ZL3073x represents chip family providing DPLL
and optionally PHC (PTP) functionality. The chips can be connected
be connected over I2C or SPI bus.

They have the following characteristics:
* up to 5 separate DPLL units (channels)
* 5 synthesizers
* 10 input pins (references)
* 10 outputs
* 20 output pins (output pin pair shares one output)
* Each reference and output can operate in either differential or
  single-ended mode (differential mode uses 2 pins)
* Each output is connected to one of the synthesizers
* Each synthesizer is driven by one of the DPLL unit

The device uses 7-bit addresses and 8-bits values. It exposes 8-, 16-,
32- and 48-bits registers in address range <0x000,0x77F>. Due to 7bit
addressing, the range is organized into pages of 128 bytes, with each
page containing a page selector register at address 0x7F.
For reading/writing multi-byte registers, the device supports bulk
transfers.

Add basic functionality to access device registers, probe functionality
both I2C and SPI cases and add devlink support to provide info and
to set clock ID parameter.

	Signed-off-by: Ivan Vecera <ivecera@redhat.com>
	Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Link: https://patch.msgid.link/20250704182202.1641943-6-ivecera@redhat.com
	Signed-off-by: Jakub Kicinski <kuba@kernel.org>
(cherry picked from commit 2df8e64)
	Signed-off-by: Jonathan Maple <jmaple@ciq.com>

# Conflicts:
#	drivers/Kconfig
jira KERNEL-311
Rebuild_History Non-Buildable kernel-5.14.0-611.13.1.el9_7
commit-author Ivan Vecera <ivecera@redhat.com>
commit b7d907d
Empty-Commit: Cherry-Pick Conflicts during history rebuild.
Will be included in final tarball splat. Ref for failed cherry-pick at:
ciq/ciq_backports/kernel-5.14.0-611.13.1.el9_7/b7d907d1.failed

Several configuration parameters will remain constant at runtime,
so we can load them during probe to avoid excessive reads from
the hardware.

Read the following parameters from the device during probe and store
them for later use:

* enablement status and frequencies of the synthesizers and their
  associated DPLL channels
* enablement status and type (single-ended or differential) of input pins
* associated synthesizers, signal format, and enablement status of
  outputs

	Signed-off-by: Ivan Vecera <ivecera@redhat.com>
	Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Link: https://patch.msgid.link/20250704182202.1641943-7-ivecera@redhat.com
	Signed-off-by: Jakub Kicinski <kuba@kernel.org>
(cherry picked from commit b7d907d)
	Signed-off-by: Jonathan Maple <jmaple@ciq.com>

# Conflicts:
#	drivers/dpll/zl3073x/core.c
#	drivers/dpll/zl3073x/core.h
#	drivers/dpll/zl3073x/regs.h
jira KERNEL-311
Rebuild_History Non-Buildable kernel-5.14.0-611.13.1.el9_7
commit-author Ivan Vecera <ivecera@redhat.com>
commit a99a9f0
Empty-Commit: Cherry-Pick Conflicts during history rebuild.
Will be included in final tarball splat. Ref for failed cherry-pick at:
ciq/ciq_backports/kernel-5.14.0-611.13.1.el9_7/a99a9f0e.failed

Add support for reading of DPLL types and optional pin properties from
the system firmware (DT, ACPI...).

The DPLL types are stored in property 'dpll-types' as string array and
possible values 'pps' and 'eec' are mapped to DPLL enums DPLL_TYPE_PPS
and DPLL_TYPE_EEC.

The pin properties are stored under 'input-pins' and 'output-pins'
sub-nodes and the following ones are supported:

* reg
    integer that specifies pin index
* label
    string that is used by driver as board label
* connection-type
    string that indicates pin connection type
* supported-frequencies-hz
    array of u64 values what frequencies are supported / allowed for
    given pin with respect to hardware wiring

Do not blindly trust system firmware and filter out frequencies that
cannot be configured/represented in device (input frequencies have to
be factorized by one of the base frequencies and output frequencies have
to divide configured synthesizer frequency).

	Signed-off-by: Ivan Vecera <ivecera@redhat.com>
	Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Link: https://patch.msgid.link/20250704182202.1641943-8-ivecera@redhat.com
	Signed-off-by: Jakub Kicinski <kuba@kernel.org>
(cherry picked from commit a99a9f0)
	Signed-off-by: Jonathan Maple <jmaple@ciq.com>

# Conflicts:
#	drivers/dpll/zl3073x/Makefile
#	drivers/dpll/zl3073x/core.c
#	drivers/dpll/zl3073x/core.h
jira KERNEL-311
Rebuild_History Non-Buildable kernel-5.14.0-611.13.1.el9_7
commit-author Ivan Vecera <ivecera@redhat.com>
commit 75a71ec
Empty-Commit: Cherry-Pick Conflicts during history rebuild.
Will be included in final tarball splat. Ref for failed cherry-pick at:
ciq/ciq_backports/kernel-5.14.0-611.13.1.el9_7/75a71ecc.failed

Enumerate all available DPLL channels and registers a DPLL device for
each of them. Check all input references and outputs and register
DPLL pins for them.

Number of registered DPLL pins depends on configuration of references
and outputs. If the reference or output is configured as differential
one then only one DPLL pin is registered. Both references and outputs
can be also disabled from firmware configuration and in this case
no DPLL pins are registered.

All registrable references are registered to all available DPLL devices
with exception of DPLLs that are configured in NCO (numerically
controlled oscillator) mode. In this mode DPLL channel acts as PHC and
cannot be locked to any reference.

Device outputs are connected to one of synthesizers and each synthesizer
is driven by some DPLL channel. So output pins belonging to given output
are registered to DPLL device that drives associated synthesizer.

Finally add kworker task to monitor async changes on all DPLL channels
and input pins and to notify about them DPLL core. Output pins are not
monitored as their parameters are not changed asynchronously by the
device.

Co-developed-by: Prathosh Satish <Prathosh.Satish@microchip.com>
	Signed-off-by: Prathosh Satish <Prathosh.Satish@microchip.com>
	Signed-off-by: Ivan Vecera <ivecera@redhat.com>
	Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Link: https://patch.msgid.link/20250704182202.1641943-9-ivecera@redhat.com
	Signed-off-by: Jakub Kicinski <kuba@kernel.org>
(cherry picked from commit 75a71ec)
	Signed-off-by: Jonathan Maple <jmaple@ciq.com>

# Conflicts:
#	drivers/dpll/zl3073x/Makefile
#	drivers/dpll/zl3073x/core.c
#	drivers/dpll/zl3073x/core.h
#	drivers/dpll/zl3073x/devlink.c
#	drivers/dpll/zl3073x/regs.h
jira KERNEL-311
Rebuild_History Non-Buildable kernel-5.14.0-611.13.1.el9_7
commit-author Ivan Vecera <ivecera@redhat.com>
commit 9686c8b
Empty-Commit: Cherry-Pick Conflicts during history rebuild.
Will be included in final tarball splat. Ref for failed cherry-pick at:
ciq/ciq_backports/kernel-5.14.0-611.13.1.el9_7/9686c8b0.failed

Implement input pin state setting if the DPLL is running in manual mode.
The driver indicates manual mode if the DPLL mode is one of ref-lock,
forced-holdover, freerun.

Use these modes to implement input pin state change between connected
and disconnected states. When the user set the particular pin as
connected the driver marks this input pin as forced reference and
switches the DPLL mode to ref-lock. When the use set the pin as
disconnected the driver switches the DPLL to freerun or forced holdover
mode. The switch to holdover mode is done if the DPLL has holdover
capability (e.g is currently locked with holdover acquired).

	Signed-off-by: Ivan Vecera <ivecera@redhat.com>
	Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Link: https://patch.msgid.link/20250704182202.1641943-10-ivecera@redhat.com
	Signed-off-by: Jakub Kicinski <kuba@kernel.org>
(cherry picked from commit 9686c8b)
	Signed-off-by: Jonathan Maple <jmaple@ciq.com>

# Conflicts:
#	drivers/dpll/zl3073x/dpll.c
#	drivers/dpll/zl3073x/prop.c
jira KERNEL-311
Rebuild_History Non-Buildable kernel-5.14.0-611.13.1.el9_7
commit-author Ivan Vecera <ivecera@redhat.com>
commit 12ba92f
Empty-Commit: Cherry-Pick Conflicts during history rebuild.
Will be included in final tarball splat. Ref for failed cherry-pick at:
ciq/ciq_backports/kernel-5.14.0-611.13.1.el9_7/12ba92f0.failed

Add support for getting and setting input pin priority. Implement
required callbacks and set appropriate capability for input pins.
Although the pin priority make sense only if the DPLL is running in
automatic mode we have to expose this capability unconditionally because
input pins (references) are shared between all DPLLs where one of them
can run in automatic mode while the other one not.

Co-developed-by: Prathosh Satish <Prathosh.Satish@microchip.com>
	Signed-off-by: Prathosh Satish <Prathosh.Satish@microchip.com>
	Signed-off-by: Ivan Vecera <ivecera@redhat.com>
	Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Link: https://patch.msgid.link/20250704182202.1641943-11-ivecera@redhat.com
	Signed-off-by: Jakub Kicinski <kuba@kernel.org>
(cherry picked from commit 12ba92f)
	Signed-off-by: Jonathan Maple <jmaple@ciq.com>

# Conflicts:
#	drivers/dpll/zl3073x/dpll.c
#	drivers/dpll/zl3073x/prop.c
jira KERNEL-311
Rebuild_History Non-Buildable kernel-5.14.0-611.13.1.el9_7
commit-author Ivan Vecera <ivecera@redhat.com>
commit bf33c93
Empty-Commit: Cherry-Pick Conflicts during history rebuild.
Will be included in final tarball splat. Ref for failed cherry-pick at:
ciq/ciq_backports/kernel-5.14.0-611.13.1.el9_7/bf33c93c.failed

Implement input pin state setting when the DPLL is running in automatic
mode. Unlike manual mode, the DPLL mode switching is not used here and
the implementation uses special priority value (15) to make the given
pin non-selectable.

When the user sets state of the pin as disconnected the driver
internally sets its priority in HW to 15 that prevents the DPLL to
choose this input pin. Conversely, if the pin status is set to
selectable, the driver sets the pin priority in HW to the original saved
value.

	Signed-off-by: Ivan Vecera <ivecera@redhat.com>
	Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Link: https://patch.msgid.link/20250704182202.1641943-12-ivecera@redhat.com
	Signed-off-by: Jakub Kicinski <kuba@kernel.org>
(cherry picked from commit bf33c93)
	Signed-off-by: Jonathan Maple <jmaple@ciq.com>

# Conflicts:
#	drivers/dpll/zl3073x/dpll.c
jira KERNEL-311
Rebuild_History Non-Buildable kernel-5.14.0-611.13.1.el9_7
commit-author Ivan Vecera <ivecera@redhat.com>
commit ce26d7c
Empty-Commit: Cherry-Pick Conflicts during history rebuild.
Will be included in final tarball splat. Ref for failed cherry-pick at:
ciq/ciq_backports/kernel-5.14.0-611.13.1.el9_7/ce26d7ca.failed

Add support to get/set frequency on pins. The frequency for input
pins (references) is computed in the device according this formula:

 freq = base_freq * multiplier * (nominator / denominator)

where the base_freq comes from the list of supported base frequencies
and other parameters are arbitrary numbers. All these parameters are
16-bit unsigned integers.

The frequency for output pin is determined by the frequency of
synthesizer the output pin is connected to and divisor of the output
to which is the given pin belongs. The resulting frequency of the
P-pin and the N-pin from this output pair depends on the signal
format of this output pair.

The device supports so-called N-divided signal formats where for the
N-pin there is an additional divisor. The frequencies for both pins
from such output pair are computed:

 P-pin-freq = synth_freq / output_div
 N-pin-freq = synth_freq / output_div / n_div

For other signal-format types both P and N pin have the same frequency
based only synth frequency and output divisor.

Implement output pin callbacks to get and set frequency. The frequency
setting for the output non-N-divided signal format is simple as we have
to compute just new output divisor. For N-divided formats it is more
complex because by changing of output divisor we change frequency for
both P and N pins. In this case if we are changing frequency for P-pin
we have to compute also new N-divisor for N-pin to keep its current
frequency. From this and the above it follows that the frequency of
the N-pin cannot be higher than the frequency of the P-pin and the
callback must take this limitation into account.

Co-developed-by: Prathosh Satish <Prathosh.Satish@microchip.com>
	Signed-off-by: Prathosh Satish <Prathosh.Satish@microchip.com>
	Signed-off-by: Ivan Vecera <ivecera@redhat.com>
	Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Link: https://patch.msgid.link/20250704182202.1641943-13-ivecera@redhat.com
	Signed-off-by: Jakub Kicinski <kuba@kernel.org>
(cherry picked from commit ce26d7c)
	Signed-off-by: Jonathan Maple <jmaple@ciq.com>

# Conflicts:
#	drivers/dpll/zl3073x/dpll.c
#	drivers/dpll/zl3073x/regs.h
jira KERNEL-311
Rebuild_History Non-Buildable kernel-5.14.0-611.13.1.el9_7
commit-author Ivan Vecera <ivecera@redhat.com>
commit 634ca2c
Empty-Commit: Cherry-Pick Conflicts during history rebuild.
Will be included in final tarball splat. Ref for failed cherry-pick at:
ciq/ciq_backports/kernel-5.14.0-611.13.1.el9_7/634ca2cb.failed

Add support to get/set embedded sync for both input and output pins.
The DPLL is able to lock on input reference when the embedded sync
frequency is 1 PPS and pulse width 25%. The esync on outputs are more
versatille and theoretically supports any esync frequency that divides
current output frequency but for now support the same that supported on
input pins (1 PPS & 25% pulse).

Note that for the output pins the esync divisor shares the same register
used for N-divided signal formats. Due to this the esync cannot be
enabled on outputs configured with one of the N-divided signal formats.

	Reviewed-by: Jiri Pirko <jiri@nvidia.com>
	Tested-by: Prathosh Satish <prathosh.satish@microchip.com>
Co-developed-by: Prathosh Satish <Prathosh.Satish@microchip.com>
	Signed-off-by: Prathosh Satish <Prathosh.Satish@microchip.com>
	Signed-off-by: Ivan Vecera <ivecera@redhat.com>
Link: https://patch.msgid.link/20250715144633.149156-2-ivecera@redhat.com
	Signed-off-by: Paolo Abeni <pabeni@redhat.com>

(cherry picked from commit 634ca2c)
	Signed-off-by: Jonathan Maple <jmaple@ciq.com>

# Conflicts:
#	drivers/dpll/zl3073x/dpll.c
#	drivers/dpll/zl3073x/regs.h
jira KERNEL-311
Rebuild_History Non-Buildable kernel-5.14.0-611.13.1.el9_7
commit-author Ivan Vecera <ivecera@redhat.com>
commit 86ed4cd
Empty-Commit: Cherry-Pick Conflicts during history rebuild.
Will be included in final tarball splat. Ref for failed cherry-pick at:
ciq/ciq_backports/kernel-5.14.0-611.13.1.el9_7/86ed4cd5.failed

Add support to get phase offset for the connected input pin. Implement
the appropriate callback and function that performs DPLL to connected
reference phase error measurement and notifies DPLL core about changes.

The measurement is performed internally by device on background 40 times
per second but the measured value is read each second and compared with
previous value.

	Reviewed-by: Jiri Pirko <jiri@nvidia.com>
	Tested-by: Prathosh Satish <prathosh.satish@microchip.com>
Co-developed-by: Prathosh Satish <Prathosh.Satish@microchip.com>
	Signed-off-by: Prathosh Satish <Prathosh.Satish@microchip.com>
	Signed-off-by: Ivan Vecera <ivecera@redhat.com>
Link: https://patch.msgid.link/20250715144633.149156-3-ivecera@redhat.com
	Signed-off-by: Paolo Abeni <pabeni@redhat.com>

(cherry picked from commit 86ed4cd)
	Signed-off-by: Jonathan Maple <jmaple@ciq.com>

# Conflicts:
#	drivers/dpll/zl3073x/core.c
#	drivers/dpll/zl3073x/dpll.c
#	drivers/dpll/zl3073x/dpll.h
#	drivers/dpll/zl3073x/regs.h
jira KERNEL-311
Rebuild_History Non-Buildable kernel-5.14.0-611.13.1.el9_7
commit-author Ivan Vecera <ivecera@redhat.com>
commit b7dbde2
Empty-Commit: Cherry-Pick Conflicts during history rebuild.
Will be included in final tarball splat. Ref for failed cherry-pick at:
ciq/ciq_backports/kernel-5.14.0-611.13.1.el9_7/b7dbde2b.failed

Implement phase offset monitor feature to allow a user to monitor
phase offsets across all available inputs.

The device firmware periodically performs phase offsets measurements for
all available DPLL channels and input references. The driver can ask
the firmware to fill appropriate latch registers with measured values.

There are 2 sets of latch registers for phase offsets reporting:

1) DPLL-to-connected-ref: up to 5 registers that contain values for
   phase offset between particular DPLL channel and its connected input
   reference.
2) selected-DPLL-to-ref: 10  registers that contain values for phase
   offsets between selected DPLL channel and all available input
   references.

Both are filled with single read request so the driver can read
DPLL-to-connected-ref phase offset for all DPLL channels at once.
This was implemented in the previous patch.

To read selected-DPLL-to-ref registers for all DPLLs a separate read
request has to be sent to device firmware for each DPLL channel.

To implement phase offset monitor feature:
* Extend zl3073x_ref_phase_offsets_update() to select given DPLL channel
  in phase offset read request. The caller can set channel==-1 if it
  will not read Type2 registers.
* Use this extended function to update phase offset latch registers
  during zl3073x_dpll_changes_check() call if phase monitor is enabled
* Extend zl3073x_dpll_pin_phase_offset_check() to check phase offset
  changes for all available input references
* Extend zl3073x_dpll_input_pin_phase_offset_get() to report phase
  offset values for all available input references
* Implement phase offset monitor callbacks to enable/disable this
  feature

	Reviewed-by: Jiri Pirko <jiri@nvidia.com>
	Tested-by: Prathosh Satish <prathosh.satish@microchip.com>
Co-developed-by: Prathosh Satish <Prathosh.Satish@microchip.com>
	Signed-off-by: Prathosh Satish <Prathosh.Satish@microchip.com>
	Signed-off-by: Ivan Vecera <ivecera@redhat.com>
Link: https://patch.msgid.link/20250715144633.149156-4-ivecera@redhat.com
	Signed-off-by: Paolo Abeni <pabeni@redhat.com>

(cherry picked from commit b7dbde2)
	Signed-off-by: Jonathan Maple <jmaple@ciq.com>

# Conflicts:
#	drivers/dpll/zl3073x/core.c
#	drivers/dpll/zl3073x/core.h
#	drivers/dpll/zl3073x/dpll.c
#	drivers/dpll/zl3073x/dpll.h
#	drivers/dpll/zl3073x/regs.h
jira KERNEL-311
Rebuild_History Non-Buildable kernel-5.14.0-611.13.1.el9_7
commit-author Ivan Vecera <ivecera@redhat.com>
commit 6287262
Empty-Commit: Cherry-Pick Conflicts during history rebuild.
Will be included in final tarball splat. Ref for failed cherry-pick at:
ciq/ciq_backports/kernel-5.14.0-611.13.1.el9_7/6287262f.failed

Add support to get/set phase adjustment for both input and output pins.
The phase adjustment is implemented using reference and output phase
offset compensation registers. For input pins the adjustment value can
be arbitrary number but for outputs the value has to be a multiple
of half synthesizer clock cycles.

	Reviewed-by: Jiri Pirko <jiri@nvidia.com>
	Tested-by: Prathosh Satish <prathosh.satish@microchip.com>
Co-developed-by: Prathosh Satish <Prathosh.Satish@microchip.com>
	Signed-off-by: Prathosh Satish <Prathosh.Satish@microchip.com>
	Signed-off-by: Ivan Vecera <ivecera@redhat.com>
Link: https://patch.msgid.link/20250715144633.149156-5-ivecera@redhat.com
	Signed-off-by: Paolo Abeni <pabeni@redhat.com>

(cherry picked from commit 6287262)
	Signed-off-by: Jonathan Maple <jmaple@ciq.com>

# Conflicts:
#	drivers/dpll/zl3073x/dpll.c
#	drivers/dpll/zl3073x/regs.h
jira KERNEL-311
Rebuild_History Non-Buildable kernel-5.14.0-611.13.1.el9_7
commit-author Ivan Vecera <ivecera@redhat.com>
commit 904c99e
Empty-Commit: Cherry-Pick Conflicts during history rebuild.
Will be included in final tarball splat. Ref for failed cherry-pick at:
ciq/ciq_backports/kernel-5.14.0-611.13.1.el9_7/904c99ea.failed

Adds support to get fractional frequency offset for input pins. Implement
the appropriate callback and function that periodicaly performs reference
frequency measurement and notifies DPLL core about changes.

	Reviewed-by: Jiri Pirko <jiri@nvidia.com>
	Tested-by: Prathosh Satish <prathosh.satish@microchip.com>
Co-developed-by: Prathosh Satish <Prathosh.Satish@microchip.com>
	Signed-off-by: Prathosh Satish <Prathosh.Satish@microchip.com>
	Signed-off-by: Ivan Vecera <ivecera@redhat.com>
Link: https://patch.msgid.link/20250715144633.149156-6-ivecera@redhat.com
	Signed-off-by: Paolo Abeni <pabeni@redhat.com>

(cherry picked from commit 904c99e)
	Signed-off-by: Jonathan Maple <jmaple@ciq.com>

# Conflicts:
#	drivers/dpll/zl3073x/core.c
#	drivers/dpll/zl3073x/core.h
#	drivers/dpll/zl3073x/dpll.c
#	drivers/dpll/zl3073x/regs.h
jira KERNEL-311
Rebuild_History Non-Buildable kernel-5.14.0-611.13.1.el9_7
commit-author Ivan Vecera <ivecera@redhat.com>
commit fa582ca
Empty-Commit: Cherry-Pick Conflicts during history rebuild.
Will be included in final tarball splat. Ref for failed cherry-pick at:
ciq/ciq_backports/kernel-5.14.0-611.13.1.el9_7/fa582ca7.failed

If CONFIG_ZL3073X is enabled but both CONFIG_ZL3073X_I2C and
CONFIG_ZL3073X_SPI are disabled, the compilation may fail because
CONFIG_REGMAP is not enabled.

Fix the issue by selecting CONFIG_REGMAP when CONFIG_ZL3073X is enabled.

Fixes: 2df8e64 ("dpll: Add basic Microchip ZL3073x support")
	Signed-off-by: Ivan Vecera <ivecera@redhat.com>
Link: https://patch.msgid.link/20250726184145.25769-1-ivecera@redhat.com
	Signed-off-by: Jakub Kicinski <kuba@kernel.org>
(cherry picked from commit fa582ca)
	Signed-off-by: Jonathan Maple <jmaple@ciq.com>

# Conflicts:
#	drivers/dpll/zl3073x/Kconfig
jira KERNEL-311
Rebuild_History Non-Buildable kernel-5.14.0-611.13.1.el9_7
commit-author Geert Uytterhoeven <geert+renesas@glider.be>
commit a4f0866
Empty-Commit: Cherry-Pick Conflicts during history rebuild.
Will be included in final tarball splat. Ref for failed cherry-pick at:
ciq/ciq_backports/kernel-5.14.0-611.13.1.el9_7/a4f0866e.failed

Currently, the user is always asked about the Microchip Azurite
DPLL/PTP/SyncE core driver, even when I2C and SPI are disabled, and thus
the driver cannot be used at all.

Fix this by making the Kconfig symbol for the core driver invisible
(unless compile-testing), and selecting it by the bus glue sub-drivers.
Drop the modular defaults, as drivers should not default to enabled.

Fixes: 2df8e64 ("dpll: Add basic Microchip ZL3073x support")
	Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://patch.msgid.link/97804163aeb262f0e0706d00c29d9bb751844454.1753874405.git.geert+renesas@glider.be
	Signed-off-by: Jakub Kicinski <kuba@kernel.org>
(cherry picked from commit a4f0866)
	Signed-off-by: Jonathan Maple <jmaple@ciq.com>

# Conflicts:
#	drivers/dpll/zl3073x/Kconfig
jira KERNEL-311
Rebuild_History Non-Buildable kernel-5.14.0-611.13.1.el9_7
commit-author Geert Uytterhoeven <geert+renesas@glider.be>
commit 4eabe4c
Empty-Commit: Cherry-Pick Conflicts during history rebuild.
Will be included in final tarball splat. Ref for failed cherry-pick at:
ciq/ciq_backports/kernel-5.14.0-611.13.1.el9_7/4eabe4cc.failed

When making ZL3073X invisible, it was overlooked that ZL3073X depends on
NET, while ZL3073X_I2C and ZL3073X_SPI do not, causing:

    WARNING: unmet direct dependencies detected for ZL3073X when selected by ZL3073X_I2C
    WARNING: unmet direct dependencies detected for ZL3073X when selected by ZL3073X_SPI
    WARNING: unmet direct dependencies detected for ZL3073X
	Depends on [n]: NET [=n]
	Selected by [y]:
	- ZL3073X_I2C [=y] && I2C [=y]
	Selected by [y]:
	- ZL3073X_SPI [=y] && SPI [=y]

Fix this by adding the missing dependencies to ZL3073X_I2C and
ZL3073X_SPI.

	Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202508022110.nTqZ5Ylu-lkp@intel.com/
Closes: https://lore.kernel.org/oe-kbuild-all/202508022351.NHIxPF8j-lkp@intel.com/
Fixes: a4f0866 ("dpll: Make ZL3073X invisible")
	Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
	Acked-by: Ivan Vecera <ivecera@redhat.com>
Link: https://patch.msgid.link/20250802155302.3673457-1-geert+renesas@glider.be
	Signed-off-by: Jakub Kicinski <kuba@kernel.org>
(cherry picked from commit 4eabe4c)
	Signed-off-by: Jonathan Maple <jmaple@ciq.com>

# Conflicts:
#	drivers/dpll/zl3073x/Kconfig
jira KERNEL-311
Rebuild_History Non-Buildable kernel-5.14.0-611.13.1.el9_7
commit-author Ivan Vecera <ivecera@redhat.com>
commit ebb1031
Empty-Commit: Cherry-Pick Conflicts during history rebuild.
Will be included in final tarball splat. Ref for failed cherry-pick at:
ciq/ciq_backports/kernel-5.14.0-611.13.1.el9_7/ebb1031c.failed

Refactor DPLL initialization and move DPLL (de)registration, monitoring
control, fetching device invariant parameters and phase offset
measurement block setup to separate functions.

Use these new functions during device probe and teardown functions and
during changes to the clock_id devlink parameter.

These functions will also be used in the next patch implementing devlink
flash, where this functionality is likewise required.

	Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
	Signed-off-by: Ivan Vecera <ivecera@redhat.com>
Link: https://patch.msgid.link/20250909091532.11790-5-ivecera@redhat.com
	Signed-off-by: Jakub Kicinski <kuba@kernel.org>
(cherry picked from commit ebb1031)
	Signed-off-by: Jonathan Maple <jmaple@ciq.com>

# Conflicts:
#	drivers/dpll/zl3073x/core.c
#	drivers/dpll/zl3073x/core.h
#	drivers/dpll/zl3073x/devlink.c
jira KERNEL-311
Rebuild_History Non-Buildable kernel-5.14.0-611.13.1.el9_7
commit-author Ivan Vecera <ivecera@redhat.com>
commit fcb8b32
Empty-Commit: Cherry-Pick Conflicts during history rebuild.
Will be included in final tarball splat. Ref for failed cherry-pick at:
ciq/ciq_backports/kernel-5.14.0-611.13.1.el9_7/fcb8b32a.failed

If the internal flash contains missing or corrupted configuration,
basic communication over the bus still functions, but the device
is not capable of normal operation (for example, using mailboxes).

This condition is indicated in the info register by the ready bit.
If this bit is cleared, the probe procedure times out while fetching
the device state.

Handle this case by checking the ready bit value in zl3073x_dev_start()
and skipping DPLL device and pin registration if it is cleared.
Do not report this condition as an error, allowing the devlink device
to be registered and enabling the user to flash the correct configuration.

Prior this patch:
[   31.112299] zl3073x-i2c 1-0070: Failed to fetch input state: -ETIMEDOUT
[   31.116332] zl3073x-i2c 1-0070: error -ETIMEDOUT: Failed to start device
[   31.136881] zl3073x-i2c 1-0070: probe with driver zl3073x-i2c failed with error -110

After this patch:
[   41.011438] zl3073x-i2c 1-0070: FW not fully ready - missing or corrupted config

Fixes: 75a71ec ("dpll: zl3073x: Register DPLL devices and pins")
	Signed-off-by: Ivan Vecera <ivecera@redhat.com>
	Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/20251008141445.841113-1-ivecera@redhat.com
	Signed-off-by: Jakub Kicinski <kuba@kernel.org>
(cherry picked from commit fcb8b32)
	Signed-off-by: Jonathan Maple <jmaple@ciq.com>

# Conflicts:
#	drivers/dpll/zl3073x/core.c
#	drivers/dpll/zl3073x/regs.h
jira KERNEL-311
Rebuild_History Non-Buildable kernel-5.14.0-611.13.1.el9_7
commit-author Ivan Vecera <ivecera@redhat.com>
commit 259ede9
Empty-Commit: Cherry-Pick Conflicts during history rebuild.
Will be included in final tarball splat. Ref for failed cherry-pick at:
ciq/ciq_backports/kernel-5.14.0-611.13.1.el9_7/259ede9d.failed

Besides the device host registers that are directly accessible, there
are also hardware registers that can be accessed indirectly via specific
host registers.

Add register definitions for accessing hardware registers and provide
helper functions for working with them. Additionally, extend the number
of pages in the regmap configuration to 256, as the host registers used
for accessing hardware registers are located on page 255.

	Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
	Signed-off-by: Ivan Vecera <ivecera@redhat.com>
Link: https://patch.msgid.link/20250909091532.11790-2-ivecera@redhat.com
	Signed-off-by: Jakub Kicinski <kuba@kernel.org>
(cherry picked from commit 259ede9)
	Signed-off-by: Jonathan Maple <jmaple@ciq.com>

# Conflicts:
#	drivers/dpll/zl3073x/core.c
#	drivers/dpll/zl3073x/core.h
#	drivers/dpll/zl3073x/regs.h
jira KERNEL-311
Rebuild_History Non-Buildable kernel-5.14.0-611.13.1.el9_7
commit-author Ivan Vecera <ivecera@redhat.com>
commit 3639bd0
Empty-Commit: Cherry-Pick Conflicts during history rebuild.
Will be included in final tarball splat. Ref for failed cherry-pick at:
ciq/ciq_backports/kernel-5.14.0-611.13.1.el9_7/3639bd08.failed

To implement the devlink device flash functionality, the driver needs
to access both the device memory and the internal flash memory. The flash
memory is accessed using a device-specific program (called the flash
utility). This flash utility must be downloaded by the driver into
the device memory and then executed by the device CPU. Once running,
the flash utility provides a flash API to access the flash memory itself.

During this operation, the normal functionality provided by the standard
firmware is not available. Therefore, the driver must ensure that DPLL
callbacks and monitoring functions are not executed during the flash
operation.

Add all necessary functions for downloading the utility to device memory,
entering and exiting flash mode, and performing flash operations.

	Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
	Signed-off-by: Ivan Vecera <ivecera@redhat.com>
Link: https://patch.msgid.link/20250909091532.11790-3-ivecera@redhat.com
	Signed-off-by: Jakub Kicinski <kuba@kernel.org>
(cherry picked from commit 3639bd0)
	Signed-off-by: Jonathan Maple <jmaple@ciq.com>

# Conflicts:
#	drivers/dpll/zl3073x/Makefile
#	drivers/dpll/zl3073x/devlink.c
#	drivers/dpll/zl3073x/devlink.h
#	drivers/dpll/zl3073x/regs.h
jira KERNEL-311
Rebuild_History Non-Buildable kernel-5.14.0-611.13.1.el9_7
commit-author Ivan Vecera <ivecera@redhat.com>
commit ca01740
Empty-Commit: Cherry-Pick Conflicts during history rebuild.
Will be included in final tarball splat. Ref for failed cherry-pick at:
ciq/ciq_backports/kernel-5.14.0-611.13.1.el9_7/ca017409.failed

Add functionality for loading firmware files provided by the vendor
to be flashed into the device's internal flash memory. The firmware
consists of several components, such as the firmware executable itself,
chip-specific customizations, and configuration files.

The firmware file contains at least a flash utility, which is executed
on the device side, and one or more flashable components. Each component
has its own specific properties, such as the address where it should be
loaded during flashing, one or more destination flash pages, and
the flashing method that should be used.

	Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
	Signed-off-by: Ivan Vecera <ivecera@redhat.com>
Link: https://patch.msgid.link/20250909091532.11790-4-ivecera@redhat.com
	Signed-off-by: Jakub Kicinski <kuba@kernel.org>
(cherry picked from commit ca01740)
	Signed-off-by: Jonathan Maple <jmaple@ciq.com>

# Conflicts:
#	drivers/dpll/zl3073x/Makefile
jira KERNEL-311
Rebuild_History Non-Buildable kernel-5.14.0-611.13.1.el9_7
commit-author Ivan Vecera <ivecera@redhat.com>
commit a1e891f
Empty-Commit: Cherry-Pick Conflicts during history rebuild.
Will be included in final tarball splat. Ref for failed cherry-pick at:
ciq/ciq_backports/kernel-5.14.0-611.13.1.el9_7/a1e891fe.failed

Use the introduced functionality to read firmware files and flash their
contents into the device's internal flash memory to implement the devlink
flash update callback.

Sample output on EDS2 development board:
 # devlink -j dev info i2c/1-0070 | jq '.[][]["versions"]["running"]'
 {
   "fw": "6026"
 }
 # devlink dev flash i2c/1-0070 file firmware_fw2.hex
 [utility] Prepare flash mode
 [utility] Downloading image 100%
 [utility] Flash mode enabled
 [firmware1-part1] Downloading image 100%
 [firmware1-part1] Flashing image
 [firmware1-part2] Downloading image 100%
 [firmware1-part2] Flashing image
 [firmware1] Flashing done
 [firmware2] Downloading image 100%
 [firmware2] Flashing image 100%
 [firmware2] Flashing done
 [utility] Leaving flash mode
 Flashing done
 # devlink -j dev info i2c/1-0070 | jq '.[][]["versions"]["running"]'
 {
   "fw": "7006"
 }

	Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
	Signed-off-by: Ivan Vecera <ivecera@redhat.com>
Link: https://patch.msgid.link/20250909091532.11790-6-ivecera@redhat.com
	Signed-off-by: Jakub Kicinski <kuba@kernel.org>
(cherry picked from commit a1e891f)
	Signed-off-by: Jonathan Maple <jmaple@ciq.com>

# Conflicts:
#	Documentation/networking/devlink/zl3073x.rst
#	drivers/dpll/zl3073x/devlink.c
jira KERNEL-311
Rebuild_History Non-Buildable kernel-5.14.0-611.13.1.el9_7
commit-author Dan Carpenter <dan.carpenter@linaro.org>
commit 347afa3
Empty-Commit: Cherry-Pick Conflicts during history rebuild.
Will be included in final tarball splat. Ref for failed cherry-pick at:
ciq/ciq_backports/kernel-5.14.0-611.13.1.el9_7/347afa39.failed

The zl3073x_devlink_flash_prepare() function calls zl3073x_fw_free() and
the caller, zl3073x_devlink_flash_update(), also calls that same free
function so it leads to a double free.  Delete the extra free.

Fixes: a1e891f ("dpll: zl3073x: Implement devlink flash callback")
	Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
	Reviewed-by: Simon Horman <horms@kernel.org>
	Reviewed-by: Ivan Vecera <ivecera@redhat.com>
	Reviewed-by: Vadim Fedorenko <vadim.fedorenko@linux.dev>
Link: https://patch.msgid.link/aNVDbcIQq4RmU_fl@stanley.mountain
	Signed-off-by: Jakub Kicinski <kuba@kernel.org>
(cherry picked from commit 347afa3)
	Signed-off-by: Jonathan Maple <jmaple@ciq.com>

# Conflicts:
#	drivers/dpll/zl3073x/devlink.c
jira KERNEL-311
Rebuild_History Non-Buildable kernel-5.14.0-611.13.1.el9_7
commit-author Ivan Vecera <ivecera@redhat.com>
commit f3426ac
Empty-Commit: Cherry-Pick Conflicts during history rebuild.
Will be included in final tarball splat. Ref for failed cherry-pick at:
ciq/ciq_backports/kernel-5.14.0-611.13.1.el9_7/f3426ac5.failed

Newer firmware bundles contain a flash utility whose size exceeds
the currently allowed limit. Increase the maximum allowed size
to accommodate the newer utility version.

Without this patch:
 # devlink dev flash i2c/1-0070 file fw_nosplit_v3.hex
 Failed to load firmware
 Flashing failed
 Error: zl3073x: FW load failed: [utility] component is too big (11000 bytes)

Fixes: ca01740 ("dpll: zl3073x: Add firmware loading functionality")
	Suggested-by: Prathosh Satish <Prathosh.Satish@microchip.com>
	Signed-off-by: Ivan Vecera <ivecera@redhat.com>
	Reviewed-by: Vadim Fedorenko <vadim.fedorenko@linux.dev>
Link: https://patch.msgid.link/20251008141418.841053-1-ivecera@redhat.com
	Signed-off-by: Paolo Abeni <pabeni@redhat.com>

(cherry picked from commit f3426ac)
	Signed-off-by: Jonathan Maple <jmaple@ciq.com>

# Conflicts:
#	drivers/dpll/zl3073x/fw.c
jira KERNEL-311
Rebuild_History Non-Buildable kernel-5.14.0-611.13.1.el9_7
commit-author Ivan Vecera <ivecera@redhat.com>
commit 40c17a0
Empty-Commit: Cherry-Pick Conflicts during history rebuild.
Will be included in final tarball splat. Ref for failed cherry-pick at:
ciq/ciq_backports/kernel-5.14.0-611.13.1.el9_7/40c17a02.failed

Currently, the signal format of an associated output is not considered
during output pin registration. As a result, the driver registers output
pins that are disabled by the signal format configuration.

Fix this by calling zl3073x_output_pin_is_enabled() to check whether
a given output pin should be registered or not.

Fixes: 75a71ec ("dpll: zl3073x: Register DPLL devices and pins")
	Signed-off-by: Ivan Vecera <ivecera@redhat.com>
Link: https://patch.msgid.link/20251027140912.233152-1-ivecera@redhat.com
	Signed-off-by: Jakub Kicinski <kuba@kernel.org>
(cherry picked from commit 40c17a0)
	Signed-off-by: Jonathan Maple <jmaple@ciq.com>

# Conflicts:
#	drivers/dpll/zl3073x/dpll.c
jira KERNEL-311
Rebuild_History Non-Buildable kernel-5.14.0-611.13.1.el9_7
commit-author Kamal Heib <kheib@redhat.com>
commit af82e85

Add a helper to validate the VF ID and use it in the VF ndo ops to
prevent accessing out-of-range entries.

Without this check, users can run commands such as:

 # ip link show dev enp135s0
 2: enp135s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000
    link/ether 00:00:00:01:01:00 brd ff:ff:ff:ff:ff:ff
    vf 0     link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff, spoof checking on, link-state enable, trust off
    vf 1     link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff, spoof checking on, link-state enable, trust off
 # ip link set dev enp135s0 vf 4 mac 00:00:00:00:00:14
 # echo $?
 0

even though VF 4 does not exist, which results in silent success instead
of returning an error.

Fixes: 8a241ef ("octeon_ep: add ndo ops for VFs in PF driver")
	Signed-off-by: Kamal Heib <kheib@redhat.com>
	Reviewed-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
	Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/20250911223610.1803144-1-kheib@redhat.com
	Signed-off-by: Jakub Kicinski <kuba@kernel.org>
(cherry picked from commit af82e85)
	Signed-off-by: Jonathan Maple <jmaple@ciq.com>
jira KERNEL-311
cve CVE-2025-39979
Rebuild_History Non-Buildable kernel-5.14.0-611.13.1.el9_7
commit-author Moshe Shemesh <moshe@nvidia.com>
commit 6043819

Fix a kernel trace [1] caused by releasing an HWS action of a local flow
counter in mlx5_cmd_hws_delete_fte(), where the HWS action refcount and
mutex were not initialized and the counter struct could already be freed
when deleting the rule.

Fix it by adding the missing initializations and adding refcount for the
local flow counter struct.

[1] Kernel log:
 Call Trace:
  <TASK>
  dump_stack_lvl+0x34/0x48
  mlx5_fs_put_hws_action.part.0.cold+0x21/0x94 [mlx5_core]
  mlx5_fc_put_hws_action+0x96/0xad [mlx5_core]
  mlx5_fs_destroy_fs_actions+0x8b/0x152 [mlx5_core]
  mlx5_cmd_hws_delete_fte+0x5a/0xa0 [mlx5_core]
  del_hw_fte+0x1ce/0x260 [mlx5_core]
  mlx5_del_flow_rules+0x12d/0x240 [mlx5_core]
  ? ttwu_queue_wakelist+0xf4/0x110
  mlx5_ib_destroy_flow+0x103/0x1b0 [mlx5_ib]
  uverbs_free_flow+0x20/0x50 [ib_uverbs]
  destroy_hw_idr_uobject+0x1b/0x50 [ib_uverbs]
  uverbs_destroy_uobject+0x34/0x1a0 [ib_uverbs]
  uobj_destroy+0x3c/0x80 [ib_uverbs]
  ib_uverbs_run_method+0x23e/0x360 [ib_uverbs]
  ? uverbs_finalize_object+0x60/0x60 [ib_uverbs]
  ib_uverbs_cmd_verbs+0x14f/0x2c0 [ib_uverbs]
  ? do_tty_write+0x1a9/0x270
  ? file_tty_write.constprop.0+0x98/0xc0
  ? new_sync_write+0xfc/0x190
  ib_uverbs_ioctl+0xd7/0x160 [ib_uverbs]
  __x64_sys_ioctl+0x87/0xc0
  do_syscall_64+0x59/0x90

Fixes: b581f42 ("net/mlx5: fs, manage flow counters HWS action sharing by refcount")
	Signed-off-by: Moshe Shemesh <moshe@nvidia.com>
	Reviewed-by: Yevgeny Kliteynik <kliteyn@nvidia.com>
	Reviewed-by: Mark Bloch <mbloch@nvidia.com>
	Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
Link: https://patch.msgid.link/1758525094-816583-2-git-send-email-tariqt@nvidia.com
	Signed-off-by: Jakub Kicinski <kuba@kernel.org>
(cherry picked from commit 6043819)
	Signed-off-by: Jonathan Maple <jmaple@ciq.com>
jira KERNEL-311
cve CVE-2025-39925
Rebuild_History Non-Buildable kernel-5.14.0-611.13.1.el9_7
commit-author Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
commit 7fcbe5b

syzbot is reporting

  unregister_netdevice: waiting for vcan0 to become free. Usage count = 2

problem, for j1939 protocol did not have NETDEV_UNREGISTER notification
handler for undoing changes made by j1939_sk_bind().

Commit 25fe97c ("can: j1939: move j1939_priv_put() into sk_destruct
callback") expects that a call to j1939_priv_put() can be unconditionally
delayed until j1939_sk_sock_destruct() is called. But we need to call
j1939_priv_put() against an extra ref held by j1939_sk_bind() call
(as a part of undoing changes made by j1939_sk_bind()) as soon as
NETDEV_UNREGISTER notification fires (i.e. before j1939_sk_sock_destruct()
is called via j1939_sk_release()). Otherwise, the extra ref on "struct
j1939_priv" held by j1939_sk_bind() call prevents "struct net_device" from
dropping the usage count to 1; making it impossible for
unregister_netdevice() to continue.

	Reported-by: syzbot <syzbot+881d65229ca4f9ae8c84@syzkaller.appspotmail.com>
Closes: https://syzkaller.appspot.com/bug?extid=881d65229ca4f9ae8c84
	Tested-by: syzbot <syzbot+881d65229ca4f9ae8c84@syzkaller.appspotmail.com>
Fixes: 9d71dd0 ("can: add support of SAE J1939 protocol")
Fixes: 25fe97c ("can: j1939: move j1939_priv_put() into sk_destruct callback")
	Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
	Tested-by: Oleksij Rempel <o.rempel@pengutronix.de>
	Acked-by: Oleksij Rempel <o.rempel@pengutronix.de>
Link: https://patch.msgid.link/ac9db9a4-6c30-416e-8b94-96e6559d55b2@I-love.SAKURA.ne.jp
[mkl: remove space in front of label]
	Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
(cherry picked from commit 7fcbe5b)
	Signed-off-by: Jonathan Maple <jmaple@ciq.com>
jira KERNEL-311
cve CVE-2025-39925
Rebuild_History Non-Buildable kernel-5.14.0-611.13.1.el9_7
commit-author Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
commit 93a27b5

Currently NETDEV_UNREGISTER event handler is not calling
j1939_cancel_active_session() and j1939_sk_queue_drop_all().
This will result in these calls being skipped when j1939_sk_release() is
called. And I guess that the reason syzbot is still reporting

  unregister_netdevice: waiting for vcan0 to become free. Usage count = 2

is caused by lack of these calls.

Calling j1939_cancel_active_session(priv, sk) from j1939_sk_release() can
be covered by calling j1939_cancel_active_session(priv, NULL) from
j1939_netdev_notify().

Calling j1939_sk_queue_drop_all() from j1939_sk_release() can be covered
by calling j1939_sk_netdev_event_netdown() from j1939_netdev_notify().

Therefore, we can reuse j1939_cancel_active_session(priv, NULL) and
j1939_sk_netdev_event_netdown(priv) for NETDEV_UNREGISTER event handler.

Fixes: 7fcbe5b ("can: j1939: implement NETDEV_UNREGISTER notification handler")
	Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
	Tested-by: Oleksij Rempel <o.rempel@pengutronix.de>
	Acked-by: Oleksij Rempel <o.rempel@pengutronix.de>
Link: https://patch.msgid.link/3ad3c7f8-5a74-4b07-a193-cb0725823558@I-love.SAKURA.ne.jp
	Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
(cherry picked from commit 93a27b5)
	Signed-off-by: Jonathan Maple <jmaple@ciq.com>
Rebuild_History BUILDABLE
Rebuilding Kernel from rpm changelog with Fuzz Limit: 87.50%
Number of commits in upstream range v5.14~1..kernel-mainline: 337791
Number of commits in rpm: 38
Number of commits matched with upstream: 32 (84.21%)
Number of commits in upstream but not in rpm: 337759
Number of commits NOT found in upstream: 6 (15.79%)

Rebuilding Kernel on Branch rocky9_7_rebuild_kernel-5.14.0-611.13.1.el9_7 for kernel-5.14.0-611.13.1.el9_7
Clean Cherry Picks: 7 (21.88%)
Empty Cherry Picks: 25 (78.12%)
_______________________________

Full Details Located here:
ciq/ciq_backports/kernel-5.14.0-611.13.1.el9_7/rebuild.details.txt

Includes:
* git commit header above
* Empty Commits with upstream SHA
* RPM ChangeLog Entries that could not be matched

Individual Empty Commit failures contained in the same containing directory.
The git message for empty commits will have the path for the failed commit.
File names are the first 8 characters of the upstream SHA
@PlaidCat PlaidCat requested a review from a team December 11, 2025 18:31
@PlaidCat PlaidCat self-assigned this Dec 11, 2025
Starting 2025.06.26 some of the actions required efltools to have devel
enabled.
Copy link
Collaborator

@bmastbergen bmastbergen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🥌

@bmastbergen bmastbergen requested a review from a team December 11, 2025 19:12
Copy link

@jdieter jdieter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚢

@PlaidCat PlaidCat merged commit 091bcbc into rocky9_7 Dec 12, 2025
4 checks passed
@PlaidCat PlaidCat deleted the rocky9_7_rebuild branch December 12, 2025 17:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

5 participants