|
12 | 12 |
|
13 | 13 | #include <linux/acpi.h>
|
14 | 14 | #include <linux/dmi.h>
|
| 15 | +#include <linux/pci.h> |
15 | 16 | #include <linux/platform_device.h>
|
16 | 17 | #include <asm/cpu_device_id.h>
|
17 | 18 | #include <asm/intel-family.h>
|
@@ -391,6 +392,19 @@ static const struct dmi_system_id acpi_quirk_skip_dmi_ids[] = {
|
391 | 392 | .driver_data = (void *)(ACPI_QUIRK_SKIP_I2C_CLIENTS |
|
392 | 393 | ACPI_QUIRK_SKIP_ACPI_AC_AND_BATTERY),
|
393 | 394 | },
|
| 395 | + { |
| 396 | + /* Vexia Edu Atla 10 tablet 9V version */ |
| 397 | + .matches = { |
| 398 | + DMI_MATCH(DMI_BOARD_VENDOR, "AMI Corporation"), |
| 399 | + DMI_MATCH(DMI_BOARD_NAME, "Aptio CRB"), |
| 400 | + /* Above strings are too generic, also match on BIOS date */ |
| 401 | + DMI_MATCH(DMI_BIOS_DATE, "08/25/2014"), |
| 402 | + }, |
| 403 | + .driver_data = (void *)(ACPI_QUIRK_SKIP_I2C_CLIENTS | |
| 404 | + ACPI_QUIRK_UART1_SKIP | |
| 405 | + ACPI_QUIRK_SKIP_ACPI_AC_AND_BATTERY | |
| 406 | + ACPI_QUIRK_SKIP_GPIO_EVENT_HANDLERS), |
| 407 | + }, |
394 | 408 | {
|
395 | 409 | /* Whitelabel (sold as various brands) TM800A550L */
|
396 | 410 | .matches = {
|
@@ -439,18 +453,35 @@ static int acpi_dmi_skip_serdev_enumeration(struct device *controller_parent, bo
|
439 | 453 | struct acpi_device *adev = ACPI_COMPANION(controller_parent);
|
440 | 454 | const struct dmi_system_id *dmi_id;
|
441 | 455 | long quirks = 0;
|
442 |
| - u64 uid; |
443 |
| - int ret; |
| 456 | + u64 uid = 0; |
444 | 457 |
|
445 |
| - ret = acpi_dev_uid_to_integer(adev, &uid); |
446 |
| - if (ret) |
| 458 | + dmi_id = dmi_first_match(acpi_quirk_skip_dmi_ids); |
| 459 | + if (!dmi_id) |
447 | 460 | return 0;
|
448 | 461 |
|
449 |
| - dmi_id = dmi_first_match(acpi_quirk_skip_dmi_ids); |
450 |
| - if (dmi_id) |
451 |
| - quirks = (unsigned long)dmi_id->driver_data; |
| 462 | + quirks = (unsigned long)dmi_id->driver_data; |
| 463 | + |
| 464 | + /* uid is left at 0 on errors and 0 is not a valid UART UID */ |
| 465 | + acpi_dev_uid_to_integer(adev, &uid); |
| 466 | + |
| 467 | + /* For PCI UARTs without an UID */ |
| 468 | + if (!uid && dev_is_pci(controller_parent)) { |
| 469 | + struct pci_dev *pdev = to_pci_dev(controller_parent); |
| 470 | + |
| 471 | + /* |
| 472 | + * Devfn values for PCI UARTs on Bay Trail SoCs, which are |
| 473 | + * the only devices where this fallback is necessary. |
| 474 | + */ |
| 475 | + if (pdev->devfn == PCI_DEVFN(0x1e, 3)) |
| 476 | + uid = 1; |
| 477 | + else if (pdev->devfn == PCI_DEVFN(0x1e, 4)) |
| 478 | + uid = 2; |
| 479 | + } |
| 480 | + |
| 481 | + if (!uid) |
| 482 | + return 0; |
452 | 483 |
|
453 |
| - if (!dev_is_platform(controller_parent)) { |
| 484 | + if (!dev_is_platform(controller_parent) && !dev_is_pci(controller_parent)) { |
454 | 485 | /* PNP enumerated UARTs */
|
455 | 486 | if ((quirks & ACPI_QUIRK_PNP_UART1_SKIP) && uid == 1)
|
456 | 487 | *skip = true;
|
|
0 commit comments