From patchwork Wed Oct 15 23:41:10 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gavin Shan X-Patchwork-Id: 5087521 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: X-Original-To: patchwork-linux-pci@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id D95AFC11AC for ; Wed, 15 Oct 2014 23:42:14 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E58CA20142 for ; Wed, 15 Oct 2014 23:42:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CA5A220120 for ; Wed, 15 Oct 2014 23:42:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751274AbaJOXmJ (ORCPT ); Wed, 15 Oct 2014 19:42:09 -0400 Received: from e23smtp04.au.ibm.com ([202.81.31.146]:55891 "EHLO e23smtp04.au.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751251AbaJOXmJ (ORCPT ); Wed, 15 Oct 2014 19:42:09 -0400 Received: from /spool/local by e23smtp04.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 16 Oct 2014 09:42:06 +1000 Received: from d23dlp01.au.ibm.com (202.81.31.203) by e23smtp04.au.ibm.com (202.81.31.210) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Thu, 16 Oct 2014 09:42:04 +1000 Received: from d23relay05.au.ibm.com (d23relay05.au.ibm.com [9.190.235.152]) by d23dlp01.au.ibm.com (Postfix) with ESMTP id 4A15D2CE8040 for ; Thu, 16 Oct 2014 10:42:04 +1100 (EST) Received: from d23av03.au.ibm.com (d23av03.au.ibm.com [9.190.234.97]) by d23relay05.au.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id s9FNHL5355050414 for ; Thu, 16 Oct 2014 10:17:29 +1100 Received: from d23av03.au.ibm.com (localhost [127.0.0.1]) by d23av03.au.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id s9FNfVPg007376 for ; Thu, 16 Oct 2014 10:41:31 +1100 Received: from ozlabs.au.ibm.com (ozlabs.au.ibm.com [9.190.163.12]) by d23av03.au.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id s9FNfVHj006680; Thu, 16 Oct 2014 10:41:31 +1100 Received: from shangw (haven.au.ibm.com [9.190.164.82]) by ozlabs.au.ibm.com (Postfix) with ESMTP id C5266A0173; Thu, 16 Oct 2014 10:41:06 +1100 (AEDT) Received: by shangw (Postfix, from userid 1000) id 522423E02AA; Thu, 16 Oct 2014 10:41:11 +1100 (EST) From: Gavin Shan To: linux-pci@vger.kernel.org Cc: bhelgaas@google.com, weiyang@linux.vnet.ibm.com, Gavin Shan Subject: [PATCH] PCI: Make reset warning messages different Date: Thu, 16 Oct 2014 10:41:10 +1100 Message-Id: <1413416470-14828-1-git-send-email-gwshan@linux.vnet.ibm.com> X-Mailer: git-send-email 1.8.3.2 X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 14101523-0013-0000-0000-0000005ACDD5 Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP We have same warning message for FLR and AF FLR and users can't know which type of resets the PCI device is taking when there are pending transactions. The patch makes them different for FLR and AF FLR cases. Signed-off-by: Gavin Shan --- drivers/pci/pci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index 625a4ac..2d708cd 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c @@ -3144,7 +3144,7 @@ static int pcie_flr(struct pci_dev *dev, int probe) return 0; if (!pci_wait_for_pending_transaction(dev)) - dev_err(&dev->dev, "transaction is not cleared; proceeding with reset anyway\n"); + dev_err(&dev->dev, "Force FLR with pending transaction\n"); pcie_capability_set_word(dev, PCI_EXP_DEVCTL, PCI_EXP_DEVCTL_BCR_FLR); @@ -3178,7 +3178,7 @@ static int pci_af_flr(struct pci_dev *dev, int probe) PCI_AF_STATUS_TP << 8)) goto clear; - dev_err(&dev->dev, "transaction is not cleared; proceeding with reset anyway\n"); + dev_err(&dev->dev, "Force AF FLR with pending transaction\n"); clear: pci_write_config_byte(dev, pos + PCI_AF_CTRL, PCI_AF_CTRL_FLR);