Reapply "usb: handle warm-reset port requests on hub resume"

Bug #1859873 reported by dann frazier on 2020-01-15
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Undecided
Unassigned
Bionic
Undecided
Matthew Ruffell
Disco
Undecided
Unassigned
Eoan
Undecided
Unassigned

Bug Description

BugLink: https://bugs.launchpad.net/bugs/1859873

[Impact]

We wish to reapply "usb: handle warm-reset port requests on hub resume".

We reverted "usb: handle warm-reset port requests on hub resume" from the Ubuntu kernels due to a perceived regression it introduced (bug 1856608).

Only one customer saw this regression, and only in very specific systems. We have now determined that the root cause of the regression was that the systems used defective USB cables, which had Tx and Rx lines mixed up.

Signals were being sent down the wrong wires, placing the USB devices into a SS_INVALID link state, and this patch simply revealed the problems going on in the USB3 subsystem. USB3 devices never worked with these cables, but for some reason USB2 worked, which led to the long drawn out debugging timeframe.

We have confirmation from device hardware teams that USB cables on affected systems have their Tx and Rx wires mixed up, and this has also been confirmed by the USB cable manufacturer that these cables are a bad batch.

New USB cables fix the problem, and "usb: handle warm-reset port requests on hub resume" is safe to reapply.

[Fix]

We reapply upstream commit:

commit 4fdc1790e6a9ef22399c6bc6e63b80f4609f3b7e
Author: Jan-Marek Glogowski <email address hidden>
Date: Fri Feb 1 13:52:31 2019 +0100
Subject: usb: handle warm-reset port requests on hub resume

To the Bionic and Eoan kernels.

This commit fixes a real problem for users of a particular external hard disk, so it has value for Ubuntu users, and we do not want to diverge from upstream stable patches.

[Testcase]

For users with defective non-complaint USB cables:

dmesg | grep "Cannot enable"

For users with a particular USB-C external hard disk:

The disk will work as expected when it is plugged in.

[Regression Potential]

If any users in the community happen to use USB cables with Tx and Rx lines mixed up, they may see messages like:

"usb usb2-port2: Cannot enable. Maybe the USB cable is bad?"

These users need to swap out their USB cables for a non-defective one.

The commit landed in 5.1, and was backported to all stable kernels. As of 5.8-rc6, the commit is still in place, and has no fixup commits. I believe that re-introducing this commit will not cause any regressions for users with USB compliant hardware.

dann frazier (dannf) on 2020-01-15
Changed in linux (Ubuntu Bionic):
status: New → Confirmed
Changed in linux (Ubuntu Disco):
status: New → Confirmed
Changed in linux (Ubuntu Eoan):
status: New → Confirmed
Changed in linux (Ubuntu Focal):
status: New → Confirmed
Steve Langasek (vorlon) on 2020-07-02
Changed in linux (Ubuntu Disco):
status: Confirmed → Won't Fix
no longer affects: linux (Ubuntu Focal)
Changed in linux (Ubuntu):
status: Confirmed → Fix Released
Changed in linux (Ubuntu Bionic):
status: Confirmed → In Progress
Changed in linux (Ubuntu Eoan):
status: Confirmed → In Progress
description: updated
description: updated
tags: added: sts
Changed in linux (Ubuntu Bionic):
assignee: nobody → Matthew Ruffell (mruffell)
Changed in linux (Ubuntu Eoan):
assignee: nobody → Matthew Ruffell (mruffell)
Changed in linux (Ubuntu Eoan):
status: In Progress → Won't Fix
assignee: Matthew Ruffell (mruffell) → nobody
Changed in linux (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-bionic' to 'verification-done-bionic'. If the problem still exists, change the tag 'verification-needed-bionic' to 'verification-failed-bionic'.

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-bionic
Matthew Ruffell (mruffell) wrote :

The customer that suffered the perceived regression enabled -proposed and installed the 4.15.0-113-generic kernel to their Bionic test machine.

This test machine has had its non-spec complaint USB cable replaced with a fresh known good USB compliant cable.

The 4.15.0-113-generic kernel performed as expected. There were no long delays on boot, and no messages in dmesg about warm resets or bad cables.

From our perspective, the reapplication of the commit looks good, and does not cause regressions in this environment. Marking as verified.

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

This bug was fixed in the package linux - 4.15.0-115.116

---------------
linux (4.15.0-115.116) bionic; urgency=medium

  * bionic/linux: 4.15.0-115.116 -proposed tracker (LP: #1893055)

  * [Potential Regression] dscr_inherit_exec_test from powerpc in
    ubuntu_kernel_selftests failed on B/E/F (LP: #1888332)
    - powerpc/64s: Don't init FSCR_DSCR in __init_FSCR()

linux (4.15.0-114.115) bionic; urgency=medium

  * bionic/linux: 4.15.0-114.115 -proposed tracker (LP: #1891052)

  * ipsec: policy priority management is broken (LP: #1890796)
    - xfrm: policy: match with both mark and mask on user interfaces

linux (4.15.0-113.114) bionic; urgency=medium

  * bionic/linux: 4.15.0-113.114 -proposed tracker (LP: #1890705)

  * Packaging resync (LP: #1786013)
    - update dkms package versions

  * Reapply "usb: handle warm-reset port requests on hub resume" (LP: #1859873)
    - usb: handle warm-reset port requests on hub resume

  * Bionic update: upstream stable patchset 2020-07-29 (LP: #1889474)
    - gpio: arizona: handle pm_runtime_get_sync failure case
    - gpio: arizona: put pm_runtime in case of failure
    - pinctrl: amd: fix npins for uart0 in kerncz_groups
    - mac80211: allow rx of mesh eapol frames with default rx key
    - scsi: scsi_transport_spi: Fix function pointer check
    - xtensa: fix __sync_fetch_and_{and,or}_4 declarations
    - xtensa: update *pos in cpuinfo_op.next
    - drivers/net/wan/lapbether: Fixed the value of hard_header_len
    - net: sky2: initialize return of gm_phy_read
    - drm/nouveau/i2c/g94-: increase NV_PMGR_DP_AUXCTL_TRANSACTREQ timeout
    - irqdomain/treewide: Keep firmware node unconditionally allocated
    - SUNRPC reverting d03727b248d0 ("NFSv4 fix CLOSE not waiting for direct IO
      compeletion")
    - spi: spi-fsl-dspi: Exit the ISR with IRQ_NONE when it's not ours
    - IB/umem: fix reference count leak in ib_umem_odp_get()
    - uprobes: Change handle_swbp() to send SIGTRAP with si_code=SI_KERNEL, to fix
      GDB regression
    - ALSA: info: Drop WARN_ON() from buffer NULL sanity check
    - ASoC: rt5670: Correct RT5670_LDO_SEL_MASK
    - btrfs: fix double free on ulist after backref resolution failure
    - btrfs: fix mount failure caused by race with umount
    - btrfs: fix page leaks after failure to lock page for delalloc
    - bnxt_en: Fix race when modifying pause settings.
    - hippi: Fix a size used in a 'pci_free_consistent()' in an error handling
      path
    - ax88172a: fix ax88172a_unbind() failures
    - net: dp83640: fix SIOCSHWTSTAMP to update the struct with actual
      configuration
    - drm: sun4i: hdmi: Fix inverted HPD result
    - net: smc91x: Fix possible memory leak in smc_drv_probe()
    - bonding: check error value of register_netdevice() immediately
    - mlxsw: destroy workqueue when trap_register in mlxsw_emad_init
    - ipvs: fix the connection sync failed in some cases
    - i2c: rcar: always clear ICSAR to avoid side effects
    - bonding: check return value of register_netdevice() in bond_newlink()
    - serial: exar: Fix GPIO configuration for Sealevel cards based on XR17V35X
    - scripts/decode_stacktrace: strip basepath from all paths
    - HID: i...

Changed in linux (Ubuntu Bionic):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers