linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ahci: enable GHC.AE bit before set GHC.HR
@ 2007-09-21  5:28 Peer Chen
  2007-09-21 10:29 ` Andrew Morton
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Peer Chen @ 2007-09-21  5:28 UTC (permalink / raw)
  To: linux-kernel; +Cc: jeff, akpm, linux-ide

According to the description of section 5.2.2.1 and 10.1.2 of AHCI specification rev1_1/rev1_2, GHC.HR shall only be set to ¡®1¡¯
by software when GHC.AE is set to ¡®1¡¯.

Signed-off-by: Peer Chen <peerchen@gmail.com>
---
--- linux-2.6.23-rc7/drivers/ata/ahci.c.orig	2007-09-20 11:01:55.000000000 -0400
+++ linux-2.6.23-rc7/drivers/ata/ahci.c	2007-09-20 11:07:31.000000000 -0400
@@ -834,6 +834,10 @@ static int ahci_reset_controller(struct 
 	void __iomem *mmio = host->iomap[AHCI_PCI_BAR];
 	u32 tmp;
 
+        /* turn on AHCI mode before controller reset*/
+        writel(HOST_AHCI_EN, mmio + HOST_CTL);
+        (void) readl(mmio + HOST_CTL);  /* flush */
+
 	/* global controller reset */
 	tmp = readl(mmio + HOST_CTL);
 	if ((tmp & HOST_RESET) == 0) {
-
 				
--------------
Peer Chen
2007-09-21


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

end of thread, other threads:[~2007-09-26 16:20 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-21  5:28 [PATCH] ahci: enable GHC.AE bit before set GHC.HR Peer Chen
2007-09-21 10:29 ` Andrew Morton
2007-09-21 10:31 ` Jens Axboe
2007-09-21 11:27   ` Alan Cox
2007-09-21 11:34     ` Jens Axboe
2007-09-26  4:03 ` Jeff Garzik
2007-09-26 11:23   ` Alan Cox
2007-09-26 11:41     ` Jeff Garzik
2007-09-26 14:30       ` Alan Cox
2007-09-26 14:33         ` Jeff Garzik
2007-09-26 16:10           ` Alan Cox
2007-09-26 16:20             ` 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).