Skip to content

Commit b1e1499

Browse files
committed
ACPI: EC: Eliminate EC_FLAGS_QUERY_HANDSHAKE
The EC_FLAGS_QUERY_HANDSHAKE switch is never set in the current code (the only function setting it is defined under #if 0) and has no effect whatever, so eliminate it and drop the code depending on it. Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent 65a691f commit b1e1499

File tree

1 file changed

+3
-32
lines changed

1 file changed

+3
-32
lines changed

drivers/acpi/ec.c

Lines changed: 3 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,6 @@ static bool boot_ec_is_ecdt = false;
182182
static struct workqueue_struct *ec_wq;
183183
static struct workqueue_struct *ec_query_wq;
184184

185-
static int EC_FLAGS_QUERY_HANDSHAKE; /* Needs QR_EC issued when SCI_EVT set */
186185
static int EC_FLAGS_CORRECT_ECDT; /* Needs ECDT port address correction */
187186
static int EC_FLAGS_IGNORE_DSDT_GPE; /* Needs ECDT GPE as correction setting */
188187
static int EC_FLAGS_CLEAR_ON_RESUME; /* Needs acpi_ec_clear() on boot/resume */
@@ -690,21 +689,9 @@ static void advance_transaction(struct acpi_ec *ec)
690689
wakeup = true;
691690
}
692691
goto out;
693-
} else {
694-
if (EC_FLAGS_QUERY_HANDSHAKE &&
695-
!(status & ACPI_EC_FLAG_SCI) &&
696-
(t->command == ACPI_EC_COMMAND_QUERY)) {
697-
ec_transaction_transition(ec, ACPI_EC_COMMAND_POLL);
698-
t->rdata[t->ri++] = 0x00;
699-
ec_transaction_transition(ec, ACPI_EC_COMMAND_COMPLETE);
700-
ec_dbg_evt("Command(%s) completed by software",
701-
acpi_ec_cmd_string(ACPI_EC_COMMAND_QUERY));
702-
wakeup = true;
703-
} else if ((status & ACPI_EC_FLAG_IBF) == 0) {
704-
acpi_ec_write_cmd(ec, t->command);
705-
ec_transaction_transition(ec, ACPI_EC_COMMAND_POLL);
706-
} else
707-
goto err;
692+
} else if (!(status & ACPI_EC_FLAG_IBF)) {
693+
acpi_ec_write_cmd(ec, t->command);
694+
ec_transaction_transition(ec, ACPI_EC_COMMAND_POLL);
708695
goto out;
709696
}
710697
err:
@@ -1805,22 +1792,6 @@ static void __init acpi_ec_ecdt_start(void)
18051792
acpi_bus_register_early_device(ACPI_BUS_TYPE_ECDT_EC);
18061793
}
18071794

1808-
#if 0
1809-
/*
1810-
* Some EC firmware variations refuses to respond QR_EC when SCI_EVT is not
1811-
* set, for which case, we complete the QR_EC without issuing it to the
1812-
* firmware.
1813-
* https://bugzilla.kernel.org/show_bug.cgi?id=82611
1814-
* https://bugzilla.kernel.org/show_bug.cgi?id=97381
1815-
*/
1816-
static int ec_flag_query_handshake(const struct dmi_system_id *id)
1817-
{
1818-
pr_debug("Detected the EC firmware requiring QR_EC issued when SCI_EVT set\n");
1819-
EC_FLAGS_QUERY_HANDSHAKE = 1;
1820-
return 0;
1821-
}
1822-
#endif
1823-
18241795
/*
18251796
* On some hardware it is necessary to clear events accumulated by the EC during
18261797
* sleep. These ECs stop reporting GPEs until they are manually polled, if too

0 commit comments

Comments
 (0)