Received: by 2002:a05:7412:8521:b0:e2:908c:2ebd with SMTP id t33csp1312427rdf; Sat, 4 Nov 2023 15:30:39 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEh3j57blRGy6f56G7GBjLl+OkQlvoE4HpcO9rnSx629pQw/sUNajRy5eRVu+29Dm2e4m+6 X-Received: by 2002:a05:6a21:6709:b0:133:f0b9:856d with SMTP id wh9-20020a056a21670900b00133f0b9856dmr26419415pzb.17.1699137038769; Sat, 04 Nov 2023 15:30:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1699137038; cv=none; d=google.com; s=arc-20160816; b=I2hna/6UTd2/PX4E02wBchiDmp0yAE3KiCljPJglhJ3UfEN3qahG7JEnPT7SqG2TpD L5l3uRey0IvYUUF6i9yDBTnLwSvq3E058h3JHPlsOtMx36inZZ5aNqxZIlc+QHhRNJpN qbGakWXDtFTK7HiESswCZ5eYoHJE4Yb0GJj8d1tGFM4Zw43QDt4xf0PN9AUq8jvGLldS kFg7CUJ8Wo0IwqQNAA2DWPDLsgQoTh3KTVPBJdA/l0lEHJkr6WE2psQx+MJ8LFMPXorX Ch8IvPf30aH70OYFa54YR5YL7872F7o/YKJSTOE9UaoDMDxrKiNFFS1isNR9e2VzA4mm rulQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=4mVaq6TgQahOJFgLhYpGrghxV+5IsAYvGj5HshVx0OY=; fh=ZF0B+MtKrnLeWk+ADo/j9AeTtgPP6OZxHHEtVuiaS08=; b=bB+trhuMiGrBb7x9tNPutE6twKlITv4SEuz84ULb83vKPOkhKYps95mtAvue2kNqc7 tLSTNepqBXEZy22AVxuVQPzIwB8uVGzUbArSOaOBMi84OrGAQdKSjkpMfKvF/GpPPq7n MCQ3vsChk+d9+55ZWtY/VKlgPDr+wb+N6feKtBFuznv7qWq7dDT0hlfV/A/CttKwLrfL utKhM2rFgcgPtS17bNpVD1mDabTz66/GRb3kTAe2RP7fpcpwV0uf1DUOP7vMppVM+hKi GoFuK0njpbs6OOPlhit6v5S1vB04mLvt662bCpGBHxNOx/UUJVKl92sV+nuAaFORQlRp igEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=aX5R7945; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id r38-20020a634426000000b005ae38be0cd2si4449744pga.835.2023.11.04.15.30.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 04 Nov 2023 15:30:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=aX5R7945; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 2E88B807C6FC; Sat, 4 Nov 2023 15:30:36 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230046AbjKDWa1 (ORCPT + 99 others); Sat, 4 Nov 2023 18:30:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53378 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229577AbjKDWa0 (ORCPT ); Sat, 4 Nov 2023 18:30:26 -0400 Received: from mail-pj1-x102e.google.com (mail-pj1-x102e.google.com [IPv6:2607:f8b0:4864:20::102e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CFBFDBD; Sat, 4 Nov 2023 15:30:23 -0700 (PDT) Received: by mail-pj1-x102e.google.com with SMTP id 98e67ed59e1d1-2809748bdb0so616862a91.0; Sat, 04 Nov 2023 15:30:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1699137023; x=1699741823; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=4mVaq6TgQahOJFgLhYpGrghxV+5IsAYvGj5HshVx0OY=; b=aX5R7945xZIzt/JzZRhUfeLecg8PTbzuEozvlzhh50PPJsjb46kR/Gqvt27SAUrZkq 5dKQTPt9x4veop+4OYbCz4cRdt6cpYs9xLeTqZMI4MnFowkPHO5yveXTAhrAm19KmULx +IHe3GA4z6KDocgKie+AFNADodknYrxldQsip8rnidjTZKkrqWKZl2RnUsyUYd3raRxy +UfySibSserjonRKfPz0W7fWF6cnd5fJERoDVHwUtQJOhBa9Ql03JgDalsdlWmGsM3Od RH3vuQAfxlJiiMsb1qRp8eIYdQJQm26UNIZsf5aen1Qby2Bqa5I6ekptVw/sNDBhVsCt +xUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699137023; x=1699741823; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=4mVaq6TgQahOJFgLhYpGrghxV+5IsAYvGj5HshVx0OY=; b=r8PzbdcngID9WDsH5dya1qmQxctss1ZWnhfKlDjNtxXqzgD98t6lGDA/pKZR5v5MYN nERLmTMQSECnA9QpQVoIYoxHjC0/TT+LmOP4+RYSIwJbj9UZq/eg9EIVErlBp59CXSPU /22aRF2stJdHxz/KGPskBfhAgQNFYin1+UVMxyUpK5fDBO2TNgRks8rSEGuMyeP34Z3D 754fRn7xvQKZnQaqbRW5p3s58kY5VKyVCoIEuZ4OBtugLDno0wDIGkbiOKgAdolptNFY 9nL9oRgGlPjqBIZ3I53Bf0ziX2xIfjEIoV/NcXyYS2tACy4L8LFaECVR04/PPoDZB5zx skkw== X-Gm-Message-State: AOJu0YzSyTUH8DYv1Hu1YQpg+SIeG62nrZyG2tG48EN/P6HAwjQfz9kM ulhD35e0zzik2EcrmsAXUdd8gRnQh6/3EwY8CCM= X-Received: by 2002:a17:90b:3597:b0:274:60c7:e15a with SMTP id mm23-20020a17090b359700b0027460c7e15amr24795883pjb.4.1699137023260; Sat, 04 Nov 2023 15:30:23 -0700 (PDT) MIME-Version: 1.0 References: <20231102082406.1555227-1-nathan@nathanrossi.com> In-Reply-To: <20231102082406.1555227-1-nathan@nathanrossi.com> From: Fabio Estevam Date: Sat, 4 Nov 2023 19:30:11 -0300 Message-ID: Subject: Re: [PATCH] arm64: dts: imx8mp: imx8mq: Add parkmode-disable-ss-quirk on DWC3 To: Nathan Rossi Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Nathan Rossi , Li Jun , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , NXP Linux Team Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Sat, 04 Nov 2023 15:30:36 -0700 (PDT) Hi Nathan, Thanks for your fix. On Thu, Nov 2, 2023 at 5:24=E2=80=AFAM Nathan Rossi wrote: > > From: Nathan Rossi > > The i.MX8MP and i.MX8MQ devices both use the same DWC3 controller and > are both affected by a known issue with the controller due to specific > behaviour when park mode is enabled in SuperSpeed host mode operation. > > Under heavy USB traffic from multiple endpoints the controller will > sometimes incorrectly process transactions such that some transactions > are lost, or the controller may hang when processing transactions. When > the controller hangs it does not recover. > > This issue is documented partially within the linux-imx vendor kernel > which references a Synopsys STAR number 9001415732 in commits [1] and > additional details in [2]. Those commits provide some additional > controller internal implementation specifics around the incorrect > behaviour of the SuperSpeed host controller operation when park mode is > enabled. > > The summary of this issue is that the host controller can incorrectly > enter/exit park mode such that part of the controller is in a state > which behaves as if in park mode even though it is not. In this state > the controller incorrectly calculates the number of TRBs available which > results in incorrect access of the internal caches causing the overwrite > of pending requests in the cache which should have been processed but > are ignored. This can cause the controller to drop the requests or hang > waiting for the pending state of the dropped requests. > > The workaround for this issue is to disable park mode for SuperSpeed > operation of the controller through the GUCTL1[17] bit. This is already > available as a quirk for the DWC3 controller and can be enabled via the > 'snps,parkmode-disable-ss-quirk' device tree property. > > It is possible to replicate this failure on an i.MX8MP EVK with a USB > Hub connecting 4 SuperSpeed USB flash drives. Performing continuous > small read operations (dd if=3D/dev/sd... of=3D/dev/null bs=3D16) on the = block > devices will result in device errors initially and will eventually > result in the controller hanging. > > [13240.896936] xhci-hcd xhci-hcd.0.auto: WARN Event TRB for slot 4 ep 2= with no TDs queued? > [13240.990708] usb 2-1.3: reset SuperSpeed USB device number 5 using xh= ci-hcd > [13241.015582] sd 2:0:0:0: [sdc] tag#0 UNKNOWN(0x2003) Result: hostbyte= =3D0x07 driverbyte=3DDRIVER_OK cmd_age=3D0s > [13241.025198] sd 2:0:0:0: [sdc] tag#0 CDB: opcode=3D0x28 28 00 00 00 0= 3 e0 00 01 00 00 > [13241.032949] I/O error, dev sdc, sector 992 op 0x0:(READ) flags 0x807= 00 phys_seg 25 prio class 2 > [13272.150710] usb 2-1.2: reset SuperSpeed USB device number 4 using xh= ci-hcd > [13272.175469] sd 1:0:0:0: [sdb] tag#0 UNKNOWN(0x2003) Result: hostbyte= =3D0x03 driverbyte=3DDRIVER_OK cmd_age=3D31s > [13272.185365] sd 1:0:0:0: [sdb] tag#0 CDB: opcode=3D0x28 28 00 00 00 0= 3 e0 00 01 00 00 > [13272.193385] I/O error, dev sdb, sector 992 op 0x0:(READ) flags 0x807= 00 phys_seg 18 prio class 2 > [13434.846556] xhci-hcd xhci-hcd.0.auto: xHCI host not responding to st= op endpoint command > [13434.854592] xhci-hcd xhci-hcd.0.auto: xHCI host controller not respo= nding, assume dead > [13434.862553] xhci-hcd xhci-hcd.0.auto: HC died; cleaning up > > [1] https://github.com/nxp-imx/linux-imx/commit/97a5349d936b08cf301730b59= e4e8855283f815c > [2] https://github.com/nxp-imx/linux-imx/commit/b4b5cbc5a12d7c3b920d1d7cb= a0ada3379e4e42b It is a shame that NXP fixed it only in their vendor tree and kept mainline with the issue. This deserves a Fixes tag so that it can be backported to stable kernels. Reviewed-by: Fabio Estevam Thanks