i2c-mlxbf.c: Sync up driver with upstreaming

Bug #1991551 reported by Asmaa Mnebhi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux-bluefield (Ubuntu)
Invalid
Undecided
Unassigned
Focal
Fix Released
Medium
Asmaa Mnebhi
Jammy
Fix Committed
Medium
Asmaa Mnebhi

Bug Description

SRU Justification:

[Impact]

Several i2c-mlxbf.c patches have been upstreamed recently and are in linux-next at the moment. So revert all changes in both Focal (5.4) and Jammy (5.15) and cherry-pick all changes from linux-next master.

IMPORTANT NOTE: The new linux i2c support for BF3 also REQUIRES upgrading the UEFI firmware version. For BF1 and BF2 however, this driver should be backward compatible with older UEFI versions.

[Fix]

* There is a total of 17 commits: 8 reverts, 8 cherry-picks from linux-next and one internal "UBUNTU: SAUCE:" to ad the driver version. Following is the list of commits cherry-picked.

* i2c: mlxbf: incorrect base address passed during io write
From <https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=2a5be6d1340c0fefcee8a6489cff7fd88a0d5b85>

* i2c: mlxbf: prevent stack overflow in mlxbf_i2c_smbus_start_transaction()
From <https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=de24aceb07d426b6f1c59f33889d6a964770547b>

* i2c: mlxbf: remove IRQF_ONESHOT
From <https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=92be2c122e495f0249090c0048f4fd05fe1efa9e>

* i2c: mlxbf: Fix frequency calculation
From <https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=37f071ec327b04c83d47637c5e5c2199b39899ca>

* i2c: mlxbf: support lock mechanism
From <https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=86067ccfa1424a26491542d6f6d7546d40b61a10>

* i2c: mlxbf: add multi slave functionality
From <https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=bdc4af281b70b7fe2881fd08f1aa1b15f2b6adf0>

* i2c: mlxbf: support BlueField-3 SoC
From <https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=19e13e1330c63506452eed80f473f344e6779b94>

* i2c: mlxbf: remove device tree support
From <https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=be18c5ede25da39a0eda541f6de3620a30cf731f>

* Also add the i2c driver version to keep track of the changes internally.

[Test Case]

* Check that the i2c driver loads without errors on BF1 and BF2 (dmesg, and check i2c1 sysfs is created)
* Check that the i2c module can be removed and reloaded without errors.
* Check that IPMB services work successfully on systems with BMC. This is the best way to test the i2c driver. Run ipmitool command from the BF: ipmitool mc info
* Run ipmitool from the BMC as well: ipmitool -I ipmb mc info
* This driver should be backward compatible
* Make sure this driver is backward compatible with older UEFI version (only applicable for BF1 and BF2)
* Make sure this driver works for BF1, BF2 and BF3 with the latest UEFI version.

[Regression Potential]

* The i2c driver could fail to load because the UEFI firmware hasn't been upgraded
* The i2c driver would fail to load due to a bug
* IPMB code which utilises the i2c driver fails to work (ipmitool commands)

Asmaa Mnebhi (asmaam)
description: updated
Asmaa Mnebhi (asmaam)
description: updated
Stefan Bader (smb)
Changed in linux-bluefield (Ubuntu Focal):
assignee: nobody → Asmaa Mnebhi (asmaam)
importance: Undecided → Medium
status: New → In Progress
Changed in linux-bluefield (Ubuntu Jammy):
assignee: nobody → Asmaa Mnebhi (asmaam)
importance: Undecided → Medium
status: New → In Progress
Changed in linux-bluefield (Ubuntu):
status: New → Invalid
Changed in linux-bluefield (Ubuntu Focal):
status: In Progress → Fix Committed
Changed in linux-bluefield (Ubuntu Jammy):
status: In Progress → Fix Committed
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote :

This bug is awaiting verification that the linux-bluefield/5.4.0-1050.56 kernel in -proposed solves the problem. Please test the kernel and update this bug with the results. If the problem is solved, change the tag 'verification-needed-focal' to 'verification-done-focal'. If the problem still exists, change the tag 'verification-needed-focal' to 'verification-failed-focal'.

If verification is not done by 5 working days from today, this fix will be dropped from the source code, and this bug will be closed.

See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you!

Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote :

This bug is awaiting verification that the linux-bluefield/5.15.0-1009.11 kernel in -proposed solves the problem. Please test the kernel and update this bug with the results. If the problem is solved, change the tag 'verification-needed-jammy' to 'verification-done-jammy'. If the problem still exists, change the tag 'verification-needed-jammy' to 'verification-failed-jammy'.

If verification is not done by 5 working days from today, this fix will be dropped from the source code, and this bug will be closed.

See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you!

Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (33.2 KiB)

This bug was fixed in the package linux-bluefield - 5.4.0-1050.56

---------------
linux-bluefield (5.4.0-1050.56) focal; urgency=medium

  * focal/linux-bluefield: 5.4.0-1050.56 -proposed tracker (LP: #1992038)

  * i2c-mlxbf.c: Sync up driver with upstreaming (LP: #1991551)
    - Revert "UBUNTU: SAUCE: i2c-mlxbf.c: support lock mechanism"
    - Revert "UBUNTU: SAUCE: i2c-mlxbf.c: fix wrong variable name"
    - Revert "UBUNTU: SAUCE: i2c-mlxbf.c: remove IRQF_ONESHOT flag"
    - Revert "UBUNTU: SAUCE: i2c-mlxbf.c: prevent stack overflow in
      mlxbf_i2c_smbus_start_transaction()"
    - Revert "UBUNTU: SAUCE: i2c-mlxbf.c: revert upstreaming version"
    - Revert "UBUNTU: SAUCE: Syncup i2c-mlx driver with upstreamed version"
    - Revert "UBUNTU: SAUCE: i2c-mlx.c: Fix core frequency"
    - Revert "UBUNTU: SAUCE: i2c: i2c-mlx: I2C SMBus driver for Mellanox BlueField
      SoC"
    - i2c: mlxbf: I2C SMBus driver for Mellanox BlueField SoC
    - i2c: mlxbf: Add CONFIG_ACPI to guard ACPI function call
    - i2c: mlxbf: Fix resrticted cast warning of sparse
    - i2c: mlxbf: Remove unecessary wrapper functions
    - i2c: mlxbf: Update reference clock frequency
    - i2c: mlxbf: Update author and maintainer email info
    - i2c: mlxbf: Fix the return check of devm_ioremap and ioremap
    - i2c: mlxbf: add IRQ check
    - i2c: mlxbf: incorrect base address passed during io write
    - i2c: mlxbf: prevent stack overflow in mlxbf_i2c_smbus_start_transaction()
    - i2c: mlxbf: Fix frequency calculation
    - i2c: mlxbf: remove IRQF_ONESHOT
    - i2c: mlxbf: support lock mechanism
    - i2c: mlxbf: add multi slave functionality
    - i2c: mlxbf: support BlueField-3 SoC
    - i2c: mlxbf: remove device tree support
    - SAUCE: i2c-mlxbf.c: Add driver version
    - [Config] bluefield: Fix config name for i2c-mlxbf (I2C_MELLANOX ->
      I2C_MLXBF)

  [ Ubuntu: 5.4.0-132.148 ]

  * CVE-2022-42719
    - mac80211: mlme: find auth challenge directly
    - wifi: mac80211: don't parse mbssid in assoc response
    - wifi: mac80211: fix MBSSID parsing use-after-free
  * iavf: SR-IOV VFs error with no traffic flow when MTU greater than 1500
    (LP: #1983656)
    - iavf: Fix set max MTU size with port VLAN and jumbo frames
    - i40e: Fix VF set max MTU size
  * fib_nexthop_nongw.sh from ubuntu_kernel_selftests failed on B-5.4
    (LP: #1990800)
    - SAUCE: selftests/net: skipping tests for older ip command releases
  * CVE-2022-29901
    - Revert "x86/speculation: Add RSB VM Exit protections"
    - Revert "x86/cpu: Add a steppings field to struct x86_cpu_id"
    - x86/devicetable: Move x86 specific macro out of generic code
    - x86/cpu: Add consistent CPU match macros
    - x86/cpu: Add a steppings field to struct x86_cpu_id
    - x86/kvm/vmx: Make noinstr clean
    - x86/cpufeatures: Move RETPOLINE flags to word 11
    - x86/bugs: Report AMD retbleed vulnerability
    - x86/bugs: Add AMD retbleed= boot parameter
    - x86/bugs: Keep a per-CPU IA32_SPEC_CTRL value
    - x86/entry: Remove skip_r11rcx
    - x86/entry: Add kernel IBRS implementation
    - x86/bugs: Optimize SPEC_CTRL MSR writes
    - x86/speculation: Add spectre_v2=ibrs option to support Kernel ...

Changed in linux-bluefield (Ubuntu Focal):
status: Fix Committed → Fix Released
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote :

This bug is awaiting verification that the linux-bluefield/5.15.0-1010.12 kernel in -proposed solves the problem. Please test the kernel and update this bug with the results. If the problem is solved, change the tag 'verification-needed-jammy' to 'verification-done-jammy'. If the problem still exists, change the tag 'verification-needed-jammy' to 'verification-failed-jammy'.

If verification is not done by 5 working days from today, this fix will be dropped from the source code, and this bug will be closed.

See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you!

tags: added: kernel-spammed-jammy-linux-bluefield verification-needed-jammy
Tien Do (tienmdo)
tags: added: verification-done-jammy
removed: kernel-spammed-jammy-linux-bluefield verification-needed-jammy
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.