From patchwork Mon Aug 30 15:13:32 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Juerg Haefliger X-Patchwork-Id: 1522258 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=canonical.com header.i=@canonical.com header.a=rsa-sha256 header.s=20210705 header.b=ZIXB3J9X; dkim-atps=neutral Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4Gyv4P494dz9sWX; Tue, 31 Aug 2021 01:14:28 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1mKizR-0004SN-1A; Mon, 30 Aug 2021 15:14:25 +0000 Received: from smtp-relay-internal-1.internal ([10.131.114.114] helo=smtp-relay-internal-1.canonical.com) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1mKiz9-0004Qi-Jz for kernel-team@lists.ubuntu.com; Mon, 30 Aug 2021 15:14:07 +0000 Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-1.canonical.com (Postfix) with ESMTPS id 76D2E4017A for ; Mon, 30 Aug 2021 15:14:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1630336447; bh=4MODQDIPTyvWXWagw3famdx3qbhbMszqSJt9Dpx1274=; h=From:To:Subject:Date:Message-Id:MIME-Version:Content-Type; b=ZIXB3J9XqhkYBrDDBtbw5mOP6swpG/P/7Rd6yz0UnlAHGtTQzKi2DkBJ3xGQy6XK1 xo+NM5ySegBliYJDwk1rVJl/ve6X7CejmUd7CLZP0LVHqvlfoxAEJEMrNO2A2x9efh rp9JtrbBok4XXyENwQJXhBtJRHCUMk2o+IBpq56YFangVIOUOKjA6ZKEitgkpphd0D KCTF8lPLoAoRqmOxggK7p1DwbKLGh27rTFdzw0NrpEyGWDta//gznxw2oCE1bQgLbN UMzHVwyEC6FENgxDAsk2Jd8AIkHeVF1HU5KbBrMPFX6ehRUjpkw0e9pkW3aH5LuvtD js3yGzUKdRnJQ== Received: by mail-wr1-f69.google.com with SMTP id b7-20020a5d4d87000000b001575d1053d2so3379312wru.23 for ; Mon, 30 Aug 2021 08:14:07 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=4MODQDIPTyvWXWagw3famdx3qbhbMszqSJt9Dpx1274=; b=fFocaF01ERNR4y+eurOB0ULVJzLjlOhz0G30vtf0jtQnX0GYRgJ0XeDkEReWdBp8gb JlID10R/7bKzuLtOzKmx/85JJPwThlTN0EuGRkLT6nmCxYm+hpd1kMEfxWU/r7GrXddU YSaxbclZSkTR448QRPv2x7bKUqg/gv1LVmQTZZHdRI56yifdjezMpB9VzhHz5z377hc9 /QWWG+5IwZh+KneWmwRjtojSieJWkVh2oEdQe2Xzq2he7tMOM9U22TfhKS3p8/L/4foG ekl9WwSJm1E52w1DVvsD28d9MJCa6K1cQZQULW7zjeTqkhPBzbHQrT6mQpLswinx5zQh sCaQ== X-Gm-Message-State: AOAM531X7XEaqJDQrvaFA4ltTIEar80TF4C+rib6eOMGMVj5cJhpRasb +9Z6KlD4JtCD4cC85hFl8UAPVgNW7MnBxw79iK/lWsjjuhg4WDu7QNfKswNmbLt3IS3Z1I6mqPU gOEFp+w9NKd3xPD4Ot7NZLFhMFC9gcDQilWvvlo5p/Q== X-Received: by 2002:a1c:f206:: with SMTP id s6mr33138024wmc.15.1630336447078; Mon, 30 Aug 2021 08:14:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwHQRbIiln2Djmdn1LfbTT3j8lKUJaLJ2qPUHk9LlhJefBsLBpf0Y9PX0wBa+asIWvosIC4mA== X-Received: by 2002:a1c:f206:: with SMTP id s6mr33137991wmc.15.1630336446791; Mon, 30 Aug 2021 08:14:06 -0700 (PDT) Received: from gollum.fritz.box ([194.191.244.86]) by smtp.gmail.com with ESMTPSA id b62sm9188666wmb.17.2021.08.30.08.14.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Aug 2021 08:14:06 -0700 (PDT) From: Juerg Haefliger X-Google-Original-From: Juerg Haefliger To: kernel-team@lists.ubuntu.com Subject: [SRU][I/raspi][PATCH 0/2] Raspberry pi 4 USB controller randomly crashes (LP: #1930629) Date: Mon, 30 Aug 2021 17:13:32 +0200 Message-Id: <20210830151334.288681-1-juergh@canonical.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" [ Impact ] USB disks attached to a Pi experience something like: [ 494.062055] sd 2:0:0:0: [sda] tag#12 uas_eh_abort_handler 0 uas-tag 1 inflight: CMD [ 494.069923] sd 2:0:0:0: [sda] tag#12 CDB: Write(10) 2a 00 00 02 6d 4f 00 00 48 00 [ 499.182085] sd 2:0:0:0: [sda] tag#13 uas_eh_abort_handler 0 uas-tag 2 inflight: CMD OUT [ 499.190310] sd 2:0:0:0: [sda] tag#13 CDB: Write(10) 2a 00 00 02 6d 97 00 00 4d 00 [ 504.302113] sd 2:0:0:0: [sda] tag#19 uas_eh_abort_handler 0 uas-tag 5 inflight: CMD OUT [ 504.310336] sd 2:0:0:0: [sda] tag#19 CDB: Write(10) 2a 00 00 00 95 da 00 00 01 00 And: [ 535.538311] scsi host2: uas_eh_device_reset_handler start [ 535.544699] xhci_hcd 0000:01:00.0: WARN Set TR Deq Ptr cmd failed due to incorrect slot or ep state. [ 535.554032] xhci_hcd 0000:01:00.0: WARN Set TR Deq Ptr cmd failed due to incorrect slot or ep state. [ Test Case ] See below. [ Where Problems Could Occur ] Modifications are limited to the USB host xhci driver so problems will likely show up when accessing devices that use this host driver. [ Original Description ] My raspberry pi 4 running Ubuntu 20.04 server is constantly having trouble the the usb controller. I have 2 externally powered USB hubs connected that have a few HDDs plugged in. After a seemingly random amount of time (between 1 minute and 2 days) the usb controller will crash completely. No USB devices are detected anymore after that, i have to reboot the system. I have tried: * Providing a lot of cooling (metal case + desktop size fan) * Switching the USB Hubs to a different brand * Switching the power supply of the USB hubs * Switching the power supply of the raspberry Nothing helped, so i concluded that this probably is a kernel bug. I think the USB controller should not crash at the very least. I've attached my dmesg. lsb_release -rd   Description: Ubuntu 20.04.2 LTS   Release: 20.04 linux-raspi version: 5.4.0.1035.70 uname -a   Linux pi 5.4.0-1035-raspi #38-Ubuntu SMP PREEMPT Tue Apr 20 21:37:03 UTC 2021 aarch64 aarch64 aarch64 GNU/Linux lsusb (after crash)   Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub   Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Acked-by: Tim Gardner Acked-by: Kleber Sacilotto de Souza --- ProblemType: Bug AlsaVersion: Advanced Linux Sound Architecture Driver Version k5.4.0-1035-raspi. AplayDevices: Error: [Errno 2] No such file or directory: 'aplay' ApportVersion: 2.20.11-0ubuntu27.18 Architecture: arm64 ArecordDevices: Error: [Errno 2] No such file or directory: 'arecord' AudioDevicesInUse: Error: command ['fuser', '-v', '/dev/snd/by-path', '/dev/snd/controlC0', '/dev/snd/pcmC0D0p', '/dev/snd/seq', '/dev/snd/timer'] failed with exit code 1: Card0.Amixer.info: Error: [Errno 2] No such file or directory: 'amixer' Card0.Amixer.values: Error: [Errno 2] No such file or directory: 'amixer' CasperMD5CheckResult: skip DistroRelease: Ubuntu 20.04 ImageMediaBuild: 20210201.1 IwConfig: Error: [Errno 2] No such file or directory: 'iwconfig' Lspci-vt: -[0000:00]---00.0-[01]----00.0 VIA Technologies, Inc. VL805 USB 3.0 Host Controller Lsusb:  Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub  Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Lsusb-t:  /: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 5000M  /: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/1p, 480M Package: linux-raspi PackageArchitecture: arm64 PciMultimedia: ProcEnviron:  TERM=xterm-256color  PATH=(custom, no user)  LANG=C.UTF-8  SHELL=/bin/bash ProcFB: ProcKernelCmdLine: coherent_pool=1M 8250.nr_uarts=1 snd_bcm2835.enable_compat_alsa=0 snd_bcm2835.enable_hdmi=1 bcm2708_fb.fbwidth=0 bcm2708_fb.fbheight=0 bcm2708_fb.fbswap=1 smsc95xx.macaddr=E4:5F:01:1D:06:FE vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000 net.ifnames=0 dwc_otg.lpm_enable=0 console=ttyS0,115200 console=tty1 root=LABEL=writable rootfstype=ext4 elevator=deadline rootwait fixrtc quiet splash ProcVersionSignature: Ubuntu 5.4.0-1035.38-raspi 5.4.106 RelatedPackageVersions:  linux-restricted-modules-5.4.0-1035-raspi N/A  linux-backports-modules-5.4.0-1035-raspi N/A  linux-firmware 1.187.12 RfKill: Error: [Errno 2] No such file or directory: 'rfkill' StagingDrivers: bcm2835_isp bcm2835_v4l2 bcm2835_mmal_vchiq bcm2835_codec snd_bcm2835 vc_sm_cma Tags: arm64-image raspi-image focal uec-images staging Uname: Linux 5.4.0-1035-raspi aarch64 UpgradeStatus: No upgrade log present (probably fresh install) UserGroups: N/A _MarkForUpload: True acpidump: Jonathan Bell (2): usb: xhci: workaround for bogus SET_DEQ_PENDING endpoint state xhci: guard accesses to ep_state in xhci_endpoint_reset() drivers/usb/host/xhci-ring.c | 6 +++--- drivers/usb/host/xhci.c | 5 +++++ 2 files changed, 8 insertions(+), 3 deletions(-)