From patchwork Mon Aug 30 15:16:28 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Juerg Haefliger X-Patchwork-Id: 1522260 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=I6y+CTI0; 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 4Gyv7X5lyFz9sWS; Tue, 31 Aug 2021 01:17:12 +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 1mKj24-0004w9-Tm; Mon, 30 Aug 2021 15:17:08 +0000 Received: from smtp-relay-internal-0.internal ([10.131.114.225] helo=smtp-relay-internal-0.canonical.com) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1mKj1z-0004sQ-JR for kernel-team@lists.ubuntu.com; Mon, 30 Aug 2021 15:17:03 +0000 Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) (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-0.canonical.com (Postfix) with ESMTPS id 77AF1406F6 for ; Mon, 30 Aug 2021 15:17:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1630336623; bh=4MODQDIPTyvWXWagw3famdx3qbhbMszqSJt9Dpx1274=; h=From:To:Subject:Date:Message-Id:MIME-Version:Content-Type; b=I6y+CTI0ifnTKwau3LcX1g+mhLjLuUQOtUy/FuthEOaa7DEDc400TypH86wYrYM35 YLoHclzuNdN9gpRp1eVTc9Q41whRax50hyEDV3c/hH7qQW1tAW40J6gyW+UnqYn4qu 9KP7buzVR4iEeZV6nAJKczbQnzU4ENObhU6xIQTmODMsP831by+17xseLL0wBejh8i beQwSxcZ38OgV+deoYHHciQynIEClI/h1X9rD62M868sa8fn3ifvMV5Xbw7oagErxy NWbcMEaLuN0sUtVXCbNtuSgN63n8dF3Qj+WCD3l53+seZXCwa23QkawTtkiz7omQ5I zeJYVdFEZBTKw== Received: by mail-wm1-f71.google.com with SMTP id u14-20020a7bcb0e0000b0290248831d46e4so106522wmj.6 for ; Mon, 30 Aug 2021 08:17:03 -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=jVc+tAl0HL00PDFB6WMn63lqQNjfK4UzihnFlDNvqrNAYdm6H5JEGt/cRjs4/l3NcA Ut3A9Bman8aX+Sc0GvrDBY8+U3ZgguywJYfNccGwVUEXDKiD2O7Gzf4KHnpQX8dDL3Nq XRkYSFDOzFD4gjDWKkDiWXp7CSEzAuhPCIAK4AhxtnGKo0sg0xSzebcB9XvyCHSQ6Ric nRjDCp5wXlTQNh9ZXXUd5bMo4Zx7vOtaTXiAnUndb0hrlgVJUlvC23BRkPTcd07gDDkw aXAov1r7VhLmbKPeW2qObXL9i2+Y/vBm53fttw+jQFeflDFZTAIoOiyQ1eOd3oxRfp2z Uxsw== X-Gm-Message-State: AOAM533LcB24IIRiehfi/jQUMVdAUsPnoLTnueIp/Aejx9zKvur5ySZW OVPv+7TDXYU4yaDUqxgoiOuM1WYo8k+xpJ7pYPWqfy2qqzT1XqcX/n+7AI+5XBviUtWYbXwnHsn /h0Z2943dBToMchia1vFWt7kyUcbINLay5w21Q3uFkQ== X-Received: by 2002:adf:eb4a:: with SMTP id u10mr25894005wrn.11.1630336623110; Mon, 30 Aug 2021 08:17:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy6ucLLmuDBKnuHKMtLKPGNBbkKVvouZLF5O9CccZCcm9CBT4cjKVgh97OhNHaG1oDnV+x/0Q== X-Received: by 2002:adf:eb4a:: with SMTP id u10mr25893976wrn.11.1630336622853; Mon, 30 Aug 2021 08:17:02 -0700 (PDT) Received: from gollum.fritz.box ([194.191.244.86]) by smtp.gmail.com with ESMTPSA id n1sm15378527wrp.49.2021.08.30.08.17.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Aug 2021 08:17:02 -0700 (PDT) From: Juerg Haefliger X-Google-Original-From: Juerg Haefliger To: kernel-team@lists.ubuntu.com Subject: [SRU][F/raspi][H/raspi][PATCH 0/2] Raspberry pi 4 USB controller randomly crashes (LP: #1930629) Date: Mon, 30 Aug 2021 17:16:28 +0200 Message-Id: <20210830151630.289267-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(-)