From patchwork Tue Jul 7 19:24:35 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Duyck X-Patchwork-Id: 6738741 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: X-Original-To: patchwork-linux-pci@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id E4EDA9F3E6 for ; Tue, 7 Jul 2015 19:24:40 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2363320642 for ; Tue, 7 Jul 2015 19:24:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id F03112060B for ; Tue, 7 Jul 2015 19:24:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932742AbbGGTYh (ORCPT ); Tue, 7 Jul 2015 15:24:37 -0400 Received: from mx1.redhat.com ([209.132.183.28]:43469 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932617AbbGGTYg (ORCPT ); Tue, 7 Jul 2015 15:24:36 -0400 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (Postfix) with ESMTPS id 9B0002D8B6D; Tue, 7 Jul 2015 19:24:36 +0000 (UTC) Received: from [192.168.1.116] (vpn-232-87.phx2.redhat.com [10.3.232.87]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t67JOZFK001675; Tue, 7 Jul 2015 15:24:35 -0400 Subject: [PATCH] pcie: Restore ACS configuration as part of pci_restore_state From: Alexander Duyck To: bhelgaas@google.com, linux-pci@vger.kernel.org Cc: Alex Williamson , Allen Kay , Chris Wright Date: Tue, 07 Jul 2015 12:24:35 -0700 Message-ID: <20150707192434.8444.74316.stgit@ahduyck-server> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.68 on 10.5.11.27 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.7 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 This change is meant to address the fact that ACS state was not being restored as a part of the PCI configuration restoration following a PCIe reset. Without this patch it is not possible to reassign interfaces behind ACS enabled switches following a system suspend as all of the ACS functionality is disabled due to the D0->D3->D0 state transition cycle clearing the configuration state and the fact that the ACS logic was only initialized in probe. Cc: Allen Kay Cc: Chris Wright Cc: Alex Williamson Signed-off-by: Alexander Duyck --- drivers/pci/pci.c | 3 +++ 1 file changed, 3 insertions(+) -- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index 0008c950452c..9bd9526f3388 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c @@ -1092,6 +1092,9 @@ void pci_restore_state(struct pci_dev *dev) pci_restore_pcix_state(dev); pci_restore_msi_state(dev); + + /* Restore ACS and IOV configuration state */ + pci_enable_acs(dev); pci_restore_iov_state(dev); dev->state_saved = false;