Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 13814
b: refs/heads/master
c: 427bf53
h: refs/heads/master
v: v3
  • Loading branch information
rajesh.shah@intel.com authored and Greg Kroah-Hartman committed Nov 11, 2005
1 parent 477f3fc commit a6d8d19
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 16 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1a9ed1bfe2fb17cc30227a12a3c1212128bb78b6
refs/heads/master: 427bf532b5ad6db5addc2bce675d13f874397c0c
9 changes: 4 additions & 5 deletions trunk/drivers/pci/hotplug/pciehprm_acpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -143,22 +143,21 @@ static acpi_status acpi_run_oshp(acpi_handle handle)
int get_hp_hw_control_from_firmware(struct pci_dev *dev)
{
acpi_status status;
acpi_handle handle = DEVICE_ACPI_HANDLE(&(dev->dev));
/*
* Per PCI firmware specification, we should run the ACPI _OSC
* method to get control of hotplug hardware before using it
*/
/* Fixme: run _OSC for a specific host bridge, not all of them */
status = pci_osc_control_set(OSC_PCI_EXPRESS_NATIVE_HP_CONTROL);
status = pci_osc_control_set(handle,
OSC_PCI_EXPRESS_NATIVE_HP_CONTROL);

/* Fixme: fail native hotplug if _OSC does not exist for root ports */
if (status == AE_NOT_FOUND) {
/*
* Some older BIOS's don't support _OSC but support
* OSHP to do the same thing
*/
acpi_handle handle = DEVICE_ACPI_HANDLE(&(dev->dev));
if (handle)
status = acpi_run_oshp(handle);
status = acpi_run_oshp(handle);
}
if (ACPI_FAILURE(status)) {
err("Cannot get control of hotplug hardware\n");
Expand Down
11 changes: 3 additions & 8 deletions trunk/drivers/pci/pci-acpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,7 @@ acpi_query_osc (
static acpi_status
acpi_run_osc (
acpi_handle handle,
u32 level,
void *context,
void **retval )
void *context)
{
acpi_status status;
struct acpi_object_list input;
Expand Down Expand Up @@ -184,7 +182,7 @@ EXPORT_SYMBOL(pci_osc_support_set);
*
* Attempt to take control from Firmware on requested control bits.
**/
acpi_status pci_osc_control_set(u32 flags)
acpi_status pci_osc_control_set(acpi_handle handle, u32 flags)
{
acpi_status status;
u32 ctrlset;
Expand All @@ -198,10 +196,7 @@ acpi_status pci_osc_control_set(u32 flags)
return AE_SUPPORT;
}
ctrlset_buf[OSC_CONTROL_TYPE] |= ctrlset;
status = acpi_get_devices ( PCI_ROOT_HID_STRING,
acpi_run_osc,
ctrlset_buf,
NULL );
status = acpi_run_osc(handle, ctrlset_buf);
if (ACPI_FAILURE (status)) {
ctrlset_buf[OSC_CONTROL_TYPE] &= ~ctrlset;
}
Expand Down
5 changes: 3 additions & 2 deletions trunk/include/linux/pci-acpi.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,15 @@
OSC_PCI_EXPRESS_CAP_STRUCTURE_CONTROL)

#ifdef CONFIG_ACPI
extern acpi_status pci_osc_control_set(u32 flags);
extern acpi_status pci_osc_control_set(acpi_handle handle, u32 flags);
extern acpi_status pci_osc_support_set(u32 flags);
#else
#if !defined(acpi_status)
typedef u32 acpi_status;
#define AE_ERROR (acpi_status) (0x0001)
#endif
static inline acpi_status pci_osc_control_set(u32 flags) {return AE_ERROR;}
static inline acpi_status pci_osc_control_set(acpi_handle handle, u32 flags)
{return AE_ERROR;}
static inline acpi_status pci_osc_support_set(u32 flags) {return AE_ERROR;}
#endif

Expand Down

0 comments on commit a6d8d19

Please sign in to comment.