All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yijing Wang <wangyijing@huawei.com>
To: Bjorn Helgaas <bhelgaas@google.com>, Yinghai Lu <yinghai@kernel.org>
Cc: Yijing Wang <wangyijing@huawei.com>,
	Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>,
	<linux-pci@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	Rafael <rjw@sisk.pl>, Hanjun Guo <guohanjun@huawei.com>,
	<jiang.liu@huawei.com>
Subject: Re: [PATCH 1/3] PCI,acpiphp: use generic pci_hp_add_bridge()
Date: Tue, 16 Apr 2013 09:49:41 +0800	[thread overview]
Message-ID: <516CAE35.7090204@huawei.com> (raw)
In-Reply-To: <1364808128-12792-1-git-send-email-wangyijing@huawei.com>

Hi Yinghai,
   Any comments about this patch? I searched the code history and found
you introduced pci_hp_add_bridge() function at commit a8e4b9c10. In your
patchset use pci_hp_add_bridge() for all pci hotplug drivers except acpiphp.
So I use pci_hp_add_bridge() in acpiphp instead of using pci_scan_bridge()
directly. I would appreciate if you can give some suggestions.

Thanks!
Yijing.

On 2013/4/1 17:22, Yijing Wang wrote:
> Use pci_hp_add_bridge() like most other hotplug drivers
> rather than call pci_scan_bridge() directly.
> 
> Signed-off-by: Yijing Wang <wangyijing@huawei.com>
> ---
>  drivers/pci/hotplug/acpiphp_glue.c |   24 ++++++++++--------------
>  1 files changed, 10 insertions(+), 14 deletions(-)
> 
> diff --git a/drivers/pci/hotplug/acpiphp_glue.c b/drivers/pci/hotplug/acpiphp_glue.c
> index 270fdba..7d7ed3f 100644
> --- a/drivers/pci/hotplug/acpiphp_glue.c
> +++ b/drivers/pci/hotplug/acpiphp_glue.c
> @@ -811,7 +811,7 @@ static int __ref enable_device(struct acpiphp_slot *slot)
>  	struct pci_bus *bus = slot->bridge->pci_bus;
>  	struct acpiphp_func *func;
>  	int retval = 0;
> -	int num, max, pass;
> +	int num;
>  	acpi_status status;
>  
>  	if (slot->flags & SLOT_ENABLED)
> @@ -827,22 +827,18 @@ static int __ref enable_device(struct acpiphp_slot *slot)
>  		goto err_exit;
>  	}
>  
> -	max = acpiphp_max_busnr(bus);
> -	for (pass = 0; pass < 2; pass++) {
> -		list_for_each_entry(dev, &bus->devices, bus_list) {
> -			if (PCI_SLOT(dev->devfn) != slot->device)
> +	list_for_each_entry(dev, &bus->devices, bus_list) {
> +		if (PCI_SLOT(dev->devfn) != slot->device)
>  				continue;
> -			if (dev->hdr_type == PCI_HEADER_TYPE_BRIDGE ||
> -			    dev->hdr_type == PCI_HEADER_TYPE_CARDBUS) {
> -				max = pci_scan_bridge(bus, dev, max, pass);
> -				if (pass && dev->subordinate) {
> -					check_hotplug_bridge(slot, dev);
> -					pci_bus_size_bridges(dev->subordinate);
> -				}
> -			}
> +		if ((dev->hdr_type == PCI_HEADER_TYPE_BRIDGE) ||
> +				(dev->hdr_type == PCI_HEADER_TYPE_CARDBUS))
> +			pci_hp_add_bridge(dev);
> +		if (dev->subordinate) {
> +			check_hotplug_bridge(slot, dev);
> +			pci_bus_size_bridges(dev->subordinate);
>  		}
>  	}
> -
> +
>  	pci_bus_assign_resources(bus);
>  	acpiphp_sanitize_bus(bus);
>  	acpiphp_set_hpp_values(bus);
> 


-- 
Thanks!
Yijing


  parent reply	other threads:[~2013-04-16  1:50 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-01  9:22 [PATCH 1/3] PCI,acpiphp: use generic pci_hp_add_bridge() Yijing Wang
2013-04-01  9:22 ` [PATCH 2/3] PCI: acpiphp: remove unused function acpiphp_max_busnr Yijing Wang
2013-04-01  9:22 ` [PATCH 3/3] PCI, pciehp: remove check for configure display devices Yijing Wang
2013-04-16  1:49 ` Yijing Wang [this message]
2013-04-16  3:55   ` [PATCH 1/3] PCI,acpiphp: use generic pci_hp_add_bridge() Yinghai Lu
2013-04-16  6:43     ` Yijing Wang

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=516CAE35.7090204@huawei.com \
    --to=wangyijing@huawei.com \
    --cc=bhelgaas@google.com \
    --cc=guohanjun@huawei.com \
    --cc=jiang.liu@huawei.com \
    --cc=kaneshige.kenji@jp.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=rjw@sisk.pl \
    --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.