linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3 #upstream] ahci: kill AHCI_FLAG_RESET_NEEDS_CLO
@ 2006-11-01  8:58 Tejun Heo
  2006-11-01  8:59 ` [PATCH 2/3 #upstream] libata: separate out and export sata_port_hardreset() Tejun Heo
  2006-11-01  9:22 ` [PATCH 1/3 #upstream] ahci: kill AHCI_FLAG_RESET_NEEDS_CLO Jeff Garzik
  0 siblings, 2 replies; 4+ messages in thread
From: Tejun Heo @ 2006-11-01  8:58 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: linux-ide

Now that ahci_softreset() is fixed to automatically perform CLO if
BSY/DRQ is set on entry, AHCI_FLAG_RESET_NEEDS_CLO is redundant.  Kill
it.

Signed-off-by: Tejun Heo <htejun@gmail.com>
---

Jeff, this is respin of the following patch series.

    http://thread.gmane.org/gmane.linux.ide/13471/focus=13471

fix-status-check-in-ahci_softreset patch is separated and submitted
for #upstream-fixes inclusion.

This patch series is against.

   upstream (ee0fd6c1b95105832d463f7318b874ad448e476a)
   + fix-status-check-in-ahci_softreset
     (http://article.gmane.org/gmane.linux.ide/13815)

Thanks.

 drivers/ata/ahci.c |   19 +++----------------
 1 file changed, 3 insertions(+), 16 deletions(-)

Index: work/drivers/ata/ahci.c
===================================================================
--- work.orig/drivers/ata/ahci.c
+++ work/drivers/ata/ahci.c
@@ -166,8 +166,7 @@ enum {
 	AHCI_FLAG_MSI		= (1 << 0),
 
 	/* ap->flags bits */
-	AHCI_FLAG_RESET_NEEDS_CLO	= (1 << 24),
-	AHCI_FLAG_NO_NCQ		= (1 << 25),
+	AHCI_FLAG_NO_NCQ		= (1 << 24),
 };
 
 struct ahci_cmd_hdr {
@@ -289,8 +288,7 @@ static const struct ata_port_info ahci_p
 		.sht		= &ahci_sht,
 		.flags		= ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY |
 				  ATA_FLAG_MMIO | ATA_FLAG_PIO_DMA |
-				  ATA_FLAG_SKIP_D2H_BSY |
-				  AHCI_FLAG_RESET_NEEDS_CLO | AHCI_FLAG_NO_NCQ,
+				  ATA_FLAG_SKIP_D2H_BSY | AHCI_FLAG_NO_NCQ,
 		.pio_mask	= 0x1f, /* pio0-4 */
 		.udma_mask	= 0x7f, /* udma0-6 ; FIXME */
 		.port_ops	= &ahci_ops,
@@ -697,17 +695,6 @@ static int ahci_clo(struct ata_port *ap)
 	return 0;
 }
 
-static int ahci_prereset(struct ata_port *ap)
-{
-	if ((ap->flags & AHCI_FLAG_RESET_NEEDS_CLO) &&
-	    (ata_busy_wait(ap, ATA_BUSY, 1000) & ATA_BUSY)) {
-		/* ATA_BUSY hasn't cleared, so send a CLO */
-		ahci_clo(ap);
-	}
-
-	return ata_std_prereset(ap);
-}
-
 static int ahci_softreset(struct ata_port *ap, unsigned int *class)
 {
 	struct ahci_port_priv *pp = ap->private_data;
@@ -1160,7 +1147,7 @@ static void ahci_error_handler(struct at
 	}
 
 	/* perform recovery */
-	ata_do_eh(ap, ahci_prereset, ahci_softreset, ahci_hardreset,
+	ata_do_eh(ap, ata_std_prereset, ahci_softreset, ahci_hardreset,
 		  ahci_postreset);
 }
 

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

end of thread, other threads:[~2006-11-01  9:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-11-01  8:58 [PATCH 1/3 #upstream] ahci: kill AHCI_FLAG_RESET_NEEDS_CLO Tejun Heo
2006-11-01  8:59 ` [PATCH 2/3 #upstream] libata: separate out and export sata_port_hardreset() Tejun Heo
2006-11-01  9:00   ` [PATCH 3/3 #upstream] ahci: update ahci-vt8251 reset sequence Tejun Heo
2006-11-01  9:22 ` [PATCH 1/3 #upstream] ahci: kill AHCI_FLAG_RESET_NEEDS_CLO 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).