Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp860462imm; Thu, 31 May 2018 10:37:10 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJessfk8II8xOhwMDJRzQBWSO2WH9hAX+vjVRkU3uzC666tyaM8RhbeIDYH3AGXLSHfFSXL X-Received: by 2002:a17:902:1a8:: with SMTP id b37-v6mr8065093plb.326.1527788230736; Thu, 31 May 2018 10:37:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527788230; cv=none; d=google.com; s=arc-20160816; b=F8B96X6BvxMHf7iGXG/kqBpYwAi0t815kiojKfd6ghcLr8a9hxrrZ5ju8Vur2NJyuy nqOnGok57ViFjgKIam6B6SVyzikSzu1y3ffj3intXGbyv3L8SF+8WUcK7MqULBjtV09U UyoXpKydH0ffi+TEh1N3U7XGG7HrC8p69FMQUaWw6IacQXCHJVE5+RMRkGWKtNvd6WDn kWELsUP5N/wNW/yVxwTx6/CR65nYCn6kanUvYy+ylk8ENJl92gjCvBMl2oozo9GZR7Ff azQtbrRj1ertigeMkS1Bd5+DT0cj7gdabPxXwtvaFWuhQhvnJRcLORw60uwlASyrJPAh T/gw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature :arc-authentication-results; bh=lfhRfgtaQXee1d8yvyt2KuNPKJjG7QR6rTzw563Ch78=; b=j3Hj6i9BLYl8xp9LQuE1vCGKev2MgTtuGAD9kK/55ZxPa749Ac3nh5chmmxeOcJJzO J4QxlaTHO83phA4PQH3TVjEjTZ8IlSrBP9tWRzLEXPiVZE1RV8WPAO+FN3BwAg4v3Zru yQd7YtXeCL8DSRJaIEIPr33mVyRnZw+SMm+1DEpuPcv3dWVo5N5adiP4EsdXqz76vcGE K8AIP75wX60YZ8RGSLUl1ficBhWz2mKDYHUoUFYEKqFYjPJ/qslFbjB/wKEDliD0VE4L /mc+kBy9DrRLHLzs+QjWJkBh/L6Up17kXNeIQ+Hm1eKAJOHAXabzDpWfRurYUpoHE1Nw ohBw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=SJM7z/dO; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a62-v6si14711155pge.492.2018.05.31.10.36.56; Thu, 31 May 2018 10:37:10 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=SJM7z/dO; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755846AbeEaRgc (ORCPT + 99 others); Thu, 31 May 2018 13:36:32 -0400 Received: from mail-ot0-f196.google.com ([74.125.82.196]:42243 "EHLO mail-ot0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755737AbeEaRga (ORCPT ); Thu, 31 May 2018 13:36:30 -0400 Received: by mail-ot0-f196.google.com with SMTP id l13-v6so26209774otk.9 for ; Thu, 31 May 2018 10:36:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=lfhRfgtaQXee1d8yvyt2KuNPKJjG7QR6rTzw563Ch78=; b=SJM7z/dOKGrWmwCBk+Ld2MkHxSSwT2+HYEH0QuaXn67eGwsLPa/GJcvMC4QppXG/Mk x6VhOC7TmbvFuq2/qx+KByotHH4FdOzfeDlPIuGh51pUeu/lOkba1++eAUt39G3Z0pAY fQJ5sy1qtiPt5BNejkKYFVpMc2v+9yNT1ZupYJopLS23fNaz2jITyiaNV2r6E7DoceQj qFIFoIDert/oT00PZmuOdSjJW2Qu/zzR6VAEa8SdxAlEJa7LEIg4Qke8NruE1wK1ylQC yheAbCkCLPpW5QMeO7c0qgslzBjuD/MzBgtECXxmUeqCw5dhWgKYDHuVNBH7bZ0HRmtH bhhw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=lfhRfgtaQXee1d8yvyt2KuNPKJjG7QR6rTzw563Ch78=; b=NoB8OvI30gp7fgDXJWSYMTMnqY9+rYMxl6h51qkVZYp8mFmL7iVOS6/2uqaBx7klHb AgrFSSGiEF1oAuXB3PJkQMrl3+0j8azr4TWxfEqw8CCQ1OSmQW9i9duxuCns5ZlllCx3 0t4b/xYN93HwId6Q7KH0iE/IeYFQP9UYM4K1zy44eCoEPaqeL8d4nhMENtUb6eLLOjCW Rk5RqaURd3EA7MriVcsXm7etolpuvOFoRwpg/W7sj4cP38UGa7omWFwRvJiciqjudLnz 4u3YHVYwZGgM3gEasjcqn2K+hJVRBjSBv4V3eemFD2yRSnzUVxgUVQ+1C16dxY6C2gpX SUJw== X-Gm-Message-State: APt69E0sISK+073HO7O7eaaUrfXCh4AmNWTft6fq+bwqk+VtMQienMxq 3ZbVU/w9369J2qCNOc4Ed6j6aEd96ZciybFifPATjw== X-Received: by 2002:a9d:2425:: with SMTP id p34-v6mr1215527ota.98.1527788189173; Thu, 31 May 2018 10:36:29 -0700 (PDT) MIME-Version: 1.0 References: <152770259826.80701.7360032106128917833.stgit@bhelgaas-glaptop.roam.corp.google.com> <152770285586.80701.6545710900591672975.stgit@bhelgaas-glaptop.roam.corp.google.com> <20180531044216.GR39853@bhelgaas-glaptop.roam.corp.google.com> In-Reply-To: <20180531044216.GR39853@bhelgaas-glaptop.roam.corp.google.com> From: Rajat Jain Date: Thu, 31 May 2018 10:35:51 -0700 Message-ID: Subject: Re: [PATCH v1 1/2] PCI/AER: Decode Error Source Requester ID To: Bjorn Helgaas Cc: linux-pci , Oza Pawandeep , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 30, 2018 at 9:42 PM Bjorn Helgaas wrote: > > On Wed, May 30, 2018 at 11:41:23AM -0700, Rajat Jain wrote: > > On Wed, May 30, 2018 at 10:54 AM Bjorn Helgaas wrote: > > > > > From: Bjorn Helgaas > > > > > Decode the Requester ID from the AER Error Source Register into domain/ > > > bus/device/function format to match other logging. In cases where the ID > > > matches the device used for pci_err(), drop the extra ID completely so we > > > don't print it twice. > > > > > Signed-off-by: Bjorn Helgaas > > > --- > > > drivers/pci/pcie/aer/aerdrv_errprint.c | 18 +++++++++++------- > > > 1 file changed, 11 insertions(+), 7 deletions(-) > > > > > diff --git a/drivers/pci/pcie/aer/aerdrv_errprint.c > > b/drivers/pci/pcie/aer/aerdrv_errprint.c > > > index 21ca5e1b0ded..d7fde8368d81 100644 > > > --- a/drivers/pci/pcie/aer/aerdrv_errprint.c > > > +++ b/drivers/pci/pcie/aer/aerdrv_errprint.c > > > @@ -163,17 +163,17 @@ void aer_print_error(struct pci_dev *dev, struct > > aer_err_info *info) > > > int id = ((dev->bus->number << 8) | dev->devfn); > > > > if (!info->status) { > > > - pci_err(dev, "PCIe Bus Error: severity=%s, > > type=Unaccessible, id=%04x(Unregistered Agent ID)\n", > > > - aer_error_severity_string[info->severity], id); > > > + pci_err(dev, "PCIe Bus Error: severity=%s, > > type=Inaccessible, (Unregistered Agent ID)\n", > > > + aer_error_severity_string[info->severity]); > > > > Does this code path indicate that a requester id was decoded to a device > > that is not registered with the kernel? If so, shouldn't we log the bad > > requester ID for better debugging, specifically since there is not going to > > be any subsequent print about this ID (since we return from this function > > in this case)? > > Previously we printed "id", which was constructed above from "dev": > > id = ((dev->bus->number << 8) | dev->devfn); > > so even if we print "id=%04x", it contains exactly the same > information as the bus/device/function printed using "dev". Sorry, my bad, I missed it, despite it being right there in my face :-). > > So no, I don't think "Unregistered Agent ID" means a device not registered > with the kernel. At any rate, we do have a pci_dev for it. > > I *think* "info->status == 0" means PCI_ERR_COR_STATUS (or > PCI_ERR_UNCOR_STATUS) was zero, i.e., we didn't find any error status > bits set for this device. I don't think "Unregistered Agent ID" is a > very good description of this situation. Agree, may be something along the lines of "Unknown Error Status" might be better. Thanks, Rajat > > Bjorn