From patchwork Tue Feb 20 00:02:11 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Russell Currey X-Patchwork-Id: 875340 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [103.22.144.68]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3zlgmC3FK0z9rxx for ; Tue, 20 Feb 2018 11:02:35 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.b="OR0XB+AP"; dkim-atps=neutral Received: from bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 3zlgmC17C7zDrHR for ; Tue, 20 Feb 2018 11:02:35 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.b="OR0XB+AP"; dkim-atps=neutral X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=russell.cc (client-ip=66.111.4.25; helo=out1-smtp.messagingengine.com; envelope-from=ruscur@russell.cc; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.b="OR0XB+AP"; dkim-atps=neutral Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3zlgm51yB1zDr5F for ; Tue, 20 Feb 2018 11:02:26 +1100 (AEDT) Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 6B1DA20D32; Mon, 19 Feb 2018 19:02:23 -0500 (EST) Received: from frontend1 ([10.202.2.160]) by compute6.internal (MEProxy); Mon, 19 Feb 2018 19:02:23 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:date:from:message-id:subject:to :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=5ltCVvGQnKNnDba/n kTWHhz5XzB3XgMh2lbXnGGnhkU=; b=OR0XB+APlJg8sQTKGqaVwMxTSCHPY6h+F Zo65WbbGJ0xlCQ8GrCXwe05RHABKnCW/7J1xAEPXccJAfq3s/NBGN1LuIRZWGzXz XyHbS2CPUzX/vpeP71dPlqu4S2cbCbg8U5OPlp8Ma2TkcDXBFDiXuwHMNHGUv0r/ 0BmSGnCYLQvZuzZj8P3M1TgPBxavoCq0erFZnSWhBXZDUASxQPtcY5ePQmRl0XQf QEWYvWyNpAHTbLGiesA+alaQme+ZmN5xLGo8e7NmZZ40DV1sB3xHxMZCgGs4tEzA TzVWgwyIdX4Go0u/iSCjyJk7eXAQCQ47PaqN3221aX1SwQdVEYD8Q== X-ME-Sender: Received: from snap.ozlabs.ibm.com (unknown [122.99.82.10]) by mail.messagingengine.com (Postfix) with ESMTPA id 4DCA37E0ED; Mon, 19 Feb 2018 19:02:22 -0500 (EST) From: Russell Currey To: skiboot@lists.ozlabs.org Date: Tue, 20 Feb 2018 11:02:11 +1100 Message-Id: <20180220000211.7447-1-ruscur@russell.cc> X-Mailer: git-send-email 2.14.1 Subject: [Skiboot] [PATCH] Revert "pci: Shared slot state synchronisation for hot reset" X-BeenThere: skiboot@lists.ozlabs.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: Mailing list for skiboot development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Skiboot" An issue was found in shared slot reset where the system can be stuck in an infinite loop, pull the code out until there's a proper fix. This reverts commit 1172a6c57ff3c66f6361e572a1790cbcc0e5ff37. Signed-off-by: Russell Currey --- core/pci-slot.c | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/core/pci-slot.c b/core/pci-slot.c index f8922df5..8bddc147 100644 --- a/core/pci-slot.c +++ b/core/pci-slot.c @@ -78,7 +78,6 @@ static void pci_slot_prepare_link_change(struct pci_slot *slot, bool up) static int64_t pci_slot_run_sm(struct pci_slot *slot) { - struct pci_slot *peer = slot->peer_slot; uint64_t now = mftb(); int64_t ret; @@ -90,23 +89,10 @@ static int64_t pci_slot_run_sm(struct pci_slot *slot) slot->delay_tgt_tb = 0; switch (slot->state & PCI_SLOT_STATE_MASK) { case PCI_SLOT_STATE_LINK: - // If the peer slot hasn't finished its hreset, need to wait - if (peer && peer->state & PCI_SLOT_STATE_HRESET && - !pci_slot_has_flags(peer, PCI_SLOT_FLAG_BOOTUP)) - return slot->ops.hreset(peer); - ret = slot->ops.poll_link(slot); - if (peer && peer->state & PCI_SLOT_STATE_LINK && - !pci_slot_has_flags(peer, PCI_SLOT_FLAG_BOOTUP)) - ret = MAX(ret, slot->ops.poll_link(peer)); break; case PCI_SLOT_STATE_HRESET: ret = slot->ops.hreset(slot); - - // If the slot has a peer, it needs to hreset as well. - if (peer && peer->state == PCI_SLOT_STATE_NORMAL && - !pci_slot_has_flags(peer, PCI_SLOT_FLAG_BOOTUP)) - slot->ops.hreset(peer); break; case PCI_SLOT_STATE_FRESET: ret = slot->ops.freset(slot);