From patchwork Mon Sep 14 20:25:11 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rafael Wysocki X-Patchwork-Id: 47460 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n8EKRVlh021361 for ; Mon, 14 Sep 2009 20:27:31 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933685AbZINUYP (ORCPT ); Mon, 14 Sep 2009 16:24:15 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S933829AbZINUYP (ORCPT ); Mon, 14 Sep 2009 16:24:15 -0400 Received: from ogre.sisk.pl ([217.79.144.158]:55115 "EHLO ogre.sisk.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932733AbZINUYM (ORCPT ); Mon, 14 Sep 2009 16:24:12 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by ogre.sisk.pl (Postfix) with ESMTP id 7A36C157CB2; Mon, 14 Sep 2009 19:19:11 +0200 (CEST) Received: from ogre.sisk.pl ([127.0.0.1]) by localhost (ogre.sisk.pl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 23306-08; Mon, 14 Sep 2009 19:18:51 +0200 (CEST) Received: from tosh.localnet (220-bem-13.acn.waw.pl [82.210.184.220]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ogre.sisk.pl (Postfix) with ESMTP id 0953D158053; Mon, 14 Sep 2009 19:18:51 +0200 (CEST) From: "Rafael J. Wysocki" To: Jesse Barnes Subject: [PATCH] PCI / PCIe portdrv: Fix pcie_portdrv_slot_reset() Date: Mon, 14 Sep 2009 22:25:11 +0200 User-Agent: KMail/1.12.1 (Linux/2.6.31-rjw; KDE/4.3.1; x86_64; ; ) Cc: LKML , Linux PCI MIME-Version: 1.0 Message-Id: <200909142225.11874.rjw@sisk.pl> X-Virus-Scanned: amavisd-new at ogre.sisk.pl using MkS_Vir for Linux Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org From: Rafael J. Wysocki After commit c82f63e411f1b58427c103bd95af2863b1c96dd1 (PCI: check saved state before restore) pcie_portdrv_slot_reset() may not work correctly if dev->error_state is equal to pci_channel_io_frozen, because dev->state_saved need not be set at that time. Fix this issue by setting dev->state_saved before pci_restore_state() is called in pcie_portdrv_slot_reset(). From: Rafael J. Wysocki --- drivers/pci/pcie/portdrv_pci.c | 1 + 1 file changed, 1 insertion(+) -- 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 Index: linux-2.6/drivers/pci/pcie/portdrv_pci.c =================================================================== --- linux-2.6.orig/drivers/pci/pcie/portdrv_pci.c +++ linux-2.6/drivers/pci/pcie/portdrv_pci.c @@ -205,6 +205,7 @@ static pci_ers_result_t pcie_portdrv_slo /* If fatal, restore cfg space for possible link reset at upstream */ if (dev->error_state == pci_channel_io_frozen) { + dev->state_saved = true; pci_restore_state(dev); pcie_portdrv_restore_config(dev); pci_enable_pcie_error_reporting(dev);