From patchwork Wed Jun 21 06:31:08 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alistair Popple X-Patchwork-Id: 779230 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 3wtP8L5Xv0z9s4q for ; Thu, 22 Jun 2017 11:27:30 +1000 (AEST) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 3wtP8L3cYBzDrGS for ; Thu, 22 Jun 2017 11:27:30 +1000 (AEST) X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Received: from ozlabs.org (ozlabs.org [103.22.144.67]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3wsvxD132RzDqhq for ; Wed, 21 Jun 2017 16:31:12 +1000 (AEST) Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPSA id 3wsvxC6YzNz9s74; Wed, 21 Jun 2017 16:31:11 +1000 (AEST) From: Alistair Popple To: skiboot@lists.ozlabs.org Date: Wed, 21 Jun 2017 16:31:08 +1000 Message-Id: <1498026669-2704-2-git-send-email-alistair@popple.id.au> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1498026669-2704-1-git-send-email-alistair@popple.id.au> References: <1498026669-2704-1-git-send-email-alistair@popple.id.au> Subject: [Skiboot] [PATCH 2/3] platforms/astbmc/slots.c: Allow comparison of bus numbers when matching slots X-BeenThere: skiboot@lists.ozlabs.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Mailing list for skiboot development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alistair Popple MIME-Version: 1.0 Errors-To: skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Skiboot" When matching devices on multiple down stream PLX busses we need to compare more than just the device-id of the PCIe BDFN, so increase the mask to do so. Signed-off-by: Alistair Popple --- platforms/astbmc/slots.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platforms/astbmc/slots.c b/platforms/astbmc/slots.c index 8be7426..a2bec87 100644 --- a/platforms/astbmc/slots.c +++ b/platforms/astbmc/slots.c @@ -77,7 +77,7 @@ static const struct slot_table_entry *match_slot_dev_entry(struct phb *phb, if (ent->etype == st_npu_slot) bdfn = pd->bdfn & 0xf8; else - bdfn = pd->bdfn & 0xff; + bdfn = pd->bdfn & 0xffff; if (ent->location == bdfn) return ent;