Received: by 10.223.164.221 with SMTP id h29csp2251560wrb; Tue, 17 Oct 2017 19:12:25 -0700 (PDT) X-Google-Smtp-Source: ABhQp+ThqjvW2Ybf5x8a23LS6Y+pB70B3OMMc1T6ZxldcG29tkb6NAy+M+biLmdelKNtxCM1KGMw X-Received: by 10.99.120.13 with SMTP id t13mr4808042pgc.40.1508292745013; Tue, 17 Oct 2017 19:12:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1508292744; cv=none; d=google.com; s=arc-20160816; b=ly/2UsjYf8o1tqNBu9FduecJ31dJRLqNOrJS5GBgbg3p8lsjEhWoR4Z9eNsq2R934/ FpieaY65hdzCPWRHLK6m1cZ9F7+3M1ekesfSE4J8BpozEXH1uTt5+a9ZAeyHpdH/kH8f dC+lWh8zhX2EPLP3ZWLjeut5p65VDhszAc3hmtqGGKoSzHniJuGY+rI9P055RXHWYLKa pKDLX1YkbewzU8l+15AuesONZQEElpmL+BfWvR13sZ08Ne10EHt/hIEUSeTDOg/yywTw QM9Aq6DUKxd0l4mgpz75y8lHbvwHTTybcQe59WK+dLjK8LVj989YV1QdLGgtkdEm2ge1 lHBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dmarc-filter:dkim-signature:dkim-signature :arc-authentication-results; bh=Nph0KMKjfc3/c0ORZtBqFJxy0rwPn6MdLdqXAF7HMss=; b=sT3egLdBeDgIrMXMOQRc7qWxw3DyVZuUxb9ZvDIe9hs4WK80WsavQK1PQm4EfJofpj syYRkKOmsx0m5aFhRl7azy/WhQVua15jkCuulgR89ym5zthN2sm4V1Vcxd5Ul8dD0+TS miM8E0b7o7bXltMurakzbbyASqik7KejAG3ea6Z4MK5iB1tSESZkliEcMamWZa/GIvZL dmNCkxP0Yq0K2AfMOIH7mOTTs8BR8GLAYO1sNNurqsoQs+tNkVWgpwnMYUO8FDZ2Z96h i2mApYrr5BhIXRE/uJDstz9Qrsmz4uj6caY+LfDsDsib9Js2xtY/Dgp0UGu0QkvtXc/K zNVg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=obcYfrm/; dkim=pass header.i=@codeaurora.org header.s=default header.b=Vz2Khwu6; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n9si7073422pll.526.2017.10.17.19.12.11; Tue, 17 Oct 2017 19:12:24 -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=@codeaurora.org header.s=default header.b=obcYfrm/; dkim=pass header.i=@codeaurora.org header.s=default header.b=Vz2Khwu6; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759258AbdJQPmJ (ORCPT + 99 others); Tue, 17 Oct 2017 11:42:09 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:36482 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753585AbdJQPmH (ORCPT ); Tue, 17 Oct 2017 11:42:07 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 4FA51607B3; Tue, 17 Oct 2017 15:42:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1508254927; bh=oNAXRnUYJtRLrF/R6Kdwh7+zdBHcai/iGTZhpDuONY4=; h=From:To:Cc:Subject:Date:From; b=obcYfrm/MM3ZruvNcZG6xUxwXj9O1OWwqmigdfVjZJE3Tn+ZQkKA7UG7IOxqBQq06 6G5jpB4mhYA1TptNUjAuxUIlpwMOJ4fV/X7S8G6zCb9b7n1kid8SCjegzvbpJjI7S8 NDMJBcrbhCN0CrMGfZ2tcN13YrEdJwOcUPnpCuA4= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.0 Received: from tbaicar-lnx.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: tbaicar@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 4592D607B3; Tue, 17 Oct 2017 15:42:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1508254926; bh=oNAXRnUYJtRLrF/R6Kdwh7+zdBHcai/iGTZhpDuONY4=; h=From:To:Cc:Subject:Date:From; b=Vz2Khwu6Hsd7J4RjY++bQvzzdgHDU0u1C/9hayv87g4Lii/wQeRKRz84f+UefUgzU KlAlGXSoFqBB0wwUGRb7wa2KMUsARXdz1zmE9GSGdHKJXBwMu0n8dMdfyK/Dkj8LnU H0byeBYv30Rboj8FQR1ZnWYCF+ZLECUnzogKceSE= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 4592D607B3 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=tbaicar@codeaurora.org From: Tyler Baicar To: bhelgaas@google.com, helgaas@kernel.org, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Tyler Baicar Subject: [PATCH] PCI/AER: update AER status string print to match other AER logs Date: Tue, 17 Oct 2017 09:42:02 -0600 Message-Id: <1508254922-30925-1-git-send-email-tbaicar@codeaurora.org> X-Mailer: git-send-email 1.9.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Currently the AER driver uses cper_print_bits() to print the AER status string. This causes the status string to not include the proper PCI device name prefix that the other AER prints include. Also, it has a different print level than all the other AER prints. Update the AER driver to print the AER status string with the proper string prefix and proper print level. Previous log example: e1000e 0003:01:00.1: aer_status: 0x00000041, aer_mask: 0x00000000 Receiver Error, Bad TLP e1000e 0003:01:00.1: aer_layer=Physical Layer, aer_agent=Receiver ID pcieport 0003:00:00.0: aer_status: 0x00001000, aer_mask: 0x0000e000 Replay Timer Timeout pcieport 0003:00:00.0: aer_layer=Data Link Layer, aer_agent=Transmitter ID New log: e1000e 0003:01:00.1: aer_status: 0x00000041, aer_mask: 0x00000000 e1000e 0003:01:00.1: Receiver Error e1000e 0003:01:00.1: Bad TLP e1000e 0003:01:00.1: aer_layer=Physical Layer, aer_agent=Receiver ID pcieport 0003:00:00.0: aer_status: 0x00001000, aer_mask: 0x0000e000 pcieport 0003:00:00.0: Replay Timer Timeout pcieport 0003:00:00.0: aer_layer=Data Link Layer, aer_agent=Transmitter ID Signed-off-by: Tyler Baicar --- drivers/pci/pcie/aer/aerdrv_errprint.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/drivers/pci/pcie/aer/aerdrv_errprint.c b/drivers/pci/pcie/aer/aerdrv_errprint.c index 54c4b69..b718daa 100644 --- a/drivers/pci/pcie/aer/aerdrv_errprint.c +++ b/drivers/pci/pcie/aer/aerdrv_errprint.c @@ -206,6 +206,19 @@ void aer_print_port_info(struct pci_dev *dev, struct aer_err_info *info) } #ifdef CONFIG_ACPI_APEI_PCIEAER +void dev_print_bits(struct pci_dev *dev, unsigned int bits, + const char * const strs[], unsigned int strs_size) +{ + unsigned int i; + + for (i = 0; i < strs_size; i++) { + if (!(bits & (1U << i))) + continue; + if (strs[i]) + dev_err(&dev->dev, "%s\n", strs[i]); + } +} + int cper_severity_to_aer(int cper_severity) { switch (cper_severity) { @@ -243,7 +256,7 @@ void cper_print_aer(struct pci_dev *dev, int aer_severity, agent = AER_GET_AGENT(aer_severity, status); dev_err(&dev->dev, "aer_status: 0x%08x, aer_mask: 0x%08x\n", status, mask); - cper_print_bits("", status, status_strs, status_strs_size); + dev_print_bits(dev, status, status_strs, status_strs_size); dev_err(&dev->dev, "aer_layer=%s, aer_agent=%s\n", aer_error_layer[layer], aer_agent_string[agent]); -- Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm Technologies, Inc. Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project. From 1584207289223616581@xxx Thu Nov 16 07:36:43 +0000 2017 X-GM-THRID: 1584194752554476198 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread