ACPI: EC: Add delay for slow MSI controller

http://bugzilla.kernel.org/show_bug.cgi?id=12011

Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Signed-off-by: Len Brown <len.brown@intel.com>

authored by Alexey Starikovskiy and committed by Len Brown 5423a0cb d2f8d7ee

+9
+9
drivers/acpi/ec.c
··· 120 120 spinlock_t curr_lock; 121 121 } *boot_ec, *first_ec; 122 122 123 + static int EC_FLAGS_MSI; /* Out-of-spec MSI controller */ 124 + 123 125 /* -------------------------------------------------------------------------- 124 126 Transaction Management 125 127 -------------------------------------------------------------------------- */ ··· 261 259 clear_bit(EC_FLAGS_GPE_MODE, &ec->flags); 262 260 acpi_disable_gpe(NULL, ec->gpe); 263 261 } 262 + if (EC_FLAGS_MSI) 263 + udelay(ACPI_EC_DELAY); 264 264 /* start transaction */ 265 265 spin_lock_irqsave(&ec->curr_lock, tmp); 266 266 /* following two actions should be kept atomic */ ··· 971 967 /* 972 968 * Generate a boot ec context 973 969 */ 970 + if (dmi_name_in_vendors("Micro-Star") || 971 + dmi_name_in_vendors("Notebook")) { 972 + pr_info(PREFIX "Enabling special treatment for EC from MSI.\n"); 973 + EC_FLAGS_MSI = 1; 974 + } 974 975 status = acpi_get_table(ACPI_SIG_ECDT, 1, 975 976 (struct acpi_table_header **)&ecdt_ptr); 976 977 if (ACPI_SUCCESS(status)) {