linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH #upstream-fixes] libata: mask off DET when restoring SControl for detach
@ 2008-11-03 10:27 Tejun Heo
  2008-11-04  6:11 ` Jeff Garzik
  0 siblings, 1 reply; 2+ messages in thread
From: Tejun Heo @ 2008-11-03 10:27 UTC (permalink / raw)
  To: Jeff Garzik, IDE/ATA development list

libata restores SControl on detach; however, trying to restore
non-zero DET can cause undeterministic behavior including PMP device
going offline till power cycling.  Mask off DET when restoring
SControl.

Signed-off-by: Tejun Heo <tj@kernel.org>
---
 drivers/ata/libata-core.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: work/drivers/ata/libata-core.c
===================================================================
--- work.orig/drivers/ata/libata-core.c
+++ work/drivers/ata/libata-core.c
@@ -5936,7 +5936,7 @@ static void ata_port_detach(struct ata_p
 	 * to us.  Restore SControl and disable all existing devices.
 	 */
 	__ata_port_for_each_link(link, ap) {
-		sata_scr_write(link, SCR_CONTROL, link->saved_scontrol);
+		sata_scr_write(link, SCR_CONTROL, link->saved_scontrol & 0xff0);
 		ata_link_for_each_dev(dev, link)
 			ata_dev_disable(dev);
 	}

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH #upstream-fixes] libata: mask off DET when restoring SControl for detach
  2008-11-03 10:27 [PATCH #upstream-fixes] libata: mask off DET when restoring SControl for detach Tejun Heo
@ 2008-11-04  6:11 ` Jeff Garzik
  0 siblings, 0 replies; 2+ messages in thread
From: Jeff Garzik @ 2008-11-04  6:11 UTC (permalink / raw)
  To: Tejun Heo; +Cc: IDE/ATA development list

Tejun Heo wrote:
> libata restores SControl on detach; however, trying to restore
> non-zero DET can cause undeterministic behavior including PMP device
> going offline till power cycling.  Mask off DET when restoring
> SControl.
> 
> Signed-off-by: Tejun Heo <tj@kernel.org>
> ---
>  drivers/ata/libata-core.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> Index: work/drivers/ata/libata-core.c
> ===================================================================
> --- work.orig/drivers/ata/libata-core.c
> +++ work/drivers/ata/libata-core.c
> @@ -5936,7 +5936,7 @@ static void ata_port_detach(struct ata_p
>  	 * to us.  Restore SControl and disable all existing devices.
>  	 */
>  	__ata_port_for_each_link(link, ap) {
> -		sata_scr_write(link, SCR_CONTROL, link->saved_scontrol);
> +		sata_scr_write(link, SCR_CONTROL, link->saved_scontrol & 0xff0);
>  		ata_link_for_each_dev(dev, link)
>  			ata_dev_disable(dev);

applied



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-11-04  6:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-03 10:27 [PATCH #upstream-fixes] libata: mask off DET when restoring SControl for detach Tejun Heo
2008-11-04  6:11 ` Jeff Garzik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).