Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp5295293rwp; Mon, 17 Jul 2023 01:07:43 -0700 (PDT) X-Google-Smtp-Source: APBJJlGDJ3RXu4RlN4sD+ldv3nnT5UZXU6fUtaQPSnDWQ+Bk1AW3A0xbH7YOfFKJBBd3Yx5ld0Hy X-Received: by 2002:a05:6e02:12ee:b0:348:8eb9:6231 with SMTP id l14-20020a056e0212ee00b003488eb96231mr621084iln.10.1689581242900; Mon, 17 Jul 2023 01:07:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689581242; cv=none; d=google.com; s=arc-20160816; b=AH/tOQq2M7d0Ws1118ui9yj/GaG6zeZlf0n8H4Suz/ThCAn5EQqtHNNCoZFSDiG0Dl 1Zq0kFUcIfe+1uf8P1agOJkKtGh7W6MjejDmquCzXk6+ICfWZZ3tQ1yJ5DxjVae9CpDh ATxt1khM53+7lzgk8dKtzwP0PN3lf6pVRUyAN4SYcVYmm01To4bLin6uci7gUCH4QSAz h9frdPXJOuwLXUSG654WCTcNqxBsRQQ++GNHXxKDx3nxlfV95UjawYlMy6lWT9HlGLqy a5VFRm9yRu1PVSp7DHQx0vOmrbO7DHh25xA/F3L5CcZQyAY+LkRhH/hcpzoOcmxohedJ TIYA== 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=3gAfaAKrcJgIAcFAT2kE7R0UfBXH+B9pPbdV57Y5Wuk=; fh=aEIGgCzoO+DV4De8hAeU0wUjXVO4Epi5DZeCtdzzfqM=; b=Yo1BRoHpA6Tif3UCOQNoAYC3ovznWAfOhCsf7pcleZp1cNSjxEkPx4nG3yfIIGMVuM H471dKbYI28RXsZIS4v5PLnOdkxVO74NBQJ6xEtuZ9edD0jsH1LU9G/7m/9nJNVemlw0 WYxBdP2TiYw4Go9ebHE4iVesnmpAG7y8nuN8a6I534QinzR1vXdFAOUmJkgXvXMGzQar 4z0jbYZiu0IRoLk7UD8TGVRfi5fEAvrZ+HZI4xIgj70QOjYg2Bax8JMT6w7/f2X8OnCW U0LiGXP6ti5aGV+Huy8RIBYCYvBrqkT3CQ7s007IqVA2kr1FswcLlEmTwn/Y64BD/9mr dZYw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@canonical.com header.s=20210705 header.b=iy8tUaMF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=canonical.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s20-20020a63e814000000b00553a56f7b31si11307679pgh.330.2023.07.17.01.07.11; Mon, 17 Jul 2023 01:07:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@canonical.com header.s=20210705 header.b=iy8tUaMF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=canonical.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229825AbjGQHrm (ORCPT + 99 others); Mon, 17 Jul 2023 03:47:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49030 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229752AbjGQHrj (ORCPT ); Mon, 17 Jul 2023 03:47:39 -0400 Received: from smtp-relay-internal-1.canonical.com (smtp-relay-internal-1.canonical.com [185.125.188.123]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C8A021992 for ; Mon, 17 Jul 2023 00:47:19 -0700 (PDT) Received: from mail-oo1-f70.google.com (mail-oo1-f70.google.com [209.85.161.70]) (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 12E233F202 for ; Mon, 17 Jul 2023 07:47:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1689580038; bh=3gAfaAKrcJgIAcFAT2kE7R0UfBXH+B9pPbdV57Y5Wuk=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=iy8tUaMF6mIyILPq+D7VR6/9yi8oC90Tc/h3Sdtbzj1xqvkCOPNdxM6Gi813fviW5 5kpPeMWKtzFK0AiznlpbUIqxyY5TVfTijcJWuAUS9rl+hyel+QXwMPl+qZqqN2tt+f Iey7Fqj9/x8F6CVRiL2Secgz5/298PL3yHEb6guRfkAUIl1vfokSbuIS5RsRpvYH2e j1oYYP2Rodp7F48B3MmtZN4utUKtT8fHmvqzlVjFC87eHqomUr6tnycpTqG/JMSfAa DKrVNlkSykyHYv6DVAg9QLQY2JV5IbJxWOLd5X2f/Ay35dxm5+DTcb1vJh9qce3C8S x04SCXhU3cGow== Received: by mail-oo1-f70.google.com with SMTP id 006d021491bc7-565dd317fe8so5556355eaf.0 for ; Mon, 17 Jul 2023 00:47:18 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689580036; x=1692172036; 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=3gAfaAKrcJgIAcFAT2kE7R0UfBXH+B9pPbdV57Y5Wuk=; b=BIVx9yXJjcm3xtaNyrE/YWvuquVirqhoHhEUjLjOrxQbIIU1Cu1MVslMtWXrBA/Vsn UwmSk3CHG+VO6plm0CggKaw37ZPSbPr8EwciIkI+tcipzrri0WZjVwSIwyOmzS5wL2uT uF1wR+PkI+15XLT5bECnNB16pK624U5rMn5YPsuvBHIkdIDAfKzENZzITICD7F0CZCvV kEdw9d8ld9d6hRnuSgW4+BgPps4KDbu+wy3Ywbif+HDFlHKYx5qM/fwA6Sek+bSiEHbz GcLwpXerSjUueIlqLRVeDBo1hm4UDwK3K1ZbNn5cOJdCx/xjqxGXjzVO6L+RKQXPheCE U56w== X-Gm-Message-State: ABy/qLY8ZMkZoqeEFjdIQXNrV4RWAtcEgCMByrCP/GbsjdNmdlFX+SMS ERChBnsvB1Vs2yuTwybNeKphbohs/gkobwI3/2wifZ/X06lDtDUYrM4Koc8iph7HWgGqXQeM5yE eCWdgEqrkygPUa8oKt1pDcBHLQu4mtsjqZvcXeLf0SlBKsaxGIdazuZQteg== X-Received: by 2002:a05:6358:4291:b0:133:291:f9ac with SMTP id s17-20020a056358429100b001330291f9acmr8421582rwc.25.1689580035728; Mon, 17 Jul 2023 00:47:15 -0700 (PDT) X-Received: by 2002:a05:6358:4291:b0:133:291:f9ac with SMTP id s17-20020a056358429100b001330291f9acmr8421558rwc.25.1689580035356; Mon, 17 Jul 2023 00:47:15 -0700 (PDT) MIME-Version: 1.0 References: <874jm6nsd0.fsf@intel.com> <20230715191216.GA364070@bhelgaas> In-Reply-To: <20230715191216.GA364070@bhelgaas> From: Kai-Heng Feng Date: Mon, 17 Jul 2023 15:47:04 +0800 Message-ID: Subject: Re: [Intel-wired-lan] [PATCH v2] igc: Ignore AER reset when device is suspended To: Bjorn Helgaas Cc: Vinicius Costa Gomes , Tony Luck , Kees Cook , linux-pci@vger.kernel.org, jesse.brandeburg@intel.com, linux-kernel@vger.kernel.org, "Guilherme G . Piccoli" , Eric Dumazet , netdev@vger.kernel.org, anthony.l.nguyen@intel.com, linux-hardening@vger.kernel.org, intel-wired-lan@lists.osuosl.org, Jakub Kicinski , Paolo Abeni , "David S. Miller" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Jul 16, 2023 at 3:12=E2=80=AFAM Bjorn Helgaas = wrote: > > On Fri, Jul 14, 2023 at 01:35:55PM -0700, Vinicius Costa Gomes wrote: > > Bjorn Helgaas writes: > > > On Fri, Jul 14, 2023 at 01:05:41PM +0800, Kai-Heng Feng wrote: > > >> When a system that connects to a Thunderbolt dock equipped with I225= , > > >> like HP Thunderbolt Dock G4, I225 stops working after S3 resume: > > >> ... > > > > > >> The issue is that the PTM requests are sending before driver resumes= the > > >> device. Since the issue can also be observed on Windows, it's quite > > >> likely a firmware/hardware limitation. > > > > > > Does this mean we didn't disable PTM correctly on suspend? Or is the > > > device defective and sending PTM requests even though PTM is disabled= ? > > > > The way I understand the hardware bug, the device is defective, as you > > said, the device sends PTM messages when "busmastering" is disabled. > > Bus Master Enable controls the ability of a Function to issue Memory > and I/O Read/Write Requests (PCIe r6.0, sec 7.5.1.1.3). PTM uses > Messages, and I don't think they should be affected by Bus Master > Enable. > > I also don't understand the I225 connection. We have these > Uncorrected Non-Fatal errors: > > > >> [ 606.527931] pcieport 0000:00:1d.0: AER: Multiple Uncorrected (Non= -Fatal) error received: 0000:00:1d.0 > > >> [ 606.528064] pcieport 0000:00:1d.0: PCIe Bus Error: severity=3DUnc= orrected (Non-Fatal), type=3DTransaction Layer, (Requester ID) > > >> [ 606.528068] pcieport 0000:00:1d.0: device [8086:7ab0] error sta= tus/mask=3D00100000/00004000 > > >> [ 606.528072] pcieport 0000:00:1d.0: [20] UnsupReq = (First) > > >> [ 606.528075] pcieport 0000:00:1d.0: AER: TLP Header: 34000000 0a= 000052 00000000 00000000 > > >> [ 606.528079] pcieport 0000:00:1d.0: AER: Error of this Agent is = reported first > > >> [ 606.528098] pcieport 0000:04:01.0: PCIe Bus Error: severity=3DUnc= orrected (Non-Fatal), type=3DTransaction Layer, (Requester ID) > > >> [ 606.528101] pcieport 0000:04:01.0: device [8086:1136] error sta= tus/mask=3D00300000/00000000 > > >> [ 606.528105] pcieport 0000:04:01.0: [20] UnsupReq = (First) > > >> [ 606.528107] pcieport 0000:04:01.0: [21] ACSViol > > >> [ 606.528110] pcieport 0000:04:01.0: AER: TLP Header: 34000000 04= 000052 00000000 00000000 > > They are clearly Unsupported Request errors caused by PTM Requests > (decoding at https://bugzilla.kernel.org/show_bug.cgi?id=3D216850#c9), > but they were logged by 00:1d.0 and 04:01.0. > > The hierarchy is this: > > 00:1d.0 Root Port to [bus 03-6c] > 03:00.0 Switch Upstream Port to [bus 04-6c] > 04:01.0 Switch Downstream Port to [bus 06-38] > 06:00.0 Switch Upstream Port to [bus 07-38] > 07:04.0 Switch Downstream Port to [bus 38] > 38:00.0 igc I225 NIC > > If I225 sent a PTM request when it shouldn't have, i.e., when 07:04.0 > didn't have PTM enabled, the error would have been logged by 07:04.0. > > The fact that the errors were logged by 00:1d.0 and 04:01.0 means that > they were caused by PTM requests from 03:00.0 and 06:00.0. OK, so the PTM is actually fired by the Thunderbolt switch. That means the I225 reset is collateral damage. Let me see if I can reproduce the UR PTM with other devices. Kai-Heng > > Bjorn