Received: by 2002:ab2:6309:0:b0:1fb:d597:ff75 with SMTP id s9csp31642lqt; Wed, 5 Jun 2024 16:10:27 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVGJjR1MKl/NtjVVcQId129Kn/atQobB3P16xXheQigKdwQZwhDEEA30KpdKobuToPi3oSJjClCtraz3In3/lZkcY1gbKusMkL3xQyJSQ== X-Google-Smtp-Source: AGHT+IE/Qib0jB3vWfSLAeF9jx7rbktrrTI/kUfVuMh2dCewdKygbk7KXKE2o2n/ETsakfUHS/Hj X-Received: by 2002:a17:906:f11a:b0:a6c:70c6:85aa with SMTP id a640c23a62f3a-a6c70c68badmr127352666b.62.1717629027185; Wed, 05 Jun 2024 16:10:27 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717629027; cv=pass; d=google.com; s=arc-20160816; b=lrJZv/mMXibEY7+fwlKs1OfopcOkhXFUiqYvqXR509nKN1viwsYR6S6BQ3S27b4an+ D5YS7LJWVRk0eRG5T45sZaRTpwxreYiqHlS9Zx0D3tTcvxFfGb6mGeAOOgORszJS57pR mx2AIljWFsch9z2ADLySRWbj4FFmjuNItFsi1wAeJNEINivnwwELRCel4qEpjj0L+iGh 7RgUeIiEfwQt24jSOkOtK/QFrt0PtwNn8jVr3IO5Yg5WO0j77xsQlNBK81RFs0NznLSr l6kXKRJTbPUyzBMLdBUSkdY+m/4uG01p4BakwmPFIo+MLRr4pOzt4Z4xxYfmk4bpBgRZ FMuQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=Mfqo8SpJ+6G4s4wmk6y7o8hH2xAWf7/sXOwEQu/ezXs=; fh=dhZl9HGbFetcay5K25IzTPYJ84bbzY14SoKLjtgVD1g=; b=zF+tmcYcZUolDRklPt8cAVWAqAc4fACM+nb/etldSvfhPmXL9mOLrUMol9uX14OjPR WHVIVIh1FfbtMrGJnyUI8mPVcHwvUDssMrpPT8KPSj5qhP9612eC5lcDkKboLU/VteH3 NJFRl3vNCXS3ZXOvvK/2rkU4Hsnj2EM8o1/VRq+3QS70B+W3JN4kGb3PYAAVERiZgHFm mOBC1HtXsFwpwhbb8C5qRiotSa2qqoP1yHpcgpaiWd0itGoarP2wneOviL/WN9Z7TM16 IvXG5XiXHaqwFkai5XVhhYO1aJGpc+cGvJU8spy+wj8y1mUvPQGMU37uqqBeCHnGr1YD hx7A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=lNqG1LcE; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-203386-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-203386-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id a640c23a62f3a-a6c8058e6dcsi3432166b.122.2024.06.05.16.10.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Jun 2024 16:10:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-203386-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=lNqG1LcE; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-203386-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-203386-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id DF3EF1F24D53 for ; Wed, 5 Jun 2024 23:10:26 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5F346161325; Wed, 5 Jun 2024 23:10:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="lNqG1LcE" Received: from mail-pg1-f169.google.com (mail-pg1-f169.google.com [209.85.215.169]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 48154BA38; Wed, 5 Jun 2024 23:10:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.169 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717629019; cv=none; b=HuHyqwv4+exBks7r1x0Z5Xl3/VcNxWp0tjlLDMe1snmtKC659OT325pHMFcx7vPAjNhnWIxQ2BwwwA5/iTh5DSvyX9R9/AxqwLPqJNrViR25dCXlW5wJXwSX9G3mynXPkQBYJt5urry5iAN04v//4uqtTCMnLOsVy0xNieujEDg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717629019; c=relaxed/simple; bh=+qzBgVypxo5Oj7OFL4Z4L8bH4RlG4KNWwruaVnHr1Ug=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=keDx01i1WXx91ZxOHZauGhyssre8OuNzysEtqT6Ej3l4FzGQLsKDvCJztIXfkGoW6xAO/mUWrXOZj51sNyLmBTNUIAlpcNzEmcX91fFDGyc0pePJZ9jeohVnZSOBa04jF1Z251hu3hmlCOqTp1g6mVzL5tOhAw10ke8Jbc4Q+k8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=lNqG1LcE; arc=none smtp.client-ip=209.85.215.169 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pg1-f169.google.com with SMTP id 41be03b00d2f7-6cb6b9ada16so267010a12.0; Wed, 05 Jun 2024 16:10:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1717629017; x=1718233817; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=Mfqo8SpJ+6G4s4wmk6y7o8hH2xAWf7/sXOwEQu/ezXs=; b=lNqG1LcETvh4JV/0tahj6y91X1uo4oKLT/w7zDGnzz9XfhDQZ7IOBgXQ0hyNna8psA Be/7uhcWGUDnIdWQb6u1A0UxWEnpGBBSCXFpGP+aBKxsFTSEG54zhsOeJcz7d7yMpq23 gSEYMqimh5PMltQpbPwCqFiU1llTEj3n+ytVCo0gDu5/7ERDexH4jZqwMhggC47hQHD6 mg6Z10qParPs5FAvES3fd/WwQfcgRpnAGJfqQwGbyaz2eEIlpKtL7CfAIFtpaty2+Kan 8inqrt2I66fOppt99t72UuX7aJUA3FDZuLV0AobzynCL/PEOfb84TET1rH19UBOdT7Kj vrAg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717629017; x=1718233817; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Mfqo8SpJ+6G4s4wmk6y7o8hH2xAWf7/sXOwEQu/ezXs=; b=ZzSRSaB3AiJBcyetpFYZ7MsEo4I2RxRqNShscr7DH9CPEDmOERyc8sYf2rVcQNgbBJ 6/qy+sPgP22BVf7mKIq0BUsXi7YboCSpUHgbtDbulcepX3yKrnbrFtOj1nRrMaljVN3H ahcP6gv1YjI7z3dBHZASakRzqmb76KkAcZsh1BsbIV4/9lnbGBvy1bDBs0qHCZV0pWT1 f5OpNvmmT8fbAzDfK5wcMqkrOpZUlWEWi6nqZJjFzwHOlDuEKX8UmTD9aFdkSjjoN3T/ v7ok6cFgu7MKGzLwRPA8hCrv5iZffbwCC2rFX/wR5r5TkE6l3dBRtCm7Y6L8+zaS0z00 VlcA== X-Forwarded-Encrypted: i=1; AJvYcCXlHvweG33meO8yQwIt/lEmWsfOPHHgfUdmdKB8WAeOORr6MOajyYayOuJVcszxaKUDOTBvmM8TGkLBK3czI/l2qspnEDPX2rgWAmusDeJrOJbFKOl0KoZXprKIjBMyGXtqFB8o4vot X-Gm-Message-State: AOJu0YyeVCveM/UHLH+WwAGao7v5O9BhX9iCDBB9suHYBdwWeODEEJWv 5rk2+bDoSZZLPknT2h6/vsnc5EzM1WjXv2vuMj7zy0ar7LdUkKUx X-Received: by 2002:a17:90b:4016:b0:2c1:a068:ba83 with SMTP id 98e67ed59e1d1-2c27db0ebb0mr4023969a91.11.1717629017487; Wed, 05 Jun 2024 16:10:17 -0700 (PDT) Received: from dev0.. ([49.43.162.143]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2c29c20d8afsm139596a91.2.2024.06.05.16.10.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Jun 2024 16:10:17 -0700 (PDT) From: Abhinav Jain To: mahesh@linux.ibm.com, oohall@gmail.com, bhelgaas@google.com, linuxppc-dev@lists.ozlabs.org, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org Cc: skhan@linuxfoundation.org, javier.carrasco.cruz@gmail.com, jain.abhinav177@gmail.com Subject: [PATCH v3] PCI/AER: Log error message if there are too many PCI devices with errors Date: Wed, 5 Jun 2024 23:09:54 +0000 Message-Id: <20240605230954.22911-1-jain.abhinav177@gmail.com> X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Added pci_err() to log PCI device information on which iteration fails. Added pci_err() to log note if there are too many failed devices. Signed-off-by: Abhinav Jain --- PATCH v2: https://lore.kernel.org/all/20240605212344.21808-1-jain.abhinav177@gmail.com/ Changes since v2: - Switched to pci_err() to log failing PCI device - Included the historical note below the "---" line - Fixed other style changes in the patch --- drivers/pci/pcie/aer.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/pci/pcie/aer.c b/drivers/pci/pcie/aer.c index 8b820a74dd6b..0bca83827ac1 100644 --- a/drivers/pci/pcie/aer.c +++ b/drivers/pci/pcie/aer.c @@ -882,11 +882,13 @@ static int find_device_iter(struct pci_dev *dev, void *data) struct aer_err_info *e_info = (struct aer_err_info *)data; if (is_error_source(dev, e_info)) { + /* Log error for the device */ + pci_err(dev, "Error detected on device: %s\n", pci_name(dev)); + /* List this device */ if (add_error_device(e_info, dev)) { /* We cannot handle more... Stop iteration */ - pr_notice("%s: Cannot handle more devices - iteration stopped\n", - __func__); + pci_err(dev, "Too many error devices encountered. Stopping iteration.\n"); return 1; } -- 2.34.1