From patchwork Thu Jan 23 20:59:22 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Noever X-Patchwork-Id: 3531881 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: X-Original-To: patchwork-linux-pci@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 8614DC02DC for ; Thu, 23 Jan 2014 21:02:29 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C497C201C0 for ; Thu, 23 Jan 2014 21:02:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 04B822011D for ; Thu, 23 Jan 2014 21:02:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932122AbaAWVC0 (ORCPT ); Thu, 23 Jan 2014 16:02:26 -0500 Received: from mail-wg0-f49.google.com ([74.125.82.49]:64449 "EHLO mail-wg0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753429AbaAWVAB (ORCPT ); Thu, 23 Jan 2014 16:00:01 -0500 Received: by mail-wg0-f49.google.com with SMTP id a1so2100032wgh.28 for ; Thu, 23 Jan 2014 13:00:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=3iGvTf97rMfaw9uFdSSqawIk+Ud8Po+DgKA8X66f64I=; b=SDBDL/VT1Z3jlFMUv6JOQXcAyQ5oJwJw7m1Kk2klWF420WjodbX3T6WThY2Uo7Palh csgrTOEFpLOBkdqQ8F0gxwEVeaHli9PrXITRYFNICYtJoepU+7ZNCRIlkxCA3bqtzB8z AWq3Nb49/DstrNkEqS5cpk3tF3e/ie+/IbF+F+9YXAwRi9cf3Lp+f5sPYCQo83NQWR9u jWLokhqiNZlRje+kHk7dNDzXBBn4wvrUoXO6bZfyHyQentaWQvJ4fLoQmS/b38I0GxL1 fstvxbPUUmO8WeqtH8zzRAddNVAnlChPoR47KY3vvIDunWgLc41hShAJpUCfBqm5/+G0 B7sg== X-Received: by 10.194.109.68 with SMTP id hq4mr8306080wjb.12.1390510800176; Thu, 23 Jan 2014 13:00:00 -0800 (PST) Received: from localhost.localdomain (77-58-151-250.dclient.hispeed.ch. [77.58.151.250]) by mx.google.com with ESMTPSA id ux5sm25371408wjc.6.2014.01.23.12.59.59 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 23 Jan 2014 12:59:59 -0800 (PST) From: Andreas Noever To: linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, bhelgaas@google.com Cc: Andreas Noever Subject: [PATCH 2/8] PCI: Clarify the "scan anyway" comment in pci_scan_bridge. Date: Thu, 23 Jan 2014 21:59:22 +0100 Message-Id: <1390510768-5652-3-git-send-email-andreas.noever@gmail.com> X-Mailer: git-send-email 1.8.5.3 In-Reply-To: <1390510768-5652-1-git-send-email-andreas.noever@gmail.com> References: <1390510768-5652-1-git-send-email-andreas.noever@gmail.com> 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.3 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham 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 Initially when we encountered a bus that was already present we skipped it. Since 74710ded8e16 'PCI: always scan child buses' we continue scanning in order to allow user triggered rescans of already existing busses. The old comment suggested that the reason for continuing the scan is a bug in the i450NX chipset. This is not the case. Signed-off-by: Andreas Noever --- drivers/pci/probe.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c index 78caade..cf05b3e 100644 --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c @@ -805,11 +805,10 @@ int pci_scan_bridge(struct pci_bus *bus, struct pci_dev *dev, int max, int pass) goto out; /* - * If we already got to this bus through a different bridge, - * don't re-add it. This can happen with the i450NX chipset. - * - * However, we continue to descend down the hierarchy and - * scan remaining child buses. + * The bus might already exist for two reasons: Either we are + * rescanning the bus or the bus is reachable through more than + * one bridge. The second case can happen with the i450NX + * chipset. */ child = pci_find_bus(pci_domain_nr(bus), secondary); if (!child) {