]> git.baikalelectronics.ru Git - kernel.git/commit
libata: fix hotplug for drivers which don't implement LPM
authorTejun Heo <tj@kernel.org>
Thu, 24 Feb 2011 18:30:37 +0000 (19:30 +0100)
committerJeff Garzik <jgarzik@redhat.com>
Wed, 2 Mar 2011 07:34:20 +0000 (02:34 -0500)
commit5b7e13ff22e878ab2b89476b60ade67139e82306
tree264924c95c0a12e952008c3658a93c096883b3e6
parent103b678f11c60e2a8aad9b94428fdfd603c70a5f
libata: fix hotplug for drivers which don't implement LPM

ata_eh_analyze_serror() suppresses hotplug notifications if LPM is
being used because LPM generates spurious hotplug events.  It compared
whether link->lpm_policy was different from ATA_LPM_MAX_POWER to
determine whether LPM is enabled; however, this is incorrect as for
drivers which don't implement LPM, lpm_policy is always
ATA_LPM_UNKNOWN.  This disabled hotplug detection for all drivers
which don't implement LPM.

Fix it by comparing whether lpm_policy is greater than
ATA_LPM_MAX_POWER.

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: stable@kernel.org
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
drivers/ata/libata-eh.c