From patchwork Mon Jun 24 13:34:50 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ilya Kuznetsov X-Patchwork-Id: 1121278 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 45XVtk2Kljz9s3l for ; Mon, 24 Jun 2019 23:46:06 +1000 (AEST) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=yadro.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=yadro.com header.i=@yadro.com header.b="LB0vGjYD"; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 45XVtj1LxNzDqSW for ; Mon, 24 Jun 2019 23:46:05 +1000 (AEST) X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=yadro.com (client-ip=89.207.88.252; helo=mta-01.yadro.com; envelope-from=ilya@yadro.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=yadro.com Authentication-Results: lists.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=yadro.com header.i=@yadro.com header.b="LB0vGjYD"; dkim-atps=neutral X-Greylist: delayed 465 seconds by postgrey-1.36 at bilbo; Mon, 24 Jun 2019 23:45:55 AEST Received: from mta-01.yadro.com (mta-02.yadro.com [89.207.88.252]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 45XVtW6HkxzDqQL for ; Mon, 24 Jun 2019 23:45:55 +1000 (AEST) Received: from localhost (unknown [127.0.0.1]) by mta-01.yadro.com (Postfix) with ESMTP id B112F41200; Mon, 24 Jun 2019 13:38:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yadro.com; h= content-type:content-type:content-transfer-encoding:mime-version :references:in-reply-to:x-mailer:message-id:date:date:subject :subject:from:from:received:received:received; s=mta-01; t= 1561383483; x=1563197884; bh=dtuOw+WWH3gT1q/ZWJeiY1B5DhtmrObPox8 wIWrNLEs=; b=LB0vGjYDlc/+1aPslNGPS2sGJG4qe7m3qUxQaFs8troEUHm6ZcG X/BvxWv9YL7oZ9GCY4owuhPnyyyg21WBxaZlAVI4czB6ZHHrPTDD7d4OuR2CbgSc V1QmUEJIUIoZg9DUhvVPmEr+5sCpcL30k23WDbgYY62fSbc9cPp/8V60= X-Virus-Scanned: amavisd-new at yadro.com Received: from mta-01.yadro.com ([127.0.0.1]) by localhost (mta-01.yadro.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 8l1wuN0jyfiO; Mon, 24 Jun 2019 16:38:03 +0300 (MSK) Received: from T-EXCH-02.corp.yadro.com (t-exch-02.corp.yadro.com [172.17.10.102]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mta-01.yadro.com (Postfix) with ESMTPS id ABB41411FF; Mon, 24 Jun 2019 16:38:03 +0300 (MSK) Received: from ordenador.yadro.com (172.17.15.46) by T-EXCH-02.corp.yadro.com (172.17.10.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.669.32; Mon, 24 Jun 2019 16:38:03 +0300 From: Ilya Kuznetsov To: skiboot list Date: Mon, 24 Jun 2019 16:34:50 +0300 Message-ID: <20190624133449.7641-1-ilya@yadro.com> X-Mailer: git-send-email 2.22.0 In-Reply-To: References: MIME-Version: 1.0 X-Originating-IP: [172.17.15.46] X-ClientProxiedBy: T-EXCH-01.corp.yadro.com (172.17.10.101) To T-EXCH-02.corp.yadro.com (172.17.10.102) Subject: [Skiboot] [PATCH v2] Allow to create slot for downstream port of any switch X-BeenThere: skiboot@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Mailing list for skiboot development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Skiboot" System vendor may build systems with large PCIe tree with deeper switch topologies. Currenlty downstream ports slot creation is limited to first switch. Patch allows to use any. Signed-off-by: Ilya Kuznetsov --- core/pcie-slot.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/core/pcie-slot.c b/core/pcie-slot.c index e7013d1e..dc5e4dcb 100644 --- a/core/pcie-slot.c +++ b/core/pcie-slot.c @@ -544,13 +544,8 @@ struct pci_slot *pcie_slot_create_dynamic(struct phb *phb, if (!phb || !pd || pd->slot) return NULL; - /* Try to create slot whose details aren't provided by platform. - * We only care the downstream ports of PCIe switch that connects - * to root port. - */ - if (pd->dev_type != PCIE_TYPE_SWITCH_DNPORT || - !pd->parent || !pd->parent->parent || - pd->parent->parent->parent) + /* Try to create slot whose details aren't provided by platform. */ + if (pd->dev_type != PCIE_TYPE_SWITCH_DNPORT) return NULL; ecap = pci_cap(pd, PCI_CFG_CAP_ID_EXP, false);