Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp203899imm; Wed, 30 May 2018 21:44:13 -0700 (PDT) X-Google-Smtp-Source: ADUXVKICJPVBqh/vuXB/tcH0UMiZaspfBzD3Az9nMJ6h8sJ3gXf+cMMkz1nHbvPuRVfAtb3kPM8E X-Received: by 2002:a63:7905:: with SMTP id u5-v6mr4246904pgc.411.1527741853130; Wed, 30 May 2018 21:44:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527741853; cv=none; d=google.com; s=arc-20160816; b=zMXgV8WehO3vLv0WzlZj/YqINWnpM8gLzphRDNQ127YcZDtSneZ3Op3JTnu0v9YWhr 7U6UUaHKLLU6AWrEE3dFlYinIv1t1ChPdroclLhtH4B78ZHriJ9HEpGAKSDURtafF5Zj sBhKxLl+bwjhkVprKmr70VKqcyO+PQS2aJbXbzb9Sq+jzrMdCPJiZ9ckX0ZEcBrfXyZp VnEuEQRFj0WfLxffPBFRNOzkBCBX0r8rCK41MzohYxdEeO0491DOVsR5Q5efgeAHXs3B lZ73omcdkLYoBKY3/Oz+X9b3WjqBV3r7zT9zRFNSmOm1M396zIth7CsF+oLJApZotyxj ZFkw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=sS436FA3T9QzzRZD+ll8RjfyMyBu2N4t3pHQfOQukh8=; b=fxda+pcvfFbiIH6TMSiaPsQ4IEdGbp1FmGZ2uBcS7q/JW5pZn+fUMoufQZcQHuGJSc jUkUkEmBAJsMujgJjSQtnPFCRz1TC9Q+B+22sOR3Xc2ssv12fphN7Fd0kf98jFicYagP jxVFwidU64K56G1MxfFpeV1K12MCpuFU1gOOPwrcUvtyYkADWwUm0wJUAEcGn4HiTHmc 05T4i4I64V2PgteETLLTVuUKlxtxCKnmMr61J2YwybYxjwbouPqk+2WQIA3ynncD5nPZ S1ysVof3HbZhzco9gUUXlM/FzfQ3tkBTEtNS6Tz9Ftgsl7nMGp08DFRZ1zUlklmactAA pzrQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=r1mMsO09; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o5-v6si2407239pgd.653.2018.05.30.21.43.59; Wed, 30 May 2018 21:44:13 -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=@kernel.org header.s=default header.b=r1mMsO09; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753901AbeEaEmT (ORCPT + 99 others); Thu, 31 May 2018 00:42:19 -0400 Received: from mail.kernel.org ([198.145.29.99]:41368 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753772AbeEaEmR (ORCPT ); Thu, 31 May 2018 00:42:17 -0400 Received: from localhost (c-73-15-0-24.hsd1.ca.comcast.net [73.15.0.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id C5B5D2077B; Thu, 31 May 2018 04:42:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1527741736; bh=iUFg7q5fh4k6LoElPlzPweWaIWWusVMRUOWBc0Bf58I=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=r1mMsO09Fe0D/ndBcp70ehj+iHidhUmQFOrZyhklFweE2fBnNT732dw8jw8McExYu JPUpbVefcgthZW9J+Bobm1VH2VauhNJk8/f+hSfVCccTwC+MQLeX70wPXQZbkHhgSX tYZnOjOJdXapLqsR3afNHWnM7npi+73GLc/Mfn/c= Date: Wed, 30 May 2018 23:42:16 -0500 From: Bjorn Helgaas To: Rajat Jain Cc: linux-pci , Oza Pawandeep , Linux Kernel Mailing List Subject: Re: [PATCH v1 1/2] PCI/AER: Decode Error Source Requester ID Message-ID: <20180531044216.GR39853@bhelgaas-glaptop.roam.corp.google.com> References: <152770259826.80701.7360032106128917833.stgit@bhelgaas-glaptop.roam.corp.google.com> <152770285586.80701.6545710900591672975.stgit@bhelgaas-glaptop.roam.corp.google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.2 (2017-12-15) 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 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". 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. Bjorn