Add ODM driver f81604 usb-can

Bug #2045387 reported by Anthony Wong
14
This bug affects 1 person
Affects Status Importance Assigned to Milestone
HWE Next
New
Undecided
Unassigned
linux (Ubuntu)
New
Undecided
Unassigned
Jammy
Fix Released
Medium
Filippo

Bug Description

From 68b4664246d9f4d44409f344a6b67890ab88156b Mon Sep 17 00:00:00 2001
From: Filippo Copetti <email address hidden>
Date: Mon, 4 Dec 2023 14:46:08 +0100
Subject: [PATCH 3/3] Add f81604 usb-can kernel driver

https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2045387

[ Impact ]
f81604 driver needed for ODM partner

[ Test Plan ]

Install can-utils

apt install can-utils

insert the driver:
modprobe f81604

two socket can interfaces will be created, can0 and can1

connect the DB9 cable and termination provided.
Set up the two interfaces:
ip link set can1 up type can bitrate 500000
ip link set can1 up type can bitrate 500000
candump can0

In another shell run:
cansend can1 123#DEADBEEF

The first shell should report the received frame. Switch the interfaces in the last commands to test the frame flow in the other way around.

[ Where problems could occur ]
USB bus miss-behavior could cause issues to the driver.

[ Other Info ]

Revision history for this message
Filippo (filippo-copetti) wrote :
description: updated
description: updated
Revision history for this message
AceLan Kao (acelankao) wrote :

This driver conflicts with drivers/net/can/usb/f81604.c
Please try backporting drivers/net/can/usb/f81604.c to 5.4 kernel and apply the fix you need.

description: updated
Changed in linux (Ubuntu Jammy):
assignee: nobody → Filippo (filippo-copetti)
Revision history for this message
Filippo (filippo-copetti) wrote :
Revision history for this message
AceLan Kao (acelankao) wrote :

The correct way to backport this driver should be
1. check the driver SHA1 on the mainline kernel
   $ git log --oneline drivers/net/can/usb/f81604.c
   88da17436973 can: usb: f81604: add Fintek F81604 support
2. add the mainline kernel git tree to focal kernel tree
   $ git remote add linus git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
3. fetch the mainline kernel source
   $ git fetch linus
4. cherry pick the commit we want
   $ git cherry-pick -xse 88da17436973
5. fix the conflict file, Makefile, and then add it
   $ (after solved the Makefile conflict) git add -u
6. modify the commit message, add BugLink and replace "cherry picked" to "backported"
   $ git cherry-pick --continue
7. then you can generate this patch for review

Revision history for this message
Filippo (filippo-copetti) wrote :

Hi AceLan,

Thanks for the steps, just one question, do you want me to export two patches, with both the original commit and my backporting or just the last backporting?

Revision history for this message
Filippo (filippo-copetti) wrote :

Moreover, shall I add also the "Depends on UBUNTU_ODM_DRIVERS"?
There are no conflicts in the Makefile as far as I can see, the Makefile modifications are already cherrypicked.
Was your comment about any possible conflict or were you referring to a specific conflict?

Thanks,
Filippo

Revision history for this message
AceLan Kao (acelankao) wrote :

You should preserve the origin author of the driver, so you need to use cherry-pick to backport the commit. Then you can add you modification and generate another patch. So, yes, in this case you will generate 2 patches.
I encountered the Makefile conflict while cherry-picking the f81604 driver, it's fine that you didn't encounter that, maybe we just use different codebase.

Revision history for this message
Filippo (filippo-copetti) wrote :

Original patch

Revision history for this message
Filippo (filippo-copetti) wrote :

Original patch

Revision history for this message
Filippo (filippo-copetti) wrote :

Backporting

AceLan Kao (acelankao)
information type: Private → Public
Changed in linux (Ubuntu Jammy):
status: New → In Progress
tags: added: erlin oem-priority originate-from-2039779
tags: added: patch
Stefan Bader (smb)
Changed in linux (Ubuntu Jammy):
importance: Undecided → Medium
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/5.15.0-94.104 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-linux' to 'verification-done-jammy-linux'. If the problem still exists, change the tag 'verification-needed-jammy-linux' to 'verification-failed-jammy-linux'.

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-v2 verification-needed-jammy-linux
Revision history for this message
Luca Calligaris (lucacalligaris) wrote (last edit ):

Hi, test with proposed 5.15.0-94.104 kernel was successfully performed following the [ Test Plan ] described above

tags: added: verification-done-jammy-linux
removed: verification-needed-jammy-linux
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote :

This bug is awaiting verification that the linux-intel-iotg/5.15.0-1047.53 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-linux-intel-iotg' to 'verification-done-jammy-linux-intel-iotg'. If the problem still exists, change the tag 'verification-needed-jammy-linux-intel-iotg' to 'verification-failed-jammy-linux-intel-iotg'.

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-intel-iotg-v2 verification-needed-jammy-linux-intel-iotg
Revision history for this message
Luca Calligaris (lucacalligaris) wrote :

Hi, we are using the generic kernel - we recently tested the 5.15.0.94-generic. Is it the linux-intel-iotg relevant in our case?

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

This bug is awaiting verification that the linux-ibm-gt-fips/5.15.0-1052.55+fips1 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-linux-ibm-gt-fips' to 'verification-done-jammy-linux-ibm-gt-fips'. If the problem still exists, change the tag 'verification-needed-jammy-linux-ibm-gt-fips' to 'verification-failed-jammy-linux-ibm-gt-fips'.

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-ibm-gt-fips-v2 verification-needed-jammy-linux-ibm-gt-fips
Revision history for this message
Luca Calligaris (lucacalligaris) wrote :

Hi, we are using the generic kernel - we recently tested the 5.15.0.94-generic. Is it the linux-ibm-gt-fips relevant in our case?

Revision history for this message
Anthony Wong (anthonywong) wrote :

@Luca
You can ignore the message about testing linux-ibm-gt-fips.

Revision history for this message
Luca Calligaris (lucacalligaris) wrote :

@anthonywang, what about linux-intel-iotg?

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

This bug was fixed in the package linux - 5.15.0-94.104

---------------
linux (5.15.0-94.104) jammy; urgency=medium

  * jammy/linux: 5.15.0-94.104 -proposed tracker (LP: #2048777)

  * [SRU] Duplicate Device_dax ids Created and hence Probing is Failing.
    (LP: #2028158)
    - device-dax: Fix duplicate 'hmem' device registration

  * Add ODM driver f81604 usb-can (LP: #2045387)
    - can: usb: f81604: add Fintek F81604 support
    - [Config] updateconfigs for ODM drivers CONFIG_CAN_F81604

  * Add ODM driver gpio-m058ssan (LP: #2045386)
    - SAUCE: ODM: gpio: add M058SSAN gpio driver
    - [Config] updateconfigs for ODM drivers CONFIG_GPIO_M058SSAN

  * Add ODM driver rtc-pcf85263 (LP: #2045385)
    - SAUCE: ODM: rtc: add PCF85263 RTC driver
    - [Config] updateconfigs for ODM drivers CONFIG_RTC_DRV_PCF85263

  * AppArmor patch for mq-posix interface is missing in jammy (LP: #2045384)
    - SAUCE: (no-up) apparmor: reserve mediation classes
    - SAUCE: (no-up) apparmor: Add fine grained mediation of posix mqueues

  * Packaging resync (LP: #1786013)
    - [Packaging] update annotations scripts

linux (5.15.0-93.103) jammy; urgency=medium

  * jammy/linux: 5.15.0-93.103 -proposed tracker (LP: #2048330)

  * Packaging resync (LP: #1786013)
    - [Packaging] resync git-ubuntu-log
    - [Packaging] resync update-dkms-versions helper
    - [Packaging] remove helper scripts
    - [Packaging] update annotations scripts
    - debian/dkms-versions -- update from kernel-versions (main/2024.01.08)

  * Hotplugging SCSI disk in QEMU VM fails (LP: #2047382)
    - Revert "PCI: acpiphp: Reassign resources on bridge if necessary"

  * CVE-2023-6622
    - netfilter: nf_tables: bail out on mismatching dynset and set expressions

  * CVE-2024-0193
    - netfilter: nf_tables: skip set commit for deleted/destroyed sets

  * CVE-2023-6040
    - netfilter: nf_tables: Reject tables of unsupported family

  * Patches needed for AmpereOne (arm64) (LP: #2044192)
    - clocksource/arm_arch_timer: Add build-time guards for unhandled register
      accesses
    - clocksource/drivers/arm_arch_timer: Drop CNT*_TVAL read accessors
    - clocksource/drivers/arm_arch_timer: Extend write side of timer register
      accessors to u64
    - clocksource/drivers/arm_arch_timer: Move system register timer programming
      over to CVAL
    - clocksource/drivers/arm_arch_timer: Move drop _tval from erratum function
      names
    - clocksource/drivers/arm_arch_timer: Fix MMIO base address vs callback
      ordering issue
    - clocksource/drivers/arm_arch_timer: Move MMIO timer programming over to CVAL
    - clocksource/drivers/arm_arch_timer: Advertise 56bit timer to the core code
    - clocksource/drivers/arm_arch_timer: Work around broken CVAL implementations
    - clocksource/drivers/arm_arch_timer: Remove any trace of the TVAL programming
      interface
    - clocksource/drivers/arm_arch_timer: Drop unnecessary ISB on CVAL programming
    - clocksource/drivers/arm_arch_timer: Fix masking for high freq counters
    - clocksource/drivers/arch_arm_timer: Move workaround synchronisation around

  * Add quirk to disable i915 fastboot on B&R PC (LP: #2047630)
    - SAUCE: i915...

Changed in linux (Ubuntu Jammy):
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-1035.37 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-linux-bluefield' to 'verification-done-jammy-linux-bluefield'. If the problem still exists, change the tag 'verification-needed-jammy-linux-bluefield' to 'verification-failed-jammy-linux-bluefield'.

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-v2 verification-needed-jammy-linux-bluefield
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote :

This bug is awaiting verification that the linux-raspi/5.15.0-1046.49 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-linux-raspi' to 'verification-done-jammy-linux-raspi'. If the problem still exists, change the tag 'verification-needed-jammy-linux-raspi' to 'verification-failed-jammy-linux-raspi'.

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-raspi-v2 verification-needed-jammy-linux-raspi
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote :

This bug is awaiting verification that the linux-azure/5.15.0-1056.64 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-linux-azure' to 'verification-done-jammy-linux-azure'. If the problem still exists, change the tag 'verification-needed-jammy-linux-azure' to 'verification-failed-jammy-linux-azure'.

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-azure-v2 verification-needed-jammy-linux-azure
Revision history for this message
Luca Calligaris (lucacalligaris) wrote :

Hi, we are using the generic kernel. Are

linux-bluefield/5.15.0-1035.37
linux-raspi/5.15.0-1046.49
linux-azure/5.15.0-1056.64

relevant in our case?

Revision history for this message
Anthony Wong (anthonywong) wrote :

@Luca
In your case, since you're using the generic kernel, you can ignore the messages for the others.

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

This bug is awaiting verification that the linux-nvidia-tegra/5.15.0-1022.22 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-linux-nvidia-tegra' to 'verification-done-jammy-linux-nvidia-tegra'. If the problem still exists, change the tag 'verification-needed-jammy-linux-nvidia-tegra' to 'verification-failed-jammy-linux-nvidia-tegra'.

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-nvidia-tegra-v2 verification-needed-jammy-linux-nvidia-tegra
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote :

This bug is awaiting verification that the linux-xilinx-zynqmp/5.15.0-1027.31 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-linux-xilinx-zynqmp' to 'verification-done-jammy-linux-xilinx-zynqmp'. If the problem still exists, change the tag 'verification-needed-jammy-linux-xilinx-zynqmp' to 'verification-failed-jammy-linux-xilinx-zynqmp'.

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-xilinx-zynqmp-v2 verification-needed-jammy-linux-xilinx-zynqmp
Revision history for this message
Luca Calligaris (lucacalligaris) wrote :

As per previous communication, since we are using the generic kernel we will ignore this message

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

This bug is awaiting verification that the linux-azure-fips/5.15.0-1058.66+fips1 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-linux-azure-fips' to 'verification-done-jammy-linux-azure-fips'. If the problem still exists, change the tag 'verification-needed-jammy-linux-azure-fips' to 'verification-failed-jammy-linux-azure-fips'.

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-azure-fips-v2 verification-needed-jammy-linux-azure-fips
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote :

This bug is awaiting verification that the linux-mtk/5.15.0-1030.34 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-linux-mtk' to 'verification-done-jammy-linux-mtk'. If the problem still exists, change the tag 'verification-needed-jammy-linux-mtk' to 'verification-failed-jammy-linux-mtk'.

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-mtk-v2 verification-needed-jammy-linux-mtk
tags: added: verification-done-jammy-linux-intel-iotg
removed: verification-needed-jammy-linux-intel-iotg
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote :

This bug is awaiting verification that the linux-gcp-fips/5.15.0-1055.63+fips2 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-linux-gcp-fips' to 'verification-done-jammy-linux-gcp-fips'. If the problem still exists, change the tag 'verification-needed-jammy-linux-gcp-fips' to 'verification-failed-jammy-linux-gcp-fips'.

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-gcp-fips-v2 verification-needed-jammy-linux-gcp-fips
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.