Patchworkβ pci hotplug: fix oshp evaluation

login
register
about
Submitter Kenji Kaneshige
Date 2009-11-04 03:59:55
Message ID <4AF0FC3B.7080406@jp.fujitsu.com>
Download mbox | patch
Permalink /patch/57455/
State New
Headers show

Comments

Kenji Kaneshige - 2009-11-04 03:59:55
If firmware doesn't grant over native hotplug control through ACPI
_OSC method, we must not evaluate OSHP.

Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>

---
 drivers/pci/hotplug/acpi_pcihp.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)


--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Jesse Barnes - 2009-11-06 22:14:08
On Wed, 4 Nov 2009 05:59:55 +0200
Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com> wrote:

> If firmware doesn't grant over native hotplug control through ACPI
> _OSC method, we must not evaluate OSHP.
> 
> Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>

Applied to my linux-next branch.  Or do you want it in 2.6.32 as well?

Thanks,
Kenji Kaneshige - 2009-11-09 07:33:47
Jesse Barnes wrote:
> On Wed, 4 Nov 2009 05:59:55 +0200
> Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com> wrote:
> 
>> If firmware doesn't grant over native hotplug control through ACPI
>> _OSC method, we must not evaluate OSHP.
>>
>> Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
> 
> Applied to my linux-next branch.  Or do you want it in 2.6.32 as well?
> 

linux-next is ok for me.

Thanks,
Kenji Kaneshige


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

Patch

Index: 20091026/drivers/pci/hotplug/acpi_pcihp.c
===================================================================
--- 20091026.orig/drivers/pci/hotplug/acpi_pcihp.c
+++ 20091026/drivers/pci/hotplug/acpi_pcihp.c
@@ -362,6 +362,8 @@  int acpi_get_hp_hw_control_from_firmware
 		status = acpi_pci_osc_control_set(handle, flags);
 		if (ACPI_SUCCESS(status))
 			goto got_one;
+		if (status == AE_SUPPORT)
+			goto no_control;
 		kfree(string.pointer);
 		string = (struct acpi_buffer){ ACPI_ALLOCATE_BUFFER, NULL };
 	}
@@ -394,10 +396,9 @@  int acpi_get_hp_hw_control_from_firmware
 		if (ACPI_FAILURE(status))
 			break;
 	}
-
+no_control:
 	dbg("Cannot get control of hotplug hardware for pci %s\n",
 	    pci_name(pdev));
-
 	kfree(string.pointer);
 	return -ENODEV;
 got_one: