All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ahci: replace SKIP_D2H_BSY with HRST_TO_RESUME
@ 2006-09-28  8:45 Tejun Heo
  0 siblings, 0 replies; only message in thread
From: Tejun Heo @ 2006-09-28  8:45 UTC (permalink / raw)
  To: Jeff Garzik, linux-ide

ATA_FLAG_SKIP_D2H_BSY was added because some ahci controllers failed
to turn off !BSY after hotplug regardless of device state.  However,
some ahci controllers time out on softreset if it is issued while BSY
is set.  This can also be resolved by always doing CLO before SRST but
CLO is an optional feature.

This patch makes ahci use hardreset after link resume event including
hotplug.  Hardreset doesn't wait for !BSY, so the unnecessary timeout
is avoided and ahci now politely waits for !BSY on normal soft resets
(including boot and EH) thus avoiding SRST timeout caused by issuing
it while BSY is set.

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

Jeff, this should fix the 'first reset fails on slow ATAPI device if
delay during initialization is shortened' problem.  This makes much
more sense too as the only problemetic reset was post-hotplug SRST.

Thanks.

diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
index 1aabc81..0b0619b 100644
--- a/drivers/ata/ahci.c
+++ b/drivers/ata/ahci.c
@@ -279,7 +279,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,
+				  ATA_FLAG_HRST_TO_RESUME,
 		.pio_mask	= 0x1f, /* pio0-4 */
 		.udma_mask	= 0x7f, /* udma0-6 ; FIXME */
 		.port_ops	= &ahci_ops,
@@ -289,7 +289,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 |
+				  ATA_FLAG_HRST_TO_RESUME |
 				  AHCI_FLAG_RESET_NEEDS_CLO | AHCI_FLAG_NO_NCQ,
 		.pio_mask	= 0x1f, /* pio0-4 */
 		.udma_mask	= 0x7f, /* udma0-6 ; FIXME */
diff --git a/drivers/ata/sata_nv.c b/drivers/ata/sata_nv.c

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2006-09-28  8:45 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-09-28  8:45 [PATCH] ahci: replace SKIP_D2H_BSY with HRST_TO_RESUME Tejun Heo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.