rpi3b+ wifi doesn't get used if ethernet disconnected

Bug #1890487 reported by Paul Larson
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux-raspi (Ubuntu)
Fix Released
Undecided
Unassigned
Focal
Fix Released
Undecided
Unassigned
Groovy
Fix Released
Undecided
Unassigned

Bug Description

[Impact]

When testing 20.04.1, I noticed some different behavior on rpi3b+ that I didn't see on rpi3b or rpi4. I have configured the device with ethernet, added netplan yaml for my wifi network, and rebooted. So both eth0 and wlan0 have an ip address.

On all other devices (rpi3b, rpi4, etc), if I unplug eth0 wile pinging something, I'll miss maybe 1 ping and then it will continue to work and just switch over to wlan0. However, on rpi3b+ it just stops being able to access the network completely. If I re-run netplan apply, it will start using wifi again, but if I plug eth0 back in, then unplug it, it stops just like before.

I am seeing this with the current 20.04.1 release:
Linux ubuntu 5.4.0-1015-raspi #15-Ubuntu SMP Fri Jul 10 05:34:24 UTC 2020 aarch64 aarch64 aarch64 GNU/Linux

I also went back and tested the original 20.04 release and it happens there too, so this is not a regression:
Linux ubuntu 5.4.0-1008-raspi #8-Ubuntu SMP Wed Apr 8 11:13:06 UTC 2020 aarch64 aarch64 aarch64 GNU/Linux

I see this happen on both armhf and arm64. One difference I did note, is that I get a link down message in dmesg on rpi3b, but not rpi3b+. When I disconnect eth0 on rpi3b I see this:
[ 82.203702] smsc95xx 1-1.1:1.0 eth0: link down

...but nothing on the 3b+.

[Test Case]

Disconnect and reconnect the eth0 cable. The link will not come back up. Or down eth0 and bring it back up. The link will not come back up.

$ ip a
...
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether b8:27:eb:3e:ab:fb brd ff:ff:ff:ff:ff:ff
    inet 192.168.99.191/24 brd 192.168.99.255 scope global dynamic eth0
       valid_lft 795197sec preferred_lft 795197sec
    inet6 fe80::ba27:ebff:fe3e:abfb/64 scope link
       valid_lft forever preferred_lft forever
...
$ ip link set eth0 down
$ ip link set eth0 up
$ ip a
...
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether b8:27:eb:3e:ab:fb brd ff:ff:ff:ff:ff:ff
...

[Where problems could occur]

The fix is to read the PHY status register to clear pending interrupts. That read could fail for various reasons which would probably result in kernel error messages. But nothing more should happen. IMO worst case is that we get the old behavior.

Tags: iso-testing
Revision history for this message
Ubuntu QA Website (ubuntuqa) wrote :

This bug has been reported on the Ubuntu ISO testing tracker.

A list of all reports related to this bug can be found here:
http://iso.qa.ubuntu.com/qatracker/reports/bugs/1890487

tags: added: iso-testing
Juerg Haefliger (juergh)
affects: linux-raspi2 (Ubuntu) → linux-raspi (Ubuntu)
Changed in linux-raspi (Ubuntu):
status: New → Invalid
Revision history for this message
Juerg Haefliger (juergh) wrote :

I'm able to reproduce this and it seems to be a known issue: https://github.com/raspberrypi/firmware/issues/1100

Changed in linux-raspi (Ubuntu Focal):
status: New → Incomplete
status: Incomplete → Confirmed
Revision history for this message
Juerg Haefliger (juergh) wrote :

This works if the ETH cable is unplugged at boot time. It's probably a race at boot because the driver is compiled into the kernel.

Changed in linux-raspi (Ubuntu Groovy):
status: Invalid → Confirmed
Revision history for this message
Juerg Haefliger (juergh) wrote :

There is a link-change interrupt pending in the PHY that doesn't get serviced for some reason and blocks subsequent interrupts. Running the following clears the interrupt and things start working properly afterwards:

$ mii-tool -vv eth0
Using SIOCGMIIPHY=0x8947
eth0: negotiated 1000baseT-FD flow-control, link ok
  registers for MII PHY 1:
    1040 79ed 0007 c132 05e1 cde1 000f 0000
    0000 0200 0800 0000 0000 0000 0000 3000
    0000 0000 0088 0000 0000 0000 3200 0004
    0040 a000 a000 0000 a035 0000 0000 0000
  product info: vendor 00:01:f0, model 19 rev 2
  basic mode: autonegotiation enabled
  basic status: autonegotiation complete, link ok
  capabilities: 1000baseT-FD 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD
  advertising: 1000baseT-FD 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD flow-control
  link partner: 1000baseT-FD 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD flow-control

Juerg Haefliger (juergh)
description: updated
Changed in linux-raspi (Ubuntu Groovy):
status: Confirmed → Fix Committed
Changed in linux-raspi (Ubuntu Focal):
status: Confirmed → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (3.2 KiB)

This bug was fixed in the package linux-raspi - 5.8.0-1013.16

---------------
linux-raspi (5.8.0-1013.16) groovy; urgency=medium

  * groovy/linux-raspi: 5.8.0-1013.16 -proposed tracker (LP: #1911336)

  * rpi3b+ wifi doesn't get used if ethernet disconnected (LP: #1890487)
    - net: lan78xx: Ack pending PHY ints when resetting

  * groovy/linux-raspi: Upstream raspberrypi patchset 2020-11-05 (LP: #1903541)
    - brcmfmac: Increase power saving delay to 2s
    - overlays: Update i2c0 overlay to disable the i2c0mux.
    - dt: Remove duplicate assignment for i2c0 pinctrl config
    - overlays: Add option for composite to vc4-kms-v3d-pi4.
    - overlays: minor typo in instructions
    - overlays: Regenerate upstream-pi4 overlay
    - overlays: Add parameters to adafruit18, sainsmart18
    - rpivid_h265: Fix width/height typo
    - overlays: Add extra CMA sizes (up to 512M)
    - overlays: Add note to BCM2711 overlays
    - configs: Remove I2C_BRCMSTB from the kernel
    - net: bcmgenet: Reset RBUF on first open
    - ASoC: cs42xx8: Only define cs42xx8_of_match once
    - configs: Regenerate the defconfigs
    - staging: bcm2835-codec: Use a define the completion timeout
    - staging: bcm2835-codec: Correct buffer number change on start streaming
    - USB: gadget: f_hid: avoid crashes and log spam
    - Update hy28b-overlay.dts
    - overlays: Update display GPIO declarations
    - configs: Add CONFIG_RTC_DRV_SD3078=m
    - overlays: Add sd3078 to the i2c-rtc overlay
    - configs: Restore SND_PCM_OSS=m
    - dwc_otg: initialise sched_frame for periodic QHs that were parked
    - arm64: configs: Enable Unicam support
    - arm64: configs: Enable V4L2 test module support
    - staging: bcm2835-camera: Replace deprecated V4L2_PIX_FMT_BGR32
    - staging: bcm2835-codec: Replace deprecated V4L2_PIX_FMT_BGR32
    - ARM: bcm2711-rpi.dts: Unlock DMA channels 9 & 10
    - gpio: Add gpio-fsm driver
    - configs: Add CONFIG_GPIO_FSM=m
    - overlays: Add fsm-demo overlay
    - overlays: Add ghost-amp overlay
    - Fixes a problem when module probes before i2c module is available
    - [Config] raspi: updateconfigs after update to rpi-5.8.y 2020-11-05

  * Raspberry Pi 400 Kernel Panic (LP: #1907432)
    - SAUCE: Revert "mailbox: avoid timer start from callback"

  [ Ubuntu: 5.8.0-39.44 ]

  * groovy/linux: 5.8.0-39.44 -proposed tracker (LP: #1911350)
  * overlay: permission regression in 5.4.0-51.56 due to patches related to
    CVE-2020-16120 (LP: #1900141)
    - ovl: do not fail because of O_NOATIME

  [ Ubuntu: 5.8.0-38.43 ]

  * groovy/linux: 5.8.0-38.43 -proposed tracker (LP: #1911143)
  * CVE-2020-28374
    - SAUCE: target: fix XCOPY NAA identifier lookup
  * Packaging resync (LP: #1786013)
    - update dkms package versions

  [ Ubuntu: 5.8.0-36.40 ]

  * debian/scripts/file-downloader does not handle positive failures correctly
    (LP: #1878897)
    - [Packaging] file-downloader not handling positive failures correctly

  [ Ubuntu: 5.8.0-35.39 ]

  * Packaging resync (LP: #1786013)
    - update dkms package versions
  * CVE-2021-1052 // CVE-2021-1053
    - [Packaging] NVIDIA -- Add the NVIDIA 460 driver

 -- Ian May <email address hidden> W...

Read more...

Changed in linux-raspi (Ubuntu Groovy):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (8.3 KiB)

This bug was fixed in the package linux-raspi - 5.4.0-1028.31

---------------
linux-raspi (5.4.0-1028.31) focal; urgency=medium

  * focal/linux-raspi: 5.4.0-1028.31 -proposed tracker (LP: #1911311)

  [ Ubuntu: 5.4.0-63.71 ]

  * focal/linux: 5.4.0-63.71 -proposed tracker (LP: #1911333)
  * overlay: permission regression in 5.4.0-51.56 due to patches related to
    CVE-2020-16120 (LP: #1900141)
    - ovl: do not fail because of O_NOATIME
  * Focal update: v5.4.79 upstream stable release (LP: #1907151)
    - net/mlx5: Use async EQ setup cleanup helpers for multiple EQs
    - net/mlx5: poll cmd EQ in case of command timeout
    - net/mlx5: Fix a race when moving command interface to events mode
    - net/mlx5: Add retry mechanism to the command entry index allocation
  * Kernel 5.4.0-56 Wi-Fi does not connect (LP: #1906770)
    - mt76: fix fix ampdu locking
  * [Ubuntu 21.04 FEAT] mpt3sas: Request to include the patch set which supports
    topology where zoning is enabled in expander (LP: #1899802)
    - scsi: mpt3sas: Define hba_port structure
    - scsi: mpt3sas: Allocate memory for hba_port objects
    - scsi: mpt3sas: Rearrange _scsih_mark_responding_sas_device()
    - scsi: mpt3sas: Update hba_port's sas_address & phy_mask
    - scsi: mpt3sas: Get device objects using sas_address & portID
    - scsi: mpt3sas: Rename transport_del_phy_from_an_existing_port()
    - scsi: mpt3sas: Get sas_device objects using device's rphy
    - scsi: mpt3sas: Update hba_port objects after host reset
    - scsi: mpt3sas: Set valid PhysicalPort in SMPPassThrough
    - scsi: mpt3sas: Handling HBA vSES device
    - scsi: mpt3sas: Add bypass_dirty_port_flag parameter
    - scsi: mpt3sas: Handle vSES vphy object during HBA reset
    - scsi: mpt3sas: Add module parameter multipath_on_hba
    - scsi: mpt3sas: Bump driver version to 35.101.00.00

  [ Ubuntu: 5.4.0-62.70 ]

  * focal/linux: 5.4.0-62.70 -proposed tracker (LP: #1911144)
  * CVE-2020-28374
    - SAUCE: target: fix XCOPY NAA identifier lookup
  * Packaging resync (LP: #1786013)
    - update dkms package versions

linux-raspi (5.4.0-1027.30) focal; urgency=medium

  * focal/linux-raspi: 5.4.0-1027.30 -proposed tracker (LP: #1910016)

  * rpi3b+ wifi doesn't get used if ethernet disconnected (LP: #1890487)
    - net: lan78xx: Ack pending PHY ints when resetting

  * focal/linux-raspi: Upstream raspberrypi patchset 2020-12-10 (LP: #1908077)
    - ARM: dts: Limit BT modem baud rate on 3B
    - configs: Enable CHACHA20POLY1305=m
    - overlays: Update i2c0 overlay to disable the i2c0mux.
    - dt: Remove duplicate assignment for i2c0 pinctrl config
    - overlays: Add option for composite to vc4-kms-v3d-pi4.
    - minor typo in directions
    - overlays: Regenerate upstream-pi4 overlay
    - overlays: Add parameters to adafruit18, sainsmart18
    - rpivid_h265: Fix width/height typo
    - overlays: Add extra CMA sizes (up to 512M)
    - overlays: Add note to BCM2711 overlays
    - overlays: adafruit18,sainsmart18: default bgr to off
    - configs: Remove I2C_BRCMSTB from the kernel
    - net: bcmgenet: Reset RBUF on first open
    - ASoC: cs42xx8: Only define cs42xx8_of_match once
    - configs: Regenerate ...

Read more...

Changed in linux-raspi (Ubuntu Focal):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package linux-raspi - 5.11.0-1003.3

---------------
linux-raspi (5.11.0-1003.3) hirsute; urgency=medium

  * hirsute/linux-raspi: 5.11.0-1003.3 -proposed tracker (LP: #1917734)

  * Packaging resync (LP: #1786013)
    - [Packaging] update variants
    - [Packaging] update update.conf

  * Miscellaneous Ubuntu changes
    - [Packaging] raspi: Initial version of linux-raspi for Hirsute
    - [Config] raspi: updateconfigs after rebase to Ubuntu-5.11.0-11.12
    - [Packaging] raspi: Set disable_d_i=true in hooks.mk
    - [Packaging] raspi: Add dctrl-tools to Build-Depends
    - [Packaging] raspi: Correctly implement noudeb build profiles
    - [Packaging] raspi: remove Provides: aufs-dkms

  [ Ubuntu: 5.11.0-11.12 ]

  * hirsute/linux: 5.11.0-11.12 -proposed tracker (LP: #1917335)
  * Packaging resync (LP: #1786013)
    - update dkms package versions
    - [Packaging] update variants
  * Support no udeb profile (LP: #1916095)
    - [Packaging] replace custom filter script with dctrl-tools
    - [Packaging] correctly implement noudeb build profiles.
  * Miscellaneous Ubuntu changes
    - [Packaging] dkms-versions -- remove nvidia-graphics-drivers-440-server
    - [Debian] run ubuntu-regression-suite for linux-unstable
    - [Packaging] remove Provides: aufs-dkms
    - [Packaging] Change source package name to linux
    - [Config] update gcc version in config due to toolchain update
  * Miscellaneous upstream changes
    - Revert "UBUNTU: [Config] disable nvidia and nvidia_server builds"
    - Xen/x86: don't bail early from clear_foreign_p2m_mapping()
    - Xen/x86: also check kernel mapping in set_foreign_p2m_mapping()
    - Xen/gntdev: correct dev_bus_addr handling in gntdev_map_grant_pages()
    - Xen/gntdev: correct error checking in gntdev_map_grant_pages()
    - xen/arm: don't ignore return errors from set_phys_to_machine
    - xen-blkback: don't "handle" error by BUG()
    - xen-netback: don't "handle" error by BUG()
    - xen-scsiback: don't "handle" error by BUG()
    - xen-blkback: fix error handling in xen_blkbk_map()
    - tty: protect tty_write from odd low-level tty disciplines
    - Bluetooth: btusb: Always fallback to alt 1 for WBS
    - media: pwc: Use correct device for DMA
    - bpf: Fix truncation handling for mod32 dst reg wrt zero
    - HID: make arrays usage and value to be the same
    - USB: quirks: sort quirk entries
    - usb: quirks: add quirk to start video capture on ELMO L-12F document camera
      reliable
    - ntfs: check for valid standard information attribute
    - Bluetooth: btusb: Some Qualcomm Bluetooth adapters stop working
    - arm64: tegra: Add power-domain for Tegra210 HDA
    - hwmon: (dell-smm) Add XPS 15 L502X to fan control blacklist
    - KVM: x86: Zap the oldest MMU pages, not the newest
    - KVM: do not assume PTE is writable after follow_pfn
    - mm: provide a saner PTE walking API for modules
    - KVM: Use kvm_pfn_t for local PFN variable in hva_to_pfn_remapped()

 -- Juerg Haefliger <email address hidden> Thu, 04 Mar 2021 14:42:19 +0100

Changed in linux-raspi (Ubuntu):
status: Confirmed → Fix Released
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.