r8152 init may take up to 40 seconds at initialization with Dell WD19/WD19DC during hotplug

Bug #1864284 reported by You-Sheng Yang on 2020-02-22
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
HWE Next
Undecided
Unassigned
linux (Ubuntu)
Status tracked in Focal
Bionic
Undecided
You-Sheng Yang
Eoan
Undecided
You-Sheng Yang
Focal
Undecided
You-Sheng Yang
linux-oem (Ubuntu)
Undecided
Unassigned
Bionic
Undecided
You-Sheng Yang
linux-oem-osp1 (Ubuntu)
Undecided
Unassigned
Bionic
Undecided
You-Sheng Yang

Bug Description

[SRU Justification]

[Impact]
USB devices attached to Dell WD19/WD19DC USB Type-C dock take up to nearly one
minutes to be ready for use.

[Fix]
r8152 driver init process involves several for-loops that each may take up to 14
seconds to exit when USB port reset occurs during hotplug. This is still
reproducible with latest v5.6-rc mainline kernel although the fail rate is much
lower since v5.5-rc7.

[Test Case]
Verified on Dell WD19DC.

[Regression Potential]
Low. Just to exit the loop early when it should have been.

========== original bug description ==========

Dell USB Type C docking WD19/WD19DC attaches additional peripherals as:

  /: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/6p, 5000M
      |__ Port 1: Dev 11, If 0, Class=Hub, Driver=hub/4p, 5000M
          |__ Port 3: Dev 12, If 0, Class=Hub, Driver=hub/4p, 5000M
          |__ Port 4: Dev 13, If 0, Class=Vendor Specific Class, Driver=r8152, 5000M

where usb 2-1-3 is a hub connecting all USB Type-A/C ports on the dock.

When hotplugging such dock with additional usb devices already attached on it, the probing process may reset usb 2.1 port, therefore r8152 ethernet device is also reset. However, in r8152 driver there are several for-loops that may take up to 14 seconds during the initialization for each in practice, and that has to be completed before USB may re-enumerate devices on the bus. As a result, devices attached to the dock will only be available after nearly 1 minute after the dock is plugged in.

  [ 216.388290] [250] r8152 2-1.4:1.0: usb_probe_interface
  [ 216.388292] [250] r8152 2-1.4:1.0: usb_probe_interface - got id
  [ 258.830410] r8152 2-1.4:1.0 (unnamed net_device) (uninitialized): PHY not ready
  [ 258.830460] r8152 2-1.4:1.0 (unnamed net_device) (uninitialized): Invalid header when reading pass-thru MAC addr
  [ 258.830464] r8152 2-1.4:1.0 (unnamed net_device) (uninitialized): Get ether addr fail

This can be reproduced on all kernel versions up to latest v5.6-rc2, but after v5.5-rc7 the reproduce rate is dramatically lower to 1/30 or so while it was around 1/2.

The time consuming for-loops are at:
https://elixir.bootlin.com/linux/v5.5/source/drivers/net/usb/r8152.c#L3206
https://elixir.bootlin.com/linux/v5.5/source/drivers/net/usb/r8152.c#L5400
https://elixir.bootlin.com/linux/v5.5/source/drivers/net/usb/r8152.c#L5537

ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: linux-image-5.0.0-1037-oem-osp1 5.0.0-1037.42
ProcVersionSignature: Ubuntu 5.0.0-1037.42-oem-osp1 5.0.21
Uname: Linux 5.0.0-1037-oem-osp1 x86_64
ApportVersion: 2.20.9-0ubuntu7.11
Architecture: amd64
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC0: u 2014 F.... pulseaudio
CurrentDesktop: ubuntu:GNOME
Date: Sat Feb 22 04:07:20 2020
DistributionChannelDescriptor:
 # This is the distribution channel descriptor for the OEM CDs
 # For more information see http://wiki.ubuntu.com/DistributionChannelDescriptor
 canonical-oem-somerville-bionic-amd64-20180608-47+beaver-hodor+X95
InstallationDate: Installed on 2020-01-16 (37 days ago)
InstallationMedia: Ubuntu 18.04 "Bionic" - Build amd64 LIVE Binary 20180608-09:38
IwConfig:
 enp1s0 no wireless extensions.

 enxd8d090035306 no wireless extensions.

 lo no wireless extensions.
MachineType: Dell Inc. Latitude 3310
ProcEnviron:
 TERM=xterm-256color
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcFB: 0 inteldrmfb
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-5.0.0-1037-oem-osp1 root=UUID=1ad036ce-aa29-4d5e-8692-d980d1a7140f ro "dyndbg=file drivers/usb/* +pt" log_buf_len=32M ignore_loglevel usbcore.quirks=0bda:0487:k
RelatedPackageVersions:
 linux-restricted-modules-5.0.0-1037-oem-osp1 N/A
 linux-backports-modules-5.0.0-1037-oem-osp1 N/A
 linux-firmware 1.173.15
SourcePackage: linux-oem-osp1
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 01/07/2020
dmi.bios.vendor: Dell Inc.
dmi.bios.version: 99.51.2[V2 AMI]
dmi.board.vendor: Dell Inc.
dmi.chassis.type: 10
dmi.chassis.vendor: Dell Inc.
dmi.modalias: dmi:bvnDellInc.:bvr99.51.2[V2AMI]:bd01/07/2020:svnDellInc.:pnLatitude3310:pvr:rvnDellInc.:rn:rvr:cvnDellInc.:ct10:cvr:
dmi.product.family: Latitude
dmi.product.name: Latitude 3310
dmi.product.sku: 0A13
dmi.sys.vendor: Dell Inc.

You-Sheng Yang (vicamo) wrote :
You-Sheng Yang (vicamo) wrote :
tags: added: oem-priority originate-from-1859932 somerville

This change was made by a bot.

Changed in linux (Ubuntu):
status: New → Confirmed
You-Sheng Yang (vicamo) on 2020-02-24
description: updated
description: updated
You-Sheng Yang (vicamo) wrote :

Upstream: https://<email address hidden>/

You-Sheng Yang (vicamo) on 2020-02-24
Changed in linux (Ubuntu Bionic):
assignee: nobody → You-Sheng Yang (vicamo)
status: New → In Progress
Changed in linux (Ubuntu Eoan):
assignee: nobody → You-Sheng Yang (vicamo)
status: New → In Progress
Changed in linux (Ubuntu Focal):
assignee: nobody → You-Sheng Yang (vicamo)
status: Confirmed → In Progress
Changed in linux-oem (Ubuntu Bionic):
assignee: nobody → You-Sheng Yang (vicamo)
status: New → In Progress
Changed in linux-oem-osp1 (Ubuntu Bionic):
assignee: nobody → You-Sheng Yang (vicamo)
status: New → In Progress
AceLan Kao (acelankao) on 2020-02-25
Changed in linux-oem (Ubuntu Bionic):
status: In Progress → Fix Committed
no longer affects: linux-oem (Ubuntu Eoan)
no longer affects: linux-oem (Ubuntu Focal)
no longer affects: linux-oem-osp1 (Ubuntu Eoan)
no longer affects: linux-oem-osp1 (Ubuntu Focal)
Timo Aaltonen (tjaalton) on 2020-03-12
Changed in linux-oem-osp1 (Ubuntu Bionic):
status: In Progress → Fix Committed

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-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!

tags: added: verification-needed-focal
Changed in linux (Ubuntu Bionic):
status: In Progress → Fix Committed
Changed in linux (Ubuntu Eoan):
status: In Progress → Fix Committed
Timo Aaltonen (tjaalton) wrote :

osp1 kernel is in proposed, please test asap

tags: added: verification-needed-bionic
You-Sheng Yang (vicamo) wrote :

Verified linux-oem-osp1 version 5.0.0-1043, linux-oem version 4.15.0-1076 from bionic-proposed.

You-Sheng Yang (vicamo) wrote :

Verified linux version 5.4.0-18.22 from focal-proposed.

tags: added: verification-done-bionic verification-done-focal
removed: verification-needed-bionic verification-needed-focal
Launchpad Janitor (janitor) wrote :
Download full text (81.5 KiB)

This bug was fixed in the package linux - 5.4.0-18.22

---------------
linux (5.4.0-18.22) focal; urgency=medium

  * focal/linux: 5.4.0-18.22 -proposed tracker (LP: #1866488)

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

  * Add sysfs attribute to show remapped NVMe (LP: #1863621)
    - SAUCE: ata: ahci: Add sysfs attribute to show remapped NVMe device count

  * [20.04 FEAT] Compression improvements in Linux kernel (LP: #1830208)
    - lib/zlib: add s390 hardware support for kernel zlib_deflate
    - s390/boot: rename HEAP_SIZE due to name collision
    - lib/zlib: add s390 hardware support for kernel zlib_inflate
    - s390/boot: add dfltcc= kernel command line parameter
    - lib/zlib: add zlib_deflate_dfltcc_enabled() function
    - btrfs: use larger zlib buffer for s390 hardware compression
    - [Config] Introducing s390x specific kernel config option CONFIG_ZLIB_DFLTCC

  * [UBUNTU 20.04] s390x/pci: increase CONFIG_PCI_NR_FUNCTIONS to 512 in kernel
    config (LP: #1866056)
    - [Config] Increase CONFIG_PCI_NR_FUNCTIONS from 64 to 512 starting with focal
      on s390x

  * CONFIG_IP_MROUTE_MULTIPLE_TABLES is not set (LP: #1865332)
    - [Config] CONFIG_IP_MROUTE_MULTIPLE_TABLES=y

  * Dell XPS 13 9300 Intel 1650S wifi [34f0:1651] fails to load firmware
    (LP: #1865962)
    - iwlwifi: remove IWL_DEVICE_22560/IWL_DEVICE_FAMILY_22560
    - iwlwifi: 22000: fix some indentation
    - iwlwifi: pcie: rx: use rxq queue_size instead of constant
    - iwlwifi: allocate more receive buffers for HE devices
    - iwlwifi: remove some outdated iwl22000 configurations
    - iwlwifi: assume the driver_data is a trans_cfg, but allow full cfg

  * [FOCAL][REGRESSION] Intel Gen 9 brightness cannot be controlled
    (LP: #1861521)
    - Revert "USUNTU: SAUCE: drm/i915: Force DPCD backlight mode on Dell Precision
      4K sku"
    - Revert "UBUNTU: SAUCE: drm/i915: Force DPCD backlight mode on X1 Extreme 2nd
      Gen 4K AMOLED panel"
    - SAUCE: drm/dp: Introduce EDID-based quirks
    - SAUCE: drm/i915: Force DPCD backlight mode on X1 Extreme 2nd Gen 4K AMOLED
      panel
    - SAUCE: drm/i915: Force DPCD backlight mode for some Dell CML 2020 panels

  * [20.04 FEAT] Enable proper kprobes on ftrace support (LP: #1865858)
    - s390/ftrace: save traced function caller
    - s390: support KPROBES_ON_FTRACE

  * alsa/sof: load different firmware on different platforms (LP: #1857409)
    - ASoC: SOF: Intel: hda: use fallback for firmware name
    - ASoC: Intel: acpi-match: split CNL tables in three
    - ASoC: SOF: Intel: Fix CFL and CML FW nocodec binary names.

  * [UBUNTU 20.04] Enable CONFIG_NET_SWITCHDEV in kernel config for s390x
    starting with focal (LP: #1865452)
    - [Config] Enable CONFIG_NET_SWITCHDEV in kernel config for s390x starting
      with focal

  * Focal update: v5.4.24 upstream stable release (LP: #1866333)
    - io_uring: grab ->fs as part of async offload
    - EDAC: skx_common: downgrade message importance on missing PCI device
    - net: dsa: b53: Ensure the default VID is untagged
    - net: fib_rules: Correctly set table field when table number exceeds 8 bit...

Changed in linux (Ubuntu Focal):
status: In Progress → Fix Released
Launchpad Janitor (janitor) wrote :
Download full text (45.6 KiB)

This bug was fixed in the package linux-oem - 4.15.0-1076.86

---------------
linux-oem (4.15.0-1076.86) bionic; urgency=medium

  * bionic/linux-oem: 4.15.0-1076.86 -proposed tracker (LP: #1865200)

  [ Ubuntu: 4.15.0-91.92 ]

  * bionic/linux: 4.15.0-91.92 -proposed tracker (LP: #1865109)
  * CVE-2020-2732
    - KVM: x86: emulate RDPID
    - KVM: nVMX: Don't emulate instructions in guest mode
    - KVM: nVMX: Refactor IO bitmap checks into helper function
    - KVM: nVMX: Check IO instruction VM-exit conditions

linux-oem (4.15.0-1075.85) bionic; urgency=medium

  * bionic/linux-oem: 4.15.0-1075.85 -proposed tracker (LP: #1864730)

  * Packaging resync (LP: #1786013)
    - [Packaging] resync dkms-build and family

  [ Ubuntu: 4.15.0-90.91 ]

  * bionic/linux: 4.15.0-90.91 -proposed tracker (LP: #1864753)
  * dkms artifacts may expire from the pool (LP: #1850958)
    - [Packaging] autoreconstruct -- manage executable debian files
    - [packaging] handle downloads from the librarian better

  [ Ubuntu: 4.15.0-90.90 ]

  * bionic/linux: 4.15.0-90.90 -proposed tracker (LP: #1864753)
  * vm-segv from ubuntu_stress_smoke_test failed on B (LP: #1864063)
    - Revert "apparmor: don't try to replace stale label in ptrace access check"

linux-oem (4.15.0-1074.84) bionic; urgency=medium

  * bionic/linux-oem: 4.15.0-1074.84 -proposed tracker (LP: #1863312)

  * Root can lift kernel lockdown via USB/IP (LP: #1861238)
    - Revert "UBUNTU: SAUCE: (efi-lockdown) Add a SysRq option to lift kernel
      lockdown"

  * r8152 init may take up to 40 seconds at initialization with Dell WD19/WD19DC
    during hotplug (LP: #1864284)
    - SAUCE: r8151: check disconnect status after long sleep

  * alsa/hda/realtek: fix a mute led regression on Lenovo X1 Carbon
    (LP: #1864576)
    - SAUCE: ALSA: hda/realtek - Fix a regression for mute led on Lenovo Carbon X1

  [ Ubuntu: 4.15.0-89.89 ]

  * bionic/linux: 4.15.0-89.89 -proposed tracker (LP: #1863350)
  * [SRU][B/OEM-B] Fix multitouch support on some devices (LP: #1862567)
    - HID: core: move the dynamic quirks handling in core
    - HID: quirks: move the list of special devices into a quirk
    - HID: core: move the list of ignored devices in hid-quirks.c
    - HID: core: remove the absolute need of hid_have_special_driver[]
  * [linux] Patch to prevent possible data corruption (LP: #1848739)
    - blk-mq: silence false positive warnings in hctx_unlock()
  * Add bpftool to linux-tools-common (LP: #1774815)
    - tools/bpftool: fix bpftool build with bintutils >= 2.9
    - bpftool: make libbfd optional
    - [Debian] Remove binutils-dev build dependency
    - [Debian] package bpftool in linux-tools-common
  * Root can lift kernel lockdown via USB/IP (LP: #1861238)
    - Revert "UBUNTU: SAUCE: (efi-lockdown) Add a SysRq option to lift kernel
      lockdown"
  * [Bionic] i915 incomplete fix for CVE-2019-14615 (LP: #1862840) //
    CVE-2020-8832
    - drm/i915: Use same test for eviction and submitting kernel context
    - drm/i915: Define an engine class enum for the uABI
    - drm/i915: Force the switch to the i915->kernel_context
    - drm/i915: Move GT powersaving init to i915_gem_init()
    - drm/i915: Move...

Changed in linux-oem (Ubuntu Bionic):
status: Fix Committed → Fix Released

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-eoan' to 'verification-done-eoan'. If the problem still exists, change the tag 'verification-needed-eoan' to 'verification-failed-eoan'.

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-eoan
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package linux-oem-osp1 - 5.0.0-1043.48

---------------
linux-oem-osp1 (5.0.0-1043.48) bionic; urgency=medium

  * bionic/linux-oem-osp1: 5.0.0-1043.48 -proposed tracker (LP: #1867111)

  * All PS/2 ports on PS/2 Serial add-in bracket are not working after S3
    (LP: #1866734)
    - SAUCE: Input: i8042 - Fix the selftest retry logic

  * r8152 init may take up to 40 seconds at initialization with Dell WD19/WD19DC
    during hotplug (LP: #1864284)
    - UBUNTU SAUCE: r8151: check disconnect status after long sleep

  * Miscellaneous Ubuntu changes
    - [Config] Bump the GCC version

 -- Timo Aaltonen <email address hidden> Thu, 12 Mar 2020 11:14:40 +0200

Changed in linux-oem-osp1 (Ubuntu Bionic):
status: Fix Committed → Fix Released
Launchpad Janitor (janitor) wrote :
Download full text (45.6 KiB)

This bug was fixed in the package linux-oem - 4.15.0-1076.86

---------------
linux-oem (4.15.0-1076.86) bionic; urgency=medium

  * bionic/linux-oem: 4.15.0-1076.86 -proposed tracker (LP: #1865200)

  [ Ubuntu: 4.15.0-91.92 ]

  * bionic/linux: 4.15.0-91.92 -proposed tracker (LP: #1865109)
  * CVE-2020-2732
    - KVM: x86: emulate RDPID
    - KVM: nVMX: Don't emulate instructions in guest mode
    - KVM: nVMX: Refactor IO bitmap checks into helper function
    - KVM: nVMX: Check IO instruction VM-exit conditions

linux-oem (4.15.0-1075.85) bionic; urgency=medium

  * bionic/linux-oem: 4.15.0-1075.85 -proposed tracker (LP: #1864730)

  * Packaging resync (LP: #1786013)
    - [Packaging] resync dkms-build and family

  [ Ubuntu: 4.15.0-90.91 ]

  * bionic/linux: 4.15.0-90.91 -proposed tracker (LP: #1864753)
  * dkms artifacts may expire from the pool (LP: #1850958)
    - [Packaging] autoreconstruct -- manage executable debian files
    - [packaging] handle downloads from the librarian better

  [ Ubuntu: 4.15.0-90.90 ]

  * bionic/linux: 4.15.0-90.90 -proposed tracker (LP: #1864753)
  * vm-segv from ubuntu_stress_smoke_test failed on B (LP: #1864063)
    - Revert "apparmor: don't try to replace stale label in ptrace access check"

linux-oem (4.15.0-1074.84) bionic; urgency=medium

  * bionic/linux-oem: 4.15.0-1074.84 -proposed tracker (LP: #1863312)

  * Root can lift kernel lockdown via USB/IP (LP: #1861238)
    - Revert "UBUNTU: SAUCE: (efi-lockdown) Add a SysRq option to lift kernel
      lockdown"

  * r8152 init may take up to 40 seconds at initialization with Dell WD19/WD19DC
    during hotplug (LP: #1864284)
    - SAUCE: r8151: check disconnect status after long sleep

  * alsa/hda/realtek: fix a mute led regression on Lenovo X1 Carbon
    (LP: #1864576)
    - SAUCE: ALSA: hda/realtek - Fix a regression for mute led on Lenovo Carbon X1

  [ Ubuntu: 4.15.0-89.89 ]

  * bionic/linux: 4.15.0-89.89 -proposed tracker (LP: #1863350)
  * [SRU][B/OEM-B] Fix multitouch support on some devices (LP: #1862567)
    - HID: core: move the dynamic quirks handling in core
    - HID: quirks: move the list of special devices into a quirk
    - HID: core: move the list of ignored devices in hid-quirks.c
    - HID: core: remove the absolute need of hid_have_special_driver[]
  * [linux] Patch to prevent possible data corruption (LP: #1848739)
    - blk-mq: silence false positive warnings in hctx_unlock()
  * Add bpftool to linux-tools-common (LP: #1774815)
    - tools/bpftool: fix bpftool build with bintutils >= 2.9
    - bpftool: make libbfd optional
    - [Debian] Remove binutils-dev build dependency
    - [Debian] package bpftool in linux-tools-common
  * Root can lift kernel lockdown via USB/IP (LP: #1861238)
    - Revert "UBUNTU: SAUCE: (efi-lockdown) Add a SysRq option to lift kernel
      lockdown"
  * [Bionic] i915 incomplete fix for CVE-2019-14615 (LP: #1862840) //
    CVE-2020-8832
    - drm/i915: Use same test for eviction and submitting kernel context
    - drm/i915: Define an engine class enum for the uABI
    - drm/i915: Force the switch to the i915->kernel_context
    - drm/i915: Move GT powersaving init to i915_gem_init()
    - drm/i915: Move...

Changed in linux-oem (Ubuntu):
status: New → Fix Released
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package linux-oem-osp1 - 5.0.0-1043.48

---------------
linux-oem-osp1 (5.0.0-1043.48) bionic; urgency=medium

  * bionic/linux-oem-osp1: 5.0.0-1043.48 -proposed tracker (LP: #1867111)

  * All PS/2 ports on PS/2 Serial add-in bracket are not working after S3
    (LP: #1866734)
    - SAUCE: Input: i8042 - Fix the selftest retry logic

  * r8152 init may take up to 40 seconds at initialization with Dell WD19/WD19DC
    during hotplug (LP: #1864284)
    - UBUNTU SAUCE: r8151: check disconnect status after long sleep

  * Miscellaneous Ubuntu changes
    - [Config] Bump the GCC version

 -- Timo Aaltonen <email address hidden> Thu, 12 Mar 2020 11:14:40 +0200

Changed in linux-oem-osp1 (Ubuntu):
status: New → Fix Released
You-Sheng Yang (vicamo) wrote :

Verified linux version 5.3.0-43.36 from eoan-proposed.

tags: added: verification-done-eoan
removed: verification-needed-eoan
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers