From: Kristen Accardi <kristen.c.accardi@intel.com>
To: Arjan van de Ven <arjan@infradead.org>
Cc: pcihpd-discuss@lists.sourceforge.net, greg@kroah.com,
linux-kernel@vger.kernel.org
Subject: Re: [patch] pciehp: dont call pci_enable_dev
Date: Tue, 25 Apr 2006 15:00:36 -0700 [thread overview]
Message-ID: <1146002437.6478.43.camel@whizzy> (raw)
In-Reply-To: <1145945819.3114.0.camel@laptopd505.fenrus.org>
On Tue, 2006-04-25 at 08:16 +0200, Arjan van de Ven wrote:
> On Mon, 2006-04-24 at 15:50 -0700, Kristen Accardi wrote:
> > Don't call pci_enable_device from pciehp because the pcie port service driver
> > already does this.
>
> hmmmm shouldn't pci_enable_device on a previously enabled device just
> succeed? Sounds more than logical to me to make it that way at least...
I can't think of any reason why not. Something like this what you had
in mind perhaps?
---
drivers/pci/pci.c | 14 +++++++++-----
1 files changed, 9 insertions(+), 5 deletions(-)
--- 2.6-git-pcie.orig/drivers/pci/pci.c
+++ 2.6-git-pcie/drivers/pci/pci.c
@@ -504,11 +504,15 @@ pci_enable_device_bars(struct pci_dev *d
int
pci_enable_device(struct pci_dev *dev)
{
- int err = pci_enable_device_bars(dev, (1 << PCI_NUM_RESOURCES) - 1);
- if (err)
- return err;
- pci_fixup_device(pci_fixup_enable, dev);
- dev->is_enabled = 1;
+ int err;
+
+ if (!dev->is_enabled) {
+ err = pci_enable_device_bars(dev, (1 << PCI_NUM_RESOURCES) - 1);
+ if (err)
+ return err;
+ pci_fixup_device(pci_fixup_enable, dev);
+ dev->is_enabled = 1;
+ }
return 0;
}
next prev parent reply other threads:[~2006-04-25 21:51 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-24 22:50 [patch] pciehp: dont call pci_enable_dev Kristen Accardi
2006-04-25 6:16 ` Arjan van de Ven
2006-04-25 22:00 ` Kristen Accardi [this message]
2006-04-26 6:04 ` [Pcihpd-discuss] " Rolf Eike Beer
2006-04-26 15:52 ` Arjan van de Ven
2006-04-26 16:32 ` Kristen Accardi
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=1146002437.6478.43.camel@whizzy \
--to=kristen.c.accardi@intel.com \
--cc=arjan@infradead.org \
--cc=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
--cc=pcihpd-discuss@lists.sourceforge.net \
/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