[PATCH 2/3 REBASEv2] pci-acpi: Remove unnecessary _OSC evaluation for control request

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

 



Remove unnecessary _OSC evaluation for control request.

If a control had already been granted, we don't need to re-evaluate
_OSC for it because firmware may not reject control of any feature it
has previously granted control to.

Signed-off-by: Kenji Kaneshige <kaneshige.kenji@xxxxxxxxxxxxxx>
Signed-off-by: Taku Izumi <izumi.taku@xxxxxxxxxxxxxx>

 drivers/pci/pci-acpi.c |    4 ++++
 1 file changed, 4 insertions(+)

Index: linux-next.28rc4/drivers/pci/pci-acpi.c
===================================================================
--- linux-next.28rc4.orig/drivers/pci/pci-acpi.c
+++ linux-next.28rc4/drivers/pci/pci-acpi.c
@@ -209,6 +209,10 @@ acpi_status pci_osc_control_set(acpi_han
 		goto out;
 	}

+	/* No need to evaluate _OSC if the control was already granted. */
+	if ((osc_data->control_set & ctrlset) == ctrlset)
+		goto out;
+
 	if (!osc_data->is_queried) {
 		status = __acpi_query_osc(osc_data->support_set, osc_data);
 		if (ACPI_FAILURE(status))


--
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