From: Prarit Bhargava <prarit@sgi.com>
To: scottm@somanetworks.com
Cc: Greg K-H <greg@kroah.com>,
linux-kernel@vger.kernel.org, linux-pci@atrey.karlin.mff.cuni.cz
Subject: Re: [PATCH] PCI Hotplug: more CPCI updates
Date: Wed, 01 Jun 2005 22:41:15 -0400 [thread overview]
Message-ID: <429E71CB.3010609@sgi.com> (raw)
In-Reply-To: <11176025242587@kroah.com>
Greg KH wrote:
> [PATCH] PCI Hotplug: more CPCI updates
> - Switch to pci_get_slot instead of deprecated pci_find_slot.
> - A bunch of CodingStyle fixes.
> - }
> + dev = pci_get_slot(slot->bus, PCI_DEVFN(slot->number, 0));
> + if (dev) {
> + if (update_adapter_status(slot->hotplug_slot, 1))
> + warn("failure to update adapter file");
> + if (update_latch_status(slot->hotplug_slot, 1))
> + warn("failure to update latch file");
> + slot->dev = dev;
> }
> }
I don't claim to know the code as well as Scott or Greg does, but I don't see a
pci_put_dev for the slot->dev to clean up the usage count?
> @@ -311,10 +277,10 @@ int cpci_configure_slot(struct slot* slo
> */
> n = pci_scan_slot(slot->bus, slot->devfn);
> dbg("%s: pci_scan_slot returned %d", __FUNCTION__, n);
> - if(n > 0)
> + if (n > 0)
> pci_bus_add_devices(slot->bus);
> - slot->dev = pci_find_slot(slot->bus->number, slot->devfn);
> - if(slot->dev == NULL) {
> + slot->dev = pci_get_slot(slot->bus, slot->devfn);
> + if (slot->dev == NULL) {
> err("Could not find PCI device for slot %02x", slot->number);
> return 1;
> }
Same here -- I don't see a pci_put_dev for the slot->dev.
> @@ -341,15 +305,15 @@ int cpci_unconfigure_slot(struct slot* s
> struct pci_dev *dev;
>
> dbg("%s - enter", __FUNCTION__);
> - if(!slot->dev) {
> + if (!slot->dev) {
> err("No device for slot %02x\n", slot->number);
> return -ENODEV;
> }
>
> for (i = 0; i < 8; i++) {
> - dev = pci_find_slot(slot->bus->number,
> + dev = pci_get_slot(slot->bus,
> PCI_DEVFN(PCI_SLOT(slot->devfn), i));
> - if(dev) {
> + if (dev) {
> pci_remove_bus_device(dev);
> slot->dev = NULL;
> }
And again here...
P.
next prev parent reply other threads:[~2005-06-02 2:41 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-06-01 5:08 [GIT PATCH] PCI bugfixes for 2.6.12-rc5 Greg KH
2005-06-01 5:08 ` [PATCH] PCI Hotplug: SHPCHP driver doesn't enable PERR and SERR properly Greg KH
2005-06-01 5:08 ` [PATCH] PCI Hotplug: shpchp driver doesn't program _HPP values properly Greg KH
2005-06-01 5:08 ` [PATCH] PCI: amd74xx patch for new NVIDIA device IDs Greg KH
2005-06-01 5:08 ` [PATCH] PCI Hotplug: more CPCI updates Greg KH
2005-06-02 2:41 ` Prarit Bhargava [this message]
2005-06-02 2:46 ` Prarit Bhargava
2005-06-02 3:03 ` Scott Murray
2005-06-06 19:48 ` Scott Murray
2005-06-01 7:32 ` [PATCH] PCI: amd74xx patch for new NVIDIA device IDs Jeff Garzik
2005-06-01 9:50 ` Bartlomiej Zolnierkiewicz
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=429E71CB.3010609@sgi.com \
--to=prarit@sgi.com \
--cc=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@atrey.karlin.mff.cuni.cz \
--cc=scottm@somanetworks.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox