Package: src:linux
Version: 5.10.46-2
Severity: normal
Tags: patch


Dear maintainer,


With the current Bullseye armhf Linux kernel, the PTP Hardware Clock is not 
available on the network interface of an i.MX6 SoC managed by the driver 'fec' 
(CONFIG_FEC).
This driver is currently built-in and the Ethernet interface works properly.

$ ethtool -i eth0
driver: fec
version: 5.10.0-8-armmp
firmware-version:
expansion-rom-version:
bus-info: eth0
supports-statistics: yes
supports-test: no
supports-eeprom-access: no
supports-register-dump: yes
supports-priv-flags: no

$ ethtool -T eth0
Time stamping parameters for eth0:
Capabilities:
        hardware-transmit
        software-transmit
        hardware-receive
        software-receive
        software-system-clock
        hardware-raw-clock
PTP Hardware Clock: none
Hardware Transmit Timestamp Modes:
        off
        on
Hardware Receive Filter Modes:
        none
        all

$ dmesg | fgrep eth0
[   23.580932] fec 2188000.ethernet eth0: Link is Up - 1Gbps/Full - flow 
control rx/tx
[   23.581001] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready




The problem is that the driver 'ptp' (CONFIG_PTP_1588_CLOCK) is built as a 
module. As a result, the call to function ptp_clock_register() (in file 
drivers/net/ethernet/freescale/fec_ptp.c, line 631) effectively uses the stub 
version defined at include/linux/ptp_clock_kernel.h:277.


One way to solve this problem should be to also build the driver 'fec' as a 
module.

Expected result (obtained after applying the attached patch):
$ ethtool -T eth0
Time stamping parameters for eth0:
Capabilities:
        hardware-transmit
        software-transmit
        hardware-receive
        software-receive
        software-system-clock
        hardware-raw-clock
PTP Hardware Clock: 0
Hardware Transmit Timestamp Modes:
        off
        on
Hardware Receive Filter Modes:
        none
        all

$ dmesg | fgrep eth0
[    6.570275] fec 2188000.ethernet eth0: registered PHC device 0
[   24.988653] fec 2188000.ethernet eth0: Link is Up - 1Gbps/Full - flow 
control rx/tx
[   24.988720] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready



If you do not see a possible regression, could it be possible to have this 
change integrated in the official package?


Thank you in advance.
Best regards.

Cédric Delmas



-- Package-specific info:
** Version:
Linux version 5.10.0-8-armmp (debian-ker...@lists.debian.org) (gcc-10 (Debian 
10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2) #1 SMP 
Debian 5.10.46-2 (2021-07-20)

** Command line:
  console=ttymxc0,115200 quiet

** Tainted: WCE (9728)
 * kernel issued warning
 * staging driver was loaded
 * unsigned module was loaded

** Kernel log:
[   12.684805] systemd[1]: Finished Load Kernel Module configfs.
[   12.687424] systemd[1]:modprobe@drm.service: Succeeded.
[   12.691377] systemd[1]: Finished Load Kernel Module drm.
[   12.703809] systemd[1]:modprobe@fuse.service: Succeeded.
[   12.706144] systemd[1]: Finished Load Kernel Module fuse.
[   12.709347] systemd[1]: Finished Load Kernel Modules.
[   12.716102] systemd[1]: Finished Remount Root and Kernel File Systems.
[   12.726265] systemd[1]: Mounting FUSE Control File System...
[   12.737173] systemd[1]: Mounting Kernel Configuration File System...
[   12.747882] systemd[1]: Condition check resulted in Rebuild Hardware 
Database being skipped.
[   12.748797] systemd[1]: Condition check resulted in Platform Persistent 
Storage Archival being skipped.
[   12.763249] systemd[1]: Starting Load/Save Random Seed...
[   12.781066] systemd[1]: Starting Apply Kernel Variables...
[   12.807354] systemd[1]: Starting Create System Users...
[   12.832250] systemd[1]: Mounted FUSE Control File System.
[   12.833534] systemd[1]: Mounted Kernel Configuration File System.
[   13.265966] systemd[1]: Started Journal Service.
[   13.435605] systemd-journald[195]: Received client request to flush runtime 
journal.
[   13.479320] random: crng init done
[   13.479337] random: 7 urandom warning(s) missed due to ratelimiting
[   15.386473] Registered IR keymap rc-empty
[   15.386638] rc rc0: gpio_ir_recv as /devices/platform/ir-receiver/rc/rc0
[   15.389515] rc rc0: lirc_dev: driver gpio_ir_recv registered at minor = 0, 
raw IR receiver, no transmitter
[   15.389783] input: gpio_ir_recv as 
/devices/platform/ir-receiver/rc/rc0/input0
[   15.442505] imx-ipuv3 2400000.ipu: IPUv3H probed
[   15.587588] imx_media_common: module is from the staging directory, the 
quality is unknown, you have been warned.
[   15.609741] imx6_media: module is from the staging directory, the quality is 
unknown, you have been warned.
[   15.748158] etnaviv etnaviv: bound 130000.gpu (ops gpu_ops [etnaviv])
[   15.752573] etnaviv etnaviv: bound 134000.gpu (ops gpu_ops [etnaviv])
[   15.752600] etnaviv-gpu 130000.gpu: model: GC880, revision: 5106
[   15.760781] etnaviv-gpu 134000.gpu: model: GC320, revision: 5007
[   15.764480] [drm] Initialized etnaviv 1.3.0 20151214 for etnaviv on minor 0
[   15.783757] imx-drm display-subsystem: bound imx-ipuv3-crtc.2 (ops 
imx_drm_exit [imxdrm])
[   15.783929] imx-drm display-subsystem: bound imx-ipuv3-crtc.3 (ops 
imx_drm_exit [imxdrm])
[   15.784246] dwhdmi-imx 120000.hdmi: Detected HDMI TX controller v1.31a with 
HDCP (DWC HDMI 3D TX PHY)
[   15.805560] imx-drm display-subsystem: bound 120000.hdmi (ops 
dw_hdmi_imx_ops [dw_hdmi_imx])
[   15.806375] [drm] Initialized imx-drm 1.0.0 20120507 for display-subsystem 
on minor 1
[   15.806484] imx-drm display-subsystem: [drm] Cannot find any crtc or sizes
[   15.808005] imx-drm display-subsystem: [drm] Cannot find any crtc or sizes
[   15.981302] CAN device driver interface
[   15.991170] imx6dl-pinctrl 20e0000.pinctrl: pin MX6DL_PAD_SD3_CLK already 
requested by 2198000.mmc; cannot claim for 2090000.flexcan
[   16.003355] imx6dl-pinctrl 20e0000.pinctrl: pin-195 (2090000.flexcan) status 
-22
[   16.010850] imx6dl-pinctrl 20e0000.pinctrl: could not request pin 195 
(MX6DL_PAD_SD3_CLK) from group hummingboard-flexcan1  on device 20e0000.pinctrl
[   16.024345] flexcan 2090000.flexcan: Error applying setting, reverse things 
back
[   16.155890] fsl-ssi-dai 2028000.ssi: No cache defaults, reading back from HW
[   16.261964] flexcan: probe of 2090000.flexcan failed with error -22
[   16.323649] coda 2040000.vpu: firmware: direct-loading firmware 
vpu_fw_imx6d.bin
[   16.353973] coda 2040000.vpu: Firmware code revision: 570363
[   16.353989] coda 2040000.vpu: Initialized CODA960.
[   16.353999] coda 2040000.vpu: Firmware version: 3.1.1
[   16.354334] coda 2040000.vpu: encoder registered as video0
[   16.354557] coda 2040000.vpu: decoder registered as video1
[   16.354789] coda 2040000.vpu: encoder registered as video2
[   16.354986] coda 2040000.vpu: decoder registered as video3
[   16.959735] imx_thermal 20c8000.anatop:tempmon: Commercial CPU temperature 
grade - max:95C critical:90C passive:85C
[   16.970970] sgtl5000 0-000a: Error reading chip id -6
[   17.522286] imx6_media_csi: module is from the staging directory, the 
quality is unknown, you have been warned.
[   17.523710] imx6_media_csi: module is from the staging directory, the 
quality is unknown, you have been warned.
[   17.542197] ipu1_csi0: Registered ipu1_csi0 capture as /dev/video4
[   17.546383] ipu1_ic_prpenc: Registered ipu1_ic_prpenc capture as /dev/video5
[   17.547060] ipu1_ic_prpvf: Registered ipu1_ic_prpvf capture as /dev/video6
[   17.554418] ipu1_csi1: Registered ipu1_csi1 capture as /dev/video7
[   17.573048] imx-media: Registered ipu_ic_pp csc/scaler as /dev/video8
[   17.673613] alg: No test for fips(ansi_cprng) (fips_ansi_cprng)
[   18.360671] cfg80211: Loading compiled-in X.509 certificates for regulatory 
database
[   18.366215] cfg80211: Loaded X.509 cert 'b...@debian.org: 
577e021cb980e0e820821ba7b54b4961b8b4fadf'
[   18.370467] cfg80211: Loaded X.509 cert 'romain.per...@gmail.com: 
3abbc6ec146e09d1b6016ab9d6cf71dd233f0328'
[   18.373563] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[   18.552886] platform regulatory.0: firmware: direct-loading firmware 
regulatory.db
[   18.571750] Bluetooth: Core ver 2.22
[   18.571895] NET: Registered protocol family 31
[   18.571905] Bluetooth: HCI device and connection manager initialized
[   18.571934] Bluetooth: HCI socket layer initialized
[   18.571950] Bluetooth: L2CAP socket layer initialized
[   18.571996] Bluetooth: SCO socket layer initialized
[   18.608800] platform regulatory.0: firmware: direct-loading firmware 
regulatory.db.p7s
[   18.852681] Bluetooth: HCI UART driver ver 2.3
[   18.852695] Bluetooth: HCI UART protocol H4 registered
[   18.855393] Bluetooth: HCI UART protocol LL registered
[   18.855408] Bluetooth: HCI UART protocol ATH3K registered
[   18.855505] Bluetooth: HCI UART protocol Three-wire (H5) registered
[   18.855775] Bluetooth: HCI UART protocol Intel registered
[   18.856068] Bluetooth: HCI UART protocol Broadcom registered
[   18.856143] Bluetooth: HCI UART protocol QCA registered
[   18.856152] Bluetooth: HCI UART protocol AG6XX registered
[   18.868940] Bluetooth: HCI UART protocol Marvell registered
[   18.972075] EXT4-fs (mmcblk1p1): mounting ext3 file system using the ext4 
subsystem
[   18.991516] hci-ti serial0-0: firmware: direct-loading firmware 
ti-connectivity/TIInit_11.8.32.bts
[   18.991542] Bluetooth: hci0: change remote baud rate command in firmware
[   19.011873] EXT4-fs (mmcblk1p1): mounted filesystem with ordered data mode. 
Opts: (null)
[   19.011918] ext3 filesystem being mounted at /boot supports timestamps until 
2038 (0x7fffffff)
[   19.202622] wl18xx_driver wl18xx.3.auto: firmware: direct-loading firmware 
ti-connectivity/wl1271-nvs.bin
[   19.204095] wl18xx_driver wl18xx.3.auto: firmware: direct-loading firmware 
ti-connectivity/wl18xx-conf.bin
[   19.987916] wlcore: wl18xx HW: 183x or 180x, PG 2.2 (ROM 0x11)
[   19.994159] wlcore: WARNING Detected unconfigured mac address in nvs, derive 
from fuse instead.
[   19.994176] wlcore: WARNING This default nvs file can be removed from the 
file system
[   20.003971] wlcore: loaded
[   20.525702] Qualcomm Atheros AR8035 2188000.ethernet-1:00: attached PHY 
driver [Qualcomm Atheros AR8035] (mii_bus:phy_addr=2188000.ethernet-1:00, 
irq=POLL)
[   23.580932] fec 2188000.ethernet eth0: Link is Up - 1Gbps/Full - flow 
control rx/tx
[   23.581001] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready

** Model information
Hardware        : Freescale i.MX6 Quad/DualLite (Device Tree)
Revision        : 0000
Device Tree model: SolidRun HummingBoard Solo/DualLite (1.5som+emmc)

** Loaded modules:
ext4(E)
wl18xx(E)
hci_uart(E)
wlcore(E)
btqca(E)
btrtl(E)
mbcache(E)
btbcm(E)
jbd2(E)
mac80211(E)
btintel(E)
bluetooth(E)
cfg80211(E)
libarc4(E)
jitterentropy_rng(E)
ctr(E)
dw_hdmi_ahb_audio(E)
dw_hdmi_cec(E)
drbg(E)
aes_arm(E)
imx6_media_csi(CE)
aes_generic(E)
v4l2_fwnode(E)
evdev(E)
ansi_cprng(E)
ecdh_generic(E)
rfkill(E)
ecc(E)
crc16(E)
libaes(E)
snd_soc_imx_audmux(E)
snd_soc_sgtl5000(E)
wlcore_sdio(E)
nvmem_imx_ocotp(E)
mux_mmio(E)
video_mux(E)
mux_core(E)
imx_thermal(E)
imx2_wdt(E)
snd_soc_fsl_spdif(E)
snd_soc_fsl_ssi(E)
coda_vpu(E)
imx_pcm_dma(E)
imx_pcm_fiq(E)
v4l2_jpeg(E)
imx_vdoa(E)
videobuf2_vmalloc(E)
flexcan(E)
pwm_imx27(E)
can_dev(E)
snd_soc_simple_card(E)
snd_soc_imx_spdif(E)
snd_soc_simple_card_utils(E)
dw_hdmi_imx(E)
dw_hdmi(E)
snd_soc_core(E)
snd_pcm_dmaengine(E)
cec(E)
snd_pcm(E)
etnaviv(E)
snd_timer(E)
imx6_media(CE)
gpu_sched(E)
snd(E)
soundcore(E)
imx_media_common(CE)
videobuf2_dma_contig(E)
v4l2_mem2mem(E)
videobuf2_memops(E)
videobuf2_v4l2(E)
imxdrm(E)
videobuf2_common(E)
imx_ipu_v3(E)
drm_kms_helper(E)
gpio_ir_recv(E)
rc_core(E)
imx6q_cpufreq(E)
fuse(E)
drm(E)
configfs(E)
ip_tables(E)
x_tables(E)
autofs4(E)
f2fs(E)
crc32_generic(E)
btrfs(E)
blake2b_generic(E)
xor(E)
xor_neon(E)
raid6_pq(E)
libcrc32c(E)
crc32c_generic(E)
ci_hdrc_imx(E)
ci_hdrc(E)
ulpi(E)
roles(E)
ehci_hcd(E)
udc_core(E)
phy_generic(E)
usbcore(E)
usbmisc_imx(E)
i2c_imx(E)
sdhci_esdhc_imx(E)
sdhci_pltfm(E)
cqhci(E)
sdhci(E)
at803x(E)
phy_mxs_usb(E)
anatop_regulator(E)
gpio_mxc(E)

** Network interface configuration:
*** /etc/network/interfaces:
source/etc/network/interfaces.d/*

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet dhcp
iface eth0 inet6 auto
  accept_ra 0
  dhcp 0

** Network status:
*** IP interfaces and addresses:
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group 
default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP 
group default qlen 1000
    link/ether 46:54:31:a0:d1:f9 brd ff:ff:ff:ff:ff:ff
    inet 192.168.0.99/24 brd 192.168.0.255 scope global dynamic eth0
       valid_lft 40398sec preferred_lft 40398sec
    inet6 fe80::4454:31ff:fea0:d1f9/64 scope link
       valid_lft forever preferred_lft forever
3: wlan0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default 
qlen 1000
    link/ether 50:33:8b:59:ce:4f brd ff:ff:ff:ff:ff:ff

*** Device statistics:
Inter-|   Receive                                                |  Transmit
 face |bytes    packets errs drop fifo frame compressed multicast|bytes    
packets errs drop fifo colls carrier compressed
    lo:    1020      12    0    0    0     0          0         0     1020      
12    0    0    0     0       0          0
  eth0:  491517    5690    0    0    0     0          0         0   735944    
4626    0    0    0     0       0          0
 wlan0:       0       0    0    0    0     0          0         0        0      
 0    0    0    0     0       0          0

*** Protocol statistics:
Ip:
    Forwarding: 2
    5544 total packets received
    2 with invalid addresses
    0 forwarded
    0 incoming packets discarded
    5542 incoming packets delivered
    4484 requests sent out
Icmp:
    3 ICMP messages received
    0 input ICMP message failed
    ICMP input histogram:
        destination unreachable: 3
    3 ICMP messages sent
    0 ICMP messages failed
    ICMP output histogram:
        destination unreachable: 3
IcmpMsg:
        InType3: 3
        OutType3: 3
Tcp:
    0 active connection openings
    1 passive connection openings
    0 failed connection attempts
    0 connection resets received
    1 connections established
    5487 segments received
    4435 segments sent out
    1 segments retransmitted
    0 bad segments received
    0 resets sent
Udp:
    49 packets received
    3 packets to unknown port received
    0 packet receive errors
    52 packets sent
    0 receive buffer errors
    0 send buffer errors
UdpLite:
TcpExt:
    63 delayed acks sent
    1164 packet headers predicted
    13 acknowledgments not containing data payload received
    3563 predicted acknowledgments
    TCPLossProbes: 1
    TCPBacklogCoalesce: 18
    TCPDSACKRecv: 1
    TCPRcvCoalesce: 6
    TCPAutoCorking: 5
    TCPOrigDataSent: 4100
    TCPHystartTrainDetect: 1
    TCPHystartTrainCwnd: 20
    TCPDelivered: 4101
    TCPDSACKRecvSegs: 1
IpExt:
    InOctets: 369279
    OutOctets: 664444
    InNoECTPkts: 5544


** PCI devices:
00:00.0 PCI bridge [0604]: Synopsys, Inc. DWC_usb3 / PCIe bridge [16c3:abcd] 
(rev 01) (prog-if 00 [Normal decode])
        Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr+ 
Stepping- SERR+ FastB2B- DisINTx+
        Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- 
<MAbort- >SERR- <PERR- INTx-
        Latency: 0, Cache Line Size: 64 bytes
        Interrupt: pin A routed to IRQ 306
        Region 0: Memory at 01000000 (32-bit, non-prefetchable) [size=1M]
        Bus: primary=00, secondary=01, subordinate=ff, sec-latency=0
        I/O behind bridge: [disabled]
        Memory behind bridge: [disabled]
        Prefetchable memory behind bridge: [disabled]
        Secondary status: 66MHz- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- 
<MAbort- <SERR- <PERR-
        Expansion ROM at 01100000 [virtual] [disabled] [size=64K]
        BridgeCtl: Parity+ SERR+ NoISA- VGA- VGA16- MAbort- >Reset- FastB2B-
                PriDiscTmr- SecDiscTmr- DiscTmrStat- DiscTmrSERREn-
        Capabilities: <access denied>
        Kernel driver in use: pcieport


** USB devices:
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub


-- System Information:
Debian Release: 11.0
  APT prefers testing-security
  APT policy: (500, 'testing-security'), (500, 'testing')
Architecture: armhf (armv7l)

Kernel: Linux 5.10.0-8-armmp (SMP w/2 CPU threads)
Kernel taint flags: TAINT_WARN, TAINT_CRAP, TAINT_UNSIGNED_MODULE
Locale: LANG=C.UTF-8, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages linux-image-5.10.0-8-armmp depends on:
ii  initramfs-tools [linux-initramfs-tool]  0.140
ii  kmod                                    28-1
ii  linux-base                              4.6

Versions of packages linux-image-5.10.0-8-armmp recommends:
pn  apparmor             <none>
pn  firmware-linux-free  <none>

Versions of packages linux-image-5.10.0-8-armmp suggests:
pn  debian-kernel-handbook  <none>
pn  linux-doc-5.10          <none>

Versions of packages linux-image-5.10.0-8-armmp is related to:
pn  firmware-amd-graphics     <none>
pn  firmware-atheros          <none>
pn  firmware-bnx2             <none>
pn  firmware-bnx2x            <none>
pn  firmware-brcm80211        <none>
pn  firmware-cavium           <none>
pn  firmware-intel-sound      <none>
pn  firmware-intelwimax       <none>
pn  firmware-ipw2x00          <none>
pn  firmware-ivtv             <none>
pn  firmware-iwlwifi          <none>
pn  firmware-libertas         <none>
pn  firmware-linux-nonfree    <none>
pn  firmware-misc-nonfree     <none>
pn  firmware-myricom          <none>
pn  firmware-netxen           <none>
pn  firmware-qlogic           <none>
pn  firmware-realtek          <none>
pn  firmware-samsung          <none>
pn  firmware-siano            <none>
ii  firmware-ti-connectivity  20210315-2
pn  xen-hypervisor            <none>

-- no debconf information

diff --git a/debian/config/armhf/config b/debian/config/armhf/config
index c8f25acb6..a21511122 100644
--- a/debian/config/armhf/config
+++ b/debian/config/armhf/config
@@ -903,6 +903,12 @@ CONFIG_SUNDANCE=m
 ##
 CONFIG_FTGMAC100=m
 
+##
+## file: drivers/net/ethernet/freescale/Kconfig
+##
+CONFIG_NET_VENDOR_FREESCALE=y
+CONFIG_FEC=m
+
 ##
 ## file: drivers/net/ethernet/intel/Kconfig
 ##

Reply via email to