Re: [PATCH 4/8] PCI hotplug: add pci_configure_slot()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thursday 27 August 2009 02:08:22 pm Gary Hade wrote:
> On Thu, Aug 27, 2009 at 09:00:38AM -0600, Bjorn Helgaas wrote:
> > On Wednesday 26 August 2009 11:00:28 pm Rolf Eike Beer wrote:
> > > Bjorn Helgaas wrote:
> > > > This patch adds a new pci_configure_slot() function that programs the
> > > > PCI bus characteristics for a newly-added device.  This is based on
> > > > code in pciehp_pci.c, but this should be generic enough to be used by
> > > > pciehp, shpchp, and acpiphp.
> > > 
> > > > diff --git a/include/linux/pci_hotplug.h b/include/linux/pci_hotplug.h
> > > > index 0f3e1db..8cff1d5 100644
> > > > --- a/include/linux/pci_hotplug.h
> > > > +++ b/include/linux/pci_hotplug.h
> > > > @@ -230,6 +230,10 @@ int acpi_get_hp_params(struct pci_dev *dev, struct
> > > > hotplug_params *hpp); int acpi_get_hp_hw_control_from_firmware(struct
> > > > pci_dev *dev, u32 flags); int acpi_pci_check_ejectable(struct pci_bus
> > > > *pbus, acpi_handle handle); int acpi_pci_detect_ejectable(struct pci_bus
> > > > *pbus);
> > > > +#else
> > > > +#define acpi_get_hp_params(dev, hpp)	(-ENODEV)
> > > 
> > > Shouldn't that be "static inline acpi_get_hp_params(...) { return -ENODEV; }" 
> > > so it behaves exactly like the original function (e.g. function pointer can be 
> > > taken)?
> > 
> > Thanks, Eike, that's a good point.  I copied the style from the
> > original pciehp_get_hp_params_from_firmware() definitions (which
> > my next patch removes), but it would be an improvement to use an
> > inline function.
> > 
> > It also occurred to me last night that pci_configure_slot() will
> > probably need to be exported, and that there's no need to check
> > "dev->is_pcie" before calling program_hpp_type2(), because we
> > bail out of program_hpp_type2() anyway if there's no PCI_CAP_ID_EXP.
> 
> Bjorn, I didn't see any 'acpiphp' functional issues when I just
> tried 2.6.31-rc7 with your patches (plus the definitely needed
> pci_configure_slot export) on one of our systems (IBM x3850).

Oh, great!  Thanks a lot for actually trying it out!  I've tried
acpiphp on an HP rx3600, but haven't been able to try out pciehp
or shpchp yet.

Bjorn
--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux