[SRU][Zesty] qcom_emac is unable to get ip address with at803x phy driver.

Bug #1696143 reported by Manoj Iyer
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Fix Released
Critical
Manoj Iyer
Zesty
Fix Released
High
Unassigned

Bug Description

[Impact]
qcom_emac is unable to get ip address with at803x phy driver. Use software polling (PHY_POLL) to check for link state changes instead of relying on the EMAC's hardware polling feature. Some PHY drivers are unable to get a functioning link because the HW polling is not robust enough.

The emac interface is the onboard nic on the QDF2400 platform. A non working emac would be a cert blocker for this platform.

[Test]
Boot the netboot DI installer on QDF2400, and chose the emac interface, the install will fail because the emac interface is unable to get an IP lease. Also, on an installed system the emac driver is unable to get ip address.

[Fix]
Patch is in Dave Miller's 'net' repo: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net.git/commit/id=246096690be0742d9bb5f3456d2cb95b68f7b46d

[Regression]
The patch is to emac driver which is only available on the QDF2400 platform so there is no risk of regression to other ARM64 platforms or platforms based on other architectures. You can see detailed test results on the comments sections below.

Revision history for this message
Brad Figg (brad-figg) wrote : Missing required logs.

This bug is missing log files that will aid in diagnosing the problem. From a terminal window please run:

apport-collect 1696143

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete
Revision history for this message
Manoj Iyer (manjo) wrote :

Testing on QDF2400 ARM64 platform.

== Without the patch ==

ubuntu@ubuntu:~$ sudo ifconfig eth0 up

Jun 6 17:29:38 ubuntu kernel: [ 2362.299292] Atheros 8031 ethernet QCOM8070:00:04: attached PHY driver [Atheros 8031 ethernet] (mii_bus:phy_addr=QCOM8070:00:04, irq=-2)
Jun 6 17:29:38 ubuntu kernel: [ 2362.299360] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
Jun 6 17:29:41 ubuntu kernel: [ 2365.028452] 803x_aneg_done: SGMII link is not ok

ubuntu@ubuntu:~$ sudo dhclient -v eth0
Listening on LPF/eth0/8c:fd:f0:06:92:a5
Sending on LPF/eth0/8c:fd:f0:06:92:a5
Sending on Socket/fallback
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 3 (xid=0x75753944)
...
No DHCPOFFERS received.
No working leases in persistent database - sleeping.

ubuntu@ubuntu:~$ ifconfig eth0
eth0 Link encap:Ethernet HWaddr 8c:fd:f0:06:92:a5
          UP BROADCAST MULTICAST MTU:1500 Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
          Interrupt:40

Manoj Iyer (manjo)
description: updated
Revision history for this message
Manoj Iyer (manjo) wrote :

Testing on QDF2400 ARM64 platform.

== With the patch ==

ubuntu@ubuntu:~$ lsmod | grep -E "qcom_emac|at803x"
at803x 16384 0
qcom_emac 49152 0
ubuntu@ubuntu:~$

ubuntu@ubuntu:~$ sudo ifup eth0

Jun 6 17:47:26 ubuntu kernel: [ 176.658581] Atheros 8031 ethernet QCOM8070:00:04: attached PHY driver [Atheros 8031 ethernet] (mii_bus:phy_addr=QCOM8070:00:04, irq=-1)
Jun 6 17:47:26 ubuntu kernel: [ 176.658649] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
Jun 6 17:47:27 ubuntu kernel: [ 177.687890] qcom-emac QCOM8070:00 eth0: Link is Down
Jun 6 17:47:30 ubuntu kernel: [ 179.735532] qcom-emac QCOM8070:00 eth0: Link is Up - 1Gbps/Full - flow control rx/tx
Jun 6 17:47:30 ubuntu kernel: [ 179.735544] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready

Listening on LPF/eth0/8c:fd:f0:06:92:a5
Sending on LPF/eth0/8c:fd:f0:06:92:a5
Sending on Socket/fallback
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 3 (xid=0x1108047b)
...
DHCPREQUEST of 10.228.66.113 on eth0 to 255.255.255.255 port 67 (xid=0x7b040811)
DHCPOFFER of 10.228.66.113 from 10.228.66.3
DHCPACK of 10.228.66.113 from 10.228.66.3
bound to 10.228.66.113 -- renewal in 278 seconds.

Stefan Bader (smb)
Changed in linux (Ubuntu Zesty):
importance: Undecided → High
status: New → Fix Committed
Revision history for this message
Kleber Sacilotto de Souza (kleber-souza) wrote :

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

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: verification-needed-zesty
Revision history for this message
Manoj Iyer (manjo) wrote :

== Testing kernel in - proposed ==

The kernel installs and boots fine on the QDF2400 platform.

$ uname -a
Linux awsdp0 4.10.0-28-generic #32-Ubuntu SMP Fri Jun 30 05:33:10 UTC 2017 aarch64 aarch64 aarch64 GNU/Linux

$ apt policy linux-image-4.10.0-28-generic
linux-image-4.10.0-28-generic:
  Installed: 4.10.0-28.32
  Candidate: 4.10.0-28.32
  Version table:
 *** 4.10.0-28.32 500
        500 http://ports.ubuntu.com/ubuntu-ports zesty-proposed/main arm64 Packages

$ lsmod | grep -E "qcom_emac|at803x"
at803x 16384 1
qcom_emac 49152 0

The qcom-emac nic is able to get a DHCP lease.

$ ifconfig
enP1s1 Link encap:Ethernet HWaddr 24:8a:07:2a:ca:ca
          UP BROADCAST MULTICAST MTU:1500 Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

eth0 Link encap:Ethernet HWaddr 8c:fd:f0:06:90:cd
          inet addr:10.228.66.101 Bcast:10.228.66.255 Mask:255.255.255.0
          inet6 addr: fe80::8efd:f0ff:fe06:90cd/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
          RX packets:1010 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1086 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:100434 (100.4 KB) TX bytes:171324 (171.3 KB)
          Interrupt:39

tags: added: verification-done-zesty
removed: verification-needed-zesty
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (8.1 KiB)

This bug was fixed in the package linux - 4.10.0-28.32

---------------
linux (4.10.0-28.32) zesty; urgency=low

  * linux: 4.10.0-28.32 -proposed tracker (LP: #1701013)

  * KILLER1435-S[0489:e0a2] BT cannot search BT 4.0 device (LP: #1699651)
    - Bluetooth: btusb: Add support for 0489:e0a2 QCA_ROME device

  * aacraid driver may return uninitialized stack data to userspace
    (LP: #1700077)
    - SAUCE: scsi: aacraid: Don't copy uninitialized stack memory to userspace

  * CVE-2017-9605
    - drm/vmwgfx: Make sure backup_handle is always valid

  * CVE-2017-1000380
    - ALSA: timer: Fix race between read and ioctl
    - ALSA: timer: Fix missing queue indices reset at SNDRV_TIMER_IOCTL_SELECT

  * XDP eBPF programs fail to verify on Zesty ppc64el (LP: #1699627)
    - [Config] ppc64el: build for Power8 not Power7

  * AACRAID for power9 platform (LP: #1689980)
    - scripts/spelling.txt: add "therfore" pattern and fix typo instances
    - scsi: aacraid: fix PCI error recovery path
    - scsi: aacraid: pci_alloc_consistent() failures on ARM64
    - scsi: aacraid: Remove __GFP_DMA for raw srb memory
    - scsi: aacraid: Fix DMAR issues with iommu=pt
    - scsi: aacraid: Added 32 and 64 queue depth for arc natives
    - scsi: aacraid: Set correct Queue Depth for HBA1000 RAW disks
    - scsi: aacraid: Remove reset support from check_health
    - scsi: aacraid: Change wait time for fib completion
    - scsi: aacraid: Log count info of scsi cmds before reset
    - scsi: aacraid: Print ctrl status before eh reset
    - scsi: aacraid: Using single reset mask for IOP reset
    - scsi: aacraid: Rework IOP reset
    - scsi: aacraid: Add periodic checks to see IOP reset status
    - scsi: aacraid: Rework SOFT reset code
    - scsi: aacraid: Rework aac_src_restart
    - scsi: aacraid: Use correct function to get ctrl health
    - scsi: aacraid: Make sure ioctl returns on controller reset
    - scsi: aacraid: Enable ctrl reset for both hba and arc
    - scsi: aacraid: Add reset debugging statements
    - scsi: aacraid: Remove reference to Series-9
    - scsi: aacraid: Update driver version to 50834

  * arm64 kernel crashdump support (LP: #1694859)
    - memblock: add memblock_clear_nomap()
    - memblock: add memblock_cap_memory_range()
    - arm64: limit memory regions based on DT property, usable-memory-range
    - arm64: kdump: reserve memory for crash dump kernel
    - arm64: mm: add set_memory_valid()
    - arm64: mm: use phys_addr_t instead of unsigned long in __map_memblock
    - arm64: kdump: protect crash dump kernel memory
    - arm64: hibernate: preserve kdump image around hibernation
    - arm64: kdump: implement machine_crash_shutdown()
    - arm64: kdump: add VMCOREINFO's for user-space tools
    - [Config] CONFIG_CRASH_DUMP=y on arm64
    - arm64: kdump: provide /proc/vmcore file
    - Documentation: kdump: describe arm64 port
    - Documentation: dt: chosen properties for arm64 kdump
    - efi/libstub/arm*: Set default address and size cells values for an empty dtb

  * hibmc driver does not include "pci:" prefix in bus ID (LP: #1698700)
    - SAUCE: drm: hibmc: Use set_busid function from drm core

  * Processes in "D" state due to za...

Read more...

Changed in linux (Ubuntu Zesty):
status: Fix Committed → Fix Released
Changed in linux (Ubuntu):
status: Incomplete → Fix Released
Brad Figg (brad-figg)
tags: added: cscc
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.