• Aaron Lu's avatar
    libata: restore acpi disable functionality · 0d0cdb02
    Aaron Lu authored
    Commit 66fa7f21 "libata-acpi: improve ACPI disabling" introdcued the
    behaviour of disabling ATA ACPI if ata_acpi_on_devcfg failed the 2nd
    time, but commit 30dcf76a dropped this behaviour and this caused
    problem for Dimitris Damigos, where his laptop can not resume correctly.
    
    The bugzilla page for it is:
    https://bugzilla.kernel.org/show_bug.cgi?id=49331
    
    The problem is, ata_dev_push_id will fail the 2nd time it is invoked,
    and due to disabling ACPI code is dropped, ata_acpi_on_devcfg which
    calls ata_dev_push_id will keep failing and eventually made the device
    disabled.
    
    This patch restores the original behaviour, if acpi failed the 2nd time,
    disable acpi functionality for the device(and we do not event need to
    add a debug message for this as it is still there ;-).
    Reported-by: default avatarDimitris Damigos <damigos@freemail.gr>
    Signed-off-by: default avatarAaron Lu <aaron.lu@intel.com>
    Cc: <stable@vger.kernel.org>
    Signed-off-by: default avatarJeff Garzik <jgarzik@redhat.com>
    0d0cdb02
libata-acpi.c 28.8 KB