LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Scott Murray <scottm@somanetworks.com>
To: Greg Kroah-Hartman <gregkh@suse.de>
Cc: linux-pci@atrey.karlin.mff.cuni.cz, linux-kernel@vger.kernel.org,
	pcihpd-discuss@lists.sourceforge.net,
	Kristen Carlson Accardi <kristen.c.accardi@intel.com>
Subject: Re: [PATCH 06/12] PCI Hotplug: make cpcihp driver use modern apis
Date: Fri, 15 Feb 2008 17:45:47 -0500 (EST)	[thread overview]
Message-ID: <alpine.LFD.0.9999.0802151744330.3386@rancor.yyz.somanetworks.com> (raw)
In-Reply-To: <1203036010-27988-6-git-send-email-gregkh@suse.de>

On Thu, 14 Feb 2008, Greg Kroah-Hartman wrote:

> This removes the depandancy of the cpcihp driver from the PCI_LEGACY
> config option by removing its usage of the pci_find_bus() function.
>
>
> Cc: Kristen Carlson Accardi <kristen.c.accardi@intel.com>
> Cc: Scott Murray <scottm@somanetworks.com>
> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

Sorry for the slow reply, this looks fine to me.

Signed-off-by: Scott Murray <scottm@somanetworks.com>

Scott

> ---
>  drivers/pci/hotplug/Kconfig          |    2 +-
>  drivers/pci/hotplug/cpcihp_generic.c |    8 +++++++-
>  2 files changed, 8 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/pci/hotplug/Kconfig b/drivers/pci/hotplug/Kconfig
> index 2cdd832..17fb3d6 100644
> --- a/drivers/pci/hotplug/Kconfig
> +++ b/drivers/pci/hotplug/Kconfig
> @@ -119,7 +119,7 @@ config HOTPLUG_PCI_CPCI_ZT5550
>
>  config HOTPLUG_PCI_CPCI_GENERIC
>  	tristate "Generic port I/O CompactPCI Hotplug driver"
> -	depends on HOTPLUG_PCI_CPCI && X86 && PCI_LEGACY
> +	depends on HOTPLUG_PCI_CPCI && X86
>  	help
>  	  Say Y here if you have a CompactPCI system card that exposes the #ENUM
>  	  hotswap signal as a bit in a system register that can be read through
> diff --git a/drivers/pci/hotplug/cpcihp_generic.c b/drivers/pci/hotplug/cpcihp_generic.c
> index f3852a6..148fb46 100644
> --- a/drivers/pci/hotplug/cpcihp_generic.c
> +++ b/drivers/pci/hotplug/cpcihp_generic.c
> @@ -154,12 +154,18 @@ static int __init cpcihp_generic_init(void)
>  	if(!r)
>  		return -EBUSY;
>
> -	dev = pci_find_slot(bridge_busnr, PCI_DEVFN(bridge_slot, 0));
> +	bus = pci_find_bus(0, bridge_busnr);
> +	if (!bus) {
> +		err("Invalid bus number %d", bridge_busnr);
> +		return -EINVAL;
> +	}
> +	dev = pci_get_slot(bus, PCI_DEVFN(bridge_slot, 0));
>  	if(!dev || dev->hdr_type != PCI_HEADER_TYPE_BRIDGE) {
>  		err("Invalid bridge device %s", bridge);
>  		return -EINVAL;
>  	}
>  	bus = dev->subordinate;
> +	pci_dev_put(dev);
>
>  	memset(&generic_hpc, 0, sizeof (struct cpci_hp_controller));
>  	generic_hpc_ops.query_enum = query_enum;
>

-- 
Scott Murray
SOMA Networks, Inc.
Toronto, Ontario
e-mail: scottm@somanetworks.com

  reply	other threads:[~2008-02-15 22:59 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-15  0:39 [RFC] PCI: remove the "shadow" device list Greg KH
2008-02-15  0:39 ` [PATCH 01/12] PCI: remove pci_find_present Greg Kroah-Hartman
2008-02-15  0:40 ` [PATCH 02/12] PCI: remove pci_get_device_reverse from calgary driver Greg Kroah-Hartman
2008-02-15  0:40 ` [PATCH 03/12] IDE: remove ide=reverse IDE core Greg Kroah-Hartman
2008-02-15  0:40 ` [PATCH 04/12] PCI: remove pci_get_device_reverse Greg Kroah-Hartman
2008-02-15  0:40 ` [PATCH 05/12] PCI: clean up search.c a lot Greg Kroah-Hartman
2008-02-15  0:40 ` [PATCH 06/12] PCI Hotplug: make cpcihp driver use modern apis Greg Kroah-Hartman
2008-02-15 22:45   ` Scott Murray [this message]
2008-02-19 19:32     ` [Pcihpd-discuss] " Greg KH
2008-02-15  0:40 ` [PATCH 07/12] PCI Hotplug: the ibm driver is not dependant on PCI_LEGACY Greg Kroah-Hartman
2008-02-15  0:40 ` [PATCH 08/12] PCI: remove initial bios sort of PCI devices on x86 Greg Kroah-Hartman
2008-02-15  0:40 ` [PATCH 09/12] PCI: make no_pci_devices() use the pci_bus_type list Greg Kroah-Hartman
2008-02-15  0:40 ` [PATCH 10/12] PCI: add is_added flag to struct pci_dev Greg Kroah-Hartman
2008-02-15  0:40 ` [PATCH 11/12] PCI: remove pcibious_fixup_ghosts() Greg Kroah-Hartman
2008-02-15  0:40 ` [PATCH 12/12] PCI: remove global list of PCI devices Greg Kroah-Hartman

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=alpine.LFD.0.9999.0802151744330.3386@rancor.yyz.somanetworks.com \
    --to=scottm@somanetworks.com \
    --cc=gregkh@suse.de \
    --cc=kristen.c.accardi@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@atrey.karlin.mff.cuni.cz \
    --cc=pcihpd-discuss@lists.sourceforge.net \
    --subject='Re: [PATCH 06/12] PCI Hotplug: make cpcihp driver use modern apis' \
    /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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).