From patchwork Thu Aug 7 02:47:17 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gavin Shan X-Patchwork-Id: 4689101 Return-Path: X-Original-To: patchwork-kvm@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 155B4C0338 for ; Thu, 7 Aug 2014 02:47:40 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 520B9201DC for ; Thu, 7 Aug 2014 02:47:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8309C2018E for ; Thu, 7 Aug 2014 02:47:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754932AbaHGCre (ORCPT ); Wed, 6 Aug 2014 22:47:34 -0400 Received: from e28smtp09.in.ibm.com ([122.248.162.9]:56066 "EHLO e28smtp09.in.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754623AbaHGCrb (ORCPT ); Wed, 6 Aug 2014 22:47:31 -0400 Received: from /spool/local by e28smtp09.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 7 Aug 2014 08:17:29 +0530 Received: from d28dlp01.in.ibm.com (9.184.220.126) by e28smtp09.in.ibm.com (192.168.1.139) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Thu, 7 Aug 2014 08:17:26 +0530 Received: from d28relay05.in.ibm.com (d28relay05.in.ibm.com [9.184.220.62]) by d28dlp01.in.ibm.com (Postfix) with ESMTP id 1F07AE0017 for ; Thu, 7 Aug 2014 08:19:19 +0530 (IST) Received: from d28av02.in.ibm.com (d28av02.in.ibm.com [9.184.220.64]) by d28relay05.in.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id s772lmd966191568 for ; Thu, 7 Aug 2014 08:17:48 +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 s772lOUd029159 for ; Thu, 7 Aug 2014 08:17:25 +0530 Received: from shangw (shangw.cn.ibm.com [9.125.213.204]) by d28av02.in.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with SMTP id s772lM45029108; Thu, 7 Aug 2014 08:17:23 +0530 Received: by shangw (Postfix, from userid 1000) id CB2A63E1F4D; Thu, 7 Aug 2014 12:47:21 +1000 (EST) From: Gavin Shan To: linuxppc-dev@lists.ozlabs.org Cc: kvm@vger.kernel.org, aik@ozlabs.ru, alex.williamson@redhat.com, benh@kernel.crashing.org, Gavin Shan Subject: [PATCH v4 2/5] powerpc/eeh: Add warning message in eeh_dev_open() Date: Thu, 7 Aug 2014 12:47:17 +1000 Message-Id: <1407379640-13065-3-git-send-email-gwshan@linux.vnet.ibm.com> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1407379640-13065-1-git-send-email-gwshan@linux.vnet.ibm.com> References: <1407379640-13065-1-git-send-email-gwshan@linux.vnet.ibm.com> X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 14080702-2674-0000-0000-0000014842DF Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Spam-Status: No, score=-7.6 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 The patch adds one warning message in eeh_dev_open() in case the PCI device can't be marked as passed through. Suggested-by: Alexey Kardashevskiy Signed-off-by: Gavin Shan Acked-by: Benjamin Herrenschmidt --- arch/powerpc/kernel/eeh.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/kernel/eeh.c b/arch/powerpc/kernel/eeh.c index 59a64f8..5d73a49 100644 --- a/arch/powerpc/kernel/eeh.c +++ b/arch/powerpc/kernel/eeh.c @@ -1162,8 +1162,11 @@ int eeh_dev_open(struct pci_dev *pdev) /* No EEH device or PE ? */ edev = pci_dev_to_eeh_dev(pdev); - if (!edev || !edev->pe) + if (!edev || !edev->pe) { + pr_warn_once("%s: PCI device %s not supported\n", + __func__, pci_name(pdev)); goto out; + } /* Increase PE's pass through count */ atomic_inc(&edev->pe->pass_dev_cnt);