All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Mika Westerberg <mika.westerberg@linux.intel.com>,
	"Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
Cc: Bjorn Helgaas <bhelgaas@google.com>,
	Jesse Barnes <jbarnes@virtuousgeek.org>,
	Yinghai Lu <yinghai@kernel.org>,
	Heikki Krogerus <heikki.krogerus@linux.intel.com>,
	linux-acpi@vger.kernel.org, linux-pci@vger.kernel.org
Subject: Re: [PATCH v2 3/8] PCI: acpiphp: enable_device(): rescan even if no new devices on slot
Date: Thu, 11 Jul 2013 02:25:42 +0200	[thread overview]
Message-ID: <1827270.u1sYdQ8l8y@vostro.rjw.lan> (raw)
In-Reply-To: <1372860295-8306-4-git-send-email-mika.westerberg@linux.intel.com>

On Wednesday, July 03, 2013 05:04:50 PM Mika Westerberg wrote:
> From: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
> 
> pci_scan_slot() returns number of new devices connected *directly*
> connected to the slot. Current enable_device() checks the return value
> and stops if it doesn't see a new device.
> 
> In Thunderbolt chaining case the new device can be deeper in hierarchy, so
> do the rescan anyway.
> 
> Because of that we must make sure that pcibios_resource_survey_bus() and
> check_hotplug_bridge() get called only for a just found bus and not the
> ones already added to the system. Failure to do so will lead to resource
> conflicts.

Well, I wonder what we're doing to this end, because there's nothing in that
area in the patch?

> Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
> Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
> ---
>  drivers/pci/hotplug/acpiphp_glue.c | 11 ++---------
>  1 file changed, 2 insertions(+), 9 deletions(-)
> 
> diff --git a/drivers/pci/hotplug/acpiphp_glue.c b/drivers/pci/hotplug/acpiphp_glue.c
> index b983e29..0f4da3b 100644
> --- a/drivers/pci/hotplug/acpiphp_glue.c
> +++ b/drivers/pci/hotplug/acpiphp_glue.c
> @@ -685,18 +685,13 @@ static int __ref enable_device(struct acpiphp_slot *slot)
>  	struct pci_dev *dev;
>  	struct pci_bus *bus = slot->bridge->pci_bus;
>  	struct acpiphp_func *func;
> -	int num, max, pass;
> +	int max, pass;
>  	LIST_HEAD(add_list);
>  
>  	list_for_each_entry(func, &slot->funcs, sibling)
>  		acpiphp_bus_add(func);
>  
> -	num = pci_scan_slot(bus, PCI_DEVFN(slot->device, 0));
> -	if (num == 0) {
> -		/* Maybe only part of funcs are added. */
> -		dbg("No new device found\n");
> -		goto err_exit;
> -	}
> +	pci_scan_slot(bus, PCI_DEVFN(slot->device, 0));
>  	max = acpiphp_max_busnr(bus);
>  	for (pass = 0; pass < 2; pass++) {
> @@ -742,8 +737,6 @@ static int __ref enable_device(struct acpiphp_slot *slot)
>  		}
>  	}
>  
> -
> - err_exit:
>  	return 0;
>  }
>  
> 
-- 
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.

  reply	other threads:[~2013-07-11  0:25 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-03 14:04 [PATCH v2 0/8] Thunderbolt workarounds Mika Westerberg
2013-07-03 14:04 ` [PATCH v2 1/8] x86/PCI: prevent re-allocation of already existing bridge and ROM resources Mika Westerberg
2013-07-23  0:08   ` Bjorn Helgaas
2013-07-23  1:18     ` Bjorn Helgaas
2013-07-23  1:33       ` Bjorn Helgaas
2013-07-23  2:01         ` Rafael J. Wysocki
2013-07-23  1:50       ` Rafael J. Wysocki
2013-07-03 14:04 ` [PATCH v2 2/8] PCI: acpiphp: do not check for SLOT_ENABLED in enable_device() Mika Westerberg
2013-07-03 14:04 ` [PATCH v2 3/8] PCI: acpiphp: enable_device(): rescan even if no new devices on slot Mika Westerberg
2013-07-11  0:25   ` Rafael J. Wysocki [this message]
2013-07-11  5:11     ` Mika Westerberg
2013-07-11 22:48       ` Rafael J. Wysocki
2013-07-03 14:04 ` [PATCH v2 4/8] PCI: acpiphp: check for new devices on enabled host Mika Westerberg
2013-07-03 14:04 ` [PATCH v2 5/8] PCI: acpiphp: kill SLOT_ENABLED in favor of always re-enumerating the devices Mika Westerberg
2013-07-03 14:04 ` [PATCH v2 6/8] PCI: acpiphp: workaround for Thunderbolt on Acer Aspire S5 Mika Westerberg
2013-07-03 21:40   ` Rafael J. Wysocki
2013-07-04  8:58     ` Mika Westerberg
2013-07-04 12:36       ` Rafael J. Wysocki
2013-07-04 12:53         ` Mika Westerberg
2013-07-04 13:14           ` Rafael J. Wysocki
2013-07-04 13:33             ` Mika Westerberg
2013-07-04 13:53               ` Rafael J. Wysocki
2013-07-04 14:29                 ` [PATCH v2.1 " Mika Westerberg
2013-07-04 23:48                   ` Rafael J. Wysocki
2013-07-05  5:47                     ` Mika Westerberg
2013-07-19  3:57     ` [PATCH v2 " Robert Hancock
2013-07-19 12:18       ` Rafael J. Wysocki
2013-07-03 21:45   ` Bjorn Helgaas
2013-07-03 21:58     ` Rafael J. Wysocki
2013-07-03 14:04 ` [PATCH v2 7/8] PCI: acpiphp: get rid of unused constants in acpiphp.h Mika Westerberg
2013-07-03 14:04 ` [PATCH v2 8/8] PCI: acpiphp: sanitize acpiphp_get_[latch|adapter]_status() Mika Westerberg
2013-07-03 18:29 ` [PATCH v2 0/8] Thunderbolt workarounds Matthew Garrett
2013-07-03 18:33   ` Greg Kroah-Hartman
2013-07-03 18:44     ` Matthew Garrett
2013-07-03 19:57       ` Ronciak, John
2013-07-03 20:35         ` Matthew Garrett
2013-07-03 20:46           ` Ronciak, John
2013-07-03 21:21             ` Matthew Garrett
2013-07-03 18:41   ` Mika Westerberg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1827270.u1sYdQ8l8y@vostro.rjw.lan \
    --to=rjw@sisk.pl \
    --cc=bhelgaas@google.com \
    --cc=heikki.krogerus@linux.intel.com \
    --cc=jbarnes@virtuousgeek.org \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=mika.westerberg@linux.intel.com \
    --cc=yinghai@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.