From patchwork Wed Aug 30 14:24:54 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Glauber X-Patchwork-Id: 9929781 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id A3FFF60309 for ; Wed, 30 Aug 2017 14:26:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9475D2867F for ; Wed, 30 Aug 2017 14:26:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 861A628684; Wed, 30 Aug 2017 14:26:56 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, RCVD_IN_DNSWL_LOW, RCVD_IN_SORBS_SPAM autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 47EC82867F for ; Wed, 30 Aug 2017 14:26:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=QImh/jp+GR4TaRzdXNaHFdKH8hVjqkFsg0Kr/MWgF/g=; b=ThTQyclTvLCs1zCIekhwnuscF7 h5C9doDCIVXmV67GOyBnPM59orN9+floHwm5zkM0F+LqBPSHFNRyhAwKovK4MDnl9Hph0jmTms2os ez179j5L1T7+0m42PJ36Ti7Qhybk96J9/WutfnIExtLT5YNm0o4V7UcInf5e3b+yKDxq6DBH7VZSq hSas4RGi1i+hMRKc+CJeBeN9uLFjE9SBunVOtU3saOEW9OAd1AFglrujx+y7Fbj/adf64l81f8KgM POnkuHjzdY39GoOao2EvAekzdsujaKZQ78G046hfk34woxVqp6VdFgqb5JN+Qwpwq8uP2EK5Pe9gd HDvBBufw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dn3xD-0007xk-TH; Wed, 30 Aug 2017 14:26:51 +0000 Received: from mail-wm0-f66.google.com ([74.125.82.66]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dn3vv-0005g4-Vj for linux-arm-kernel@lists.infradead.org; Wed, 30 Aug 2017 14:25:44 +0000 Received: by mail-wm0-f66.google.com with SMTP id u26so1957978wma.5 for ; Wed, 30 Aug 2017 07:25:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=6g0lkFSiY9+qwTZSmr4T+XOmcNxS9eDdmyr5PhhfFK0=; b=p1A+raE2Wsbxb7Np0gpy1n/FMvWm8yfNOPaCjZHI9RVLjReD4wl4P0glSAyYm/J8sW xodAUC5T02k2K0oM9G/KRaGTv4Tv/uTrhFZlhzk+R9ZJynuOjXMrF/HYmnvFjbIKBIER CmT0gIlJ6LdNZAbpOm8+PMR0ADdXcr3kGUdd4Xg5uv21JzxZgCfhRCQvleZButzxasu/ I6zTnHIgw/koVvV3f/Y31wqivXfxAYoZ2J4LGxV86SqRkcEqDRSdLiGSI0NNXB9xXs2D dOcOWOSlAhbfMA3L/M1TOUGG0aPGj2zWMW15Z+7jCt485+oA+mhCRJhcw9iBVY3sWft4 jaAA== X-Gm-Message-State: AHYfb5i4NfRUhhCgBInqVyoMeumi9OPWPDix8jWXXsCe7LCqI98gmkw7 DF9/yhBFH+jgsA== X-Received: by 10.28.92.203 with SMTP id q194mr1636271wmb.165.1504103111476; Wed, 30 Aug 2017 07:25:11 -0700 (PDT) Received: from hc.fritz.box (HSI-KBW-46-223-66-184.hsi.kabel-badenwuerttemberg.de. [46.223.66.184]) by smtp.gmail.com with ESMTPSA id p105sm97012wrc.64.2017.08.30.07.25.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 30 Aug 2017 07:25:11 -0700 (PDT) From: Jan Glauber To: Bjorn Helgaas Subject: [PATCH v3 3/3] PCI: Avoid slot reset for Cavium cn8xxx root ports Date: Wed, 30 Aug 2017 16:24:54 +0200 Message-Id: <20170830142454.10971-4-jglauber@cavium.com> X-Mailer: git-send-email 2.9.0.rc0.21.g7777322 In-Reply-To: <20170830142454.10971-1-jglauber@cavium.com> References: <20170830142454.10971-1-jglauber@cavium.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170830_072532_664479_D766DC63 X-CRM114-Status: UNSURE ( 9.64 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kvm@vger.kernel.org, david.daney@cavium.com, linux-pci@vger.kernel.org, Jan Glauber , Robert Richter , linux-kernel@vger.kernel.org, Alex Williamson , Jon Masters , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Root ports of cn8xxx do not function after a slot reset when used with some e1000e and LSI HBA devices. Add a quirk to prevent slot reset on these root ports. Signed-off-by: Jan Glauber --- drivers/pci/quirks.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c index 85191b8..6679971 100644 --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c @@ -845,6 +845,22 @@ static void quirk_cavium_sriov_rnm_link(struct pci_dev *dev) DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_CAVIUM, 0xa018, quirk_cavium_sriov_rnm_link); #endif +/* + * Root port on some Cavium CN8xxx chips do not successfully complete + * a bus reset when used with certain types of child devices. Config + * space access to the child may quit responding. Flag all devices under + * the secondary bus as non-resettable. + */ +static void quirk_CN8xxx_secondary_bus(struct pci_dev *dev) +{ + struct pci_dev *pdev; + + dev_warn(&dev->dev, "Cavium CN8xxx quirk detected; reset for devices on secondary bus disabled\n"); + list_for_each_entry(pdev, &dev->subordinate->devices, bus_list) + pdev->dev_flags |= PCI_DEV_FLAGS_NO_BUS_RESET; +} +DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_CAVIUM, 0xa100, quirk_CN8xxx_secondary_bus); + /* * Some settings of MMRBC can lead to data corruption so block changes. * See AMD 8131 HyperTransport PCI-X Tunnel Revision Guide