From patchwork Wed Nov 12 02:41:51 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gavin Shan X-Patchwork-Id: 5282651 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 2281EC11AC for ; Wed, 12 Nov 2014 02:42:11 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 567F020114 for ; Wed, 12 Nov 2014 02:42:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 796202010E for ; Wed, 12 Nov 2014 02:42:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933167AbaKLCmD (ORCPT ); Tue, 11 Nov 2014 21:42:03 -0500 Received: from e28smtp07.in.ibm.com ([122.248.162.7]:59464 "EHLO e28smtp07.in.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933155AbaKLCmB (ORCPT ); Tue, 11 Nov 2014 21:42:01 -0500 Received: from /spool/local by e28smtp07.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 12 Nov 2014 08:11:57 +0530 Received: from d28dlp02.in.ibm.com (9.184.220.127) by e28smtp07.in.ibm.com (192.168.1.137) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Wed, 12 Nov 2014 08:11:54 +0530 Received: from d28relay01.in.ibm.com (d28relay01.in.ibm.com [9.184.220.58]) by d28dlp02.in.ibm.com (Postfix) with ESMTP id 73A533940045 for ; Wed, 12 Nov 2014 08:11:54 +0530 (IST) Received: from d28av02.in.ibm.com (d28av02.in.ibm.com [9.184.220.64]) by d28relay01.in.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id sAC2fdVx55640222 for ; Wed, 12 Nov 2014 08:11:40 +0530 Received: from d28av02.in.ibm.com (localhost [127.0.0.1]) by d28av02.in.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id sAC2frZR020532 for ; Wed, 12 Nov 2014 08:11:53 +0530 Received: from shangw (haven.au.ibm.com [9.192.253.15]) by d28av02.in.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id sAC2fqiw020527; Wed, 12 Nov 2014 08:11:52 +0530 Received: by shangw (Postfix, from userid 1000) id CA92C3E0270; Wed, 12 Nov 2014 13:41:51 +1100 (EST) From: Gavin Shan To: linux-pci@vger.kernel.org Cc: bhelgaas@google.com, Gavin Shan Subject: [PATCH v2] PCI: Make reset warning messages different Date: Wed, 12 Nov 2014 13:41:51 +1100 Message-Id: <1415760111-12344-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: 14111202-0025-0000-0000-000001CF0DB0 Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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 --- v2: Adjusted messages according to Bjorn's suggestion --- drivers/pci/pci.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index 625a4ac..3f12383 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c @@ -3144,7 +3144,8 @@ 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, "timed out waiting for pending transaction; " + "performing function level reset\n"); pcie_capability_set_word(dev, PCI_EXP_DEVCTL, PCI_EXP_DEVCTL_BCR_FLR); @@ -3178,7 +3179,8 @@ 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, "timed out waiting for pending transaction; " + "performing AF function level reset\n"); clear: pci_write_config_byte(dev, pos + PCI_AF_CTRL, PCI_AF_CTRL_FLR);