Received: by 2002:a05:7412:f690:b0:e2:908c:2ebd with SMTP id ej16csp396391rdb; Thu, 19 Oct 2023 07:36:12 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGQaIBeF37MSKqP4rTB3rGhWABVzmfvBG+ayZQeKZLVMwSYWI7HlOe/4Iw98ZeUMD20N3mw X-Received: by 2002:a05:6a20:2446:b0:152:be08:b013 with SMTP id t6-20020a056a20244600b00152be08b013mr2411182pzc.42.1697726171740; Thu, 19 Oct 2023 07:36:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697726171; cv=none; d=google.com; s=arc-20160816; b=XWzJPdaX/lrLVC3pGivxrmAl6bPsKmUO/fZ222owUeSt4sy30/OugXRvgaA/ej22tv +4GvNU5iE3fF1e/Vv37Bex/ROEw7B2/3hTSb2Gu284eqeyl4sriBb4UKDNQ4wlZTRQfl DofxsclBupEXx06juyGTfesFYk+LJpmUpVNTQWeJnNZGSVLxknBMhNCKw+RbpSi5yGBi Mz3T1ru/HXC3mSmnIh3CGH2EaDAnUa+0CfuQ4yN1gYCT101Qu0Aj+j2z/OsYIEq9qgls 2Wy7v37D8mVRS1uIQU88UtE3baxmYIYbncm3o7CoV+c4bkEZA1vHpxYKWajdTknn9xua DOpg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=P+PTUlhsE25RyoNuKBCfRe7nuB7Ck4rYHawTdQl8cmI=; fh=R5K7hII9wLE4ReWLuIEIOvNQcf639s/f/6Vk2NrhVYE=; b=NOFHEQgJldIphxQaCX00J+L/EENfhYoqpVirUtGenporML060xFLDdFWgjpxpJFb3h e51MXXa2uBzRPgwYsB5MMEXEk/EyuJdDAD5EfmuzWL6ZTnbophqOuryf3yUUwN29Nans fJvHqV+g/d7TB+VgkP3DZcO70Xbppw8p9BkPhOTSXMSkjpNTSSmvoaiui3vfy0MxVSRE Gx3keMY1ePhNegq7Rm8RJ2Xyb4JPqW0ZE08mvB99h868C/BZ5AH5zCcVdFHj6imzKWkZ MWeDLlOCg0rJDZO/y8FZzqIl8MjyYPM7a2WilTngVW0u9JFLK3/kqoYENesgw8swh8VM cVmA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id f11-20020a17090274cb00b001c62ca6d540si2308398plt.77.2023.10.19.07.36.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Oct 2023 07:36:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id B9A5F80A1453; Thu, 19 Oct 2023 07:35:43 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346172AbjJSOfR (ORCPT + 99 others); Thu, 19 Oct 2023 10:35:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40094 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346103AbjJSOfN (ORCPT ); Thu, 19 Oct 2023 10:35:13 -0400 Received: from bmailout2.hostsharing.net (bmailout2.hostsharing.net [83.223.78.240]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6EAFA132; Thu, 19 Oct 2023 07:35:11 -0700 (PDT) Received: from h08.hostsharing.net (h08.hostsharing.net [IPv6:2a01:37:1000::53df:5f1c:0]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "*.hostsharing.net", Issuer "RapidSSL Global TLS RSA4096 SHA256 2022 CA1" (verified OK)) by bmailout2.hostsharing.net (Postfix) with ESMTPS id 1BDC82800A261; Thu, 19 Oct 2023 16:35:04 +0200 (CEST) Received: by h08.hostsharing.net (Postfix, from userid 100393) id 113305F021; Thu, 19 Oct 2023 16:35:04 +0200 (CEST) Date: Thu, 19 Oct 2023 16:35:04 +0200 From: Lukas Wunner To: Ricky WU Cc: Kai-Heng Feng , "bhelgaas@google.com" , "linux-pm@vger.kernel.org" , "linux-mmc@vger.kernel.org" , Kees Cook , Tony Luck , "Guilherme G. Piccoli" , "linux-pci@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH] PCI: pciehp: Prevent child devices from doing RPM on PCIe Link Down Message-ID: <20231019143504.GA25140@wunner.de> References: <20231016040132.23824-1-kai.heng.feng@canonical.com> <20231016093210.GA22952@wunner.de> <263982e90fc046cf977ecb8727003690@realtek.com> <20231018094435.GA21090@wunner.de> <02ee7e47166a463d8d4e491b61cdd33f@realtek.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <02ee7e47166a463d8d4e491b61cdd33f@realtek.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.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 (howler.vger.email [0.0.0.0]); Thu, 19 Oct 2023 07:35:44 -0700 (PDT) On Thu, Oct 19, 2023 at 01:49:50AM +0000, Ricky WU wrote: > [ 0.267813] pci 0000:00:1c.0: [8086:a33c] type 01 class 0x060400 Cannon Lake PCH Root Port > [ 0.275241] pci 0000:01:00.0: [10ec:5261] type 00 class 0xff0000 > [ 0.275315] pci 0000:01:00.0: reg 0x10: [mem 0xa3b00000-0xa3b00fff] > [ 0.275782] pci 0000:01:00.0: supports D1 D2 > [ 0.275784] pci 0000:01:00.0: PME# supported from D1 D2 D3hot D3cold > [ 0.276490] pci 0000:00:1c.0: PCI bridge to [bus 01] Device below Root Port is initially a Realtek RTS5261 card reader. > [ 0.395968] pcieport 0000:00:1c.0: PME: Signaling with IRQ 122 > [ 0.396009] pcieport 0000:00:1c.0: pciehp: Slot #8 AttnBtn- PwrCtrl- MRL- AttnInd- PwrInd- HotPlug+ Surprise+ Interlock- NoCompl+ IbPresDis- LLActRep+ Root Port is hotplug-capable. > [ 43.180701] pcieport 0000:00:1c.0: pciehp: Slot(8): Link Down > [ 43.180709] pcieport 0000:00:1c.0: pciehp: Slot(8): Card not present > [ 44.403768] pcieport 0000:00:1c.0: pciehp: Slot(8): Card present > [ 44.403772] pcieport 0000:00:1c.0: pciehp: Slot(8): Link Up > [ 44.540631] pci 0000:01:00.0: [15b7:5007] type 00 class 0x010802 Card reader is unplugged and replaced by SanDisk SN530 NVMe SSD. > [ 51.682628] pcieport 0000:00:1c.0: pciehp: Slot(8): Link Down > [ 51.716800] nvme0n1: detected capacity change from 495050752 to 0 > [ 51.793382] pcieport 0000:00:1c.0: pciehp: Slot(8): Card present > [ 51.793392] pcieport 0000:00:1c.0: pciehp: Slot(8): Link Up > [ 51.928633] pci 0000:01:00.0: [10ec:5261] type 00 class 0xff0000 NVMe SSD replaced by the card reader again. > [ 54.872928] pcieport 0000:00:1c.0: pciehp: Slot(8): Link Down > [ 56.146581] pcieport 0000:00:1c.0: pciehp: Slot(8): Card present > [ 56.146584] pcieport 0000:00:1c.0: pciehp: Slot(8): Link Up > [ 56.284632] pci 0000:01:00.0: [15b7:5007] type 00 class 0x010802 Card reader replaced by NVMe SSD, second time. > [ 60.635845] pcieport 0000:00:1c.0: pciehp: Slot(8): Link Down > [ 60.676842] nvme0n1: detected capacity change from 495050752 to 0 > [ 60.748953] pcieport 0000:00:1c.0: pciehp: Slot(8): Card present > [ 60.748958] pcieport 0000:00:1c.0: pciehp: Slot(8): Link Up > [ 60.884619] pci 0000:01:00.0: [10ec:5261] type 00 class 0xff0000 NVMe SSD replaced by the card reader, second time. > [ 63.898861] pcieport 0000:00:1c.0: pciehp: Slot(8): Link Down > [ 63.912118] BUG: unable to handle page fault for address: ffffb24d403e5010 Card reader replaced with NVMe SSD, third time. So it took three tries to reproduce the page fault. Thanks for the log, the issue is a little less murky now. But it's still unclear what the root cause is and thus what the proper solution is. I think this needs more in-depth debugging, see my previous e-mail. Hope that helps! Thanks, Lukas