libata: retry link resume if necessary
commitdce6a09aaf62aff73b8123e9bb8ad2247b355848
authorTejun Heo <tj@kernel.org>
Mon, 11 Jan 2010 02:14:44 +0000 (11 11:14 +0900)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 9 Feb 2010 12:50:57 +0000 (9 04:50 -0800)
tree5ff55871adf47c20703727dd7700153d09623718
parent42f7e233e4afae9d327f24c73379920adc905f95
libata: retry link resume if necessary

commit 5040ab67a2c6d5710ba497dc52a8f7035729d7b0 upstream.

Interestingly, when SIDPR is used in ata_piix, writes to DET in
SControl sometimes get ignored leading to detection failure.  Update
sata_link_resume() such that it reads back SControl after clearing DET
and retry if it's not clear.

Signed-off-by: Tejun Heo <tj@kernel.org>
Reported-by: fengxiangjun <fengxiangjun@neusoft.com>
Reported-by: Jim Faulkner <jfaulkne@ccs.neu.edu>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/ata/libata-core.c
include/linux/libata.h