* [PATCH] libata-dev-2.6-ncq: lengthen COMMRESET delay
@ 2005-06-26 14:27 Tejun Heo
2005-06-26 17:19 ` Jeff Garzik
2005-06-28 4:07 ` Jeff Garzik
0 siblings, 2 replies; 3+ messages in thread
From: Tejun Heo @ 2005-06-26 14:27 UTC (permalink / raw)
To: Jeff Garzik, axboe, linux-ide
Hello, Jeff.
Hello, Jens.
This is the first patch of a series of updates to the ncq head of
libata-dev-2.6 tree. The first six patches (including this one) are
independent misc updates/fixes, so I'm posting each of those patches
as a separate mail. After the six patches, a patchset consisted of 8
patches follows which moves most of NCQ completion/error-handling to
libata-core layer and implements proper error-handling.
This patch lengthens the delay between DET setting and clearing for
COMMRESET from 400us to 1ms. I couldn't find any requiremen regarding
the duration of COMMRESET in SATA I/II specs but AHCI-1.1 10.4.2
states that it should be at least 1ms.
Signed-off-by: Tejun Heo <htejun@gmail.com>
Index: work/drivers/scsi/libata-core.c
===================================================================
--- work.orig/drivers/scsi/libata-core.c 2005-06-26 20:59:05.000000000 +0900
+++ work/drivers/scsi/libata-core.c 2005-06-26 21:06:01.000000000 +0900
@@ -1444,7 +1444,9 @@ void __sata_phy_reset(struct ata_port *a
if (ap->flags & ATA_FLAG_SATA_RESET) {
/* issue phy wake/reset */
scr_write_flush(ap, SCR_CONTROL, 0x301);
- udelay(400); /* FIXME: a guess */
+ /* Couldn't find anything in SATA I/II specs, but
+ * AHCI-1.1 10.4.2 says at least 1 ms. */
+ msleep(1);
}
scr_write_flush(ap, SCR_CONTROL, 0x300); /* phy wake/clear reset */
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] libata-dev-2.6-ncq: lengthen COMMRESET delay
2005-06-26 14:27 [PATCH] libata-dev-2.6-ncq: lengthen COMMRESET delay Tejun Heo
@ 2005-06-26 17:19 ` Jeff Garzik
2005-06-28 4:07 ` Jeff Garzik
1 sibling, 0 replies; 3+ messages in thread
From: Jeff Garzik @ 2005-06-26 17:19 UTC (permalink / raw)
To: Tejun Heo; +Cc: axboe, linux-ide
Tejun Heo wrote:
> Hello, Jeff.
> Hello, Jens.
>
> This is the first patch of a series of updates to the ncq head of
> libata-dev-2.6 tree. The first six patches (including this one) are
> independent misc updates/fixes, so I'm posting each of those patches
> as a separate mail. After the six patches, a patchset consisted of 8
> patches follows which moves most of NCQ completion/error-handling to
> libata-core layer and implements proper error-handling.
>
> This patch lengthens the delay between DET setting and clearing for
> COMMRESET from 400us to 1ms. I couldn't find any requiremen regarding
> the duration of COMMRESET in SATA I/II specs but AHCI-1.1 10.4.2
> states that it should be at least 1ms.
>
> Signed-off-by: Tejun Heo <htejun@gmail.com>
ACK (i.e. I will apply this patch)
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] libata-dev-2.6-ncq: lengthen COMMRESET delay
2005-06-26 14:27 [PATCH] libata-dev-2.6-ncq: lengthen COMMRESET delay Tejun Heo
2005-06-26 17:19 ` Jeff Garzik
@ 2005-06-28 4:07 ` Jeff Garzik
1 sibling, 0 replies; 3+ messages in thread
From: Jeff Garzik @ 2005-06-28 4:07 UTC (permalink / raw)
To: Tejun Heo; +Cc: axboe, linux-ide
Tejun Heo wrote:
> Hello, Jeff.
> Hello, Jens.
>
> This is the first patch of a series of updates to the ncq head of
> libata-dev-2.6 tree. The first six patches (including this one) are
> independent misc updates/fixes, so I'm posting each of those patches
> as a separate mail. After the six patches, a patchset consisted of 8
> patches follows which moves most of NCQ completion/error-handling to
> libata-core layer and implements proper error-handling.
>
> This patch lengthens the delay between DET setting and clearing for
> COMMRESET from 400us to 1ms. I couldn't find any requiremen regarding
> the duration of COMMRESET in SATA I/II specs but AHCI-1.1 10.4.2
> states that it should be at least 1ms.
>
> Signed-off-by: Tejun Heo <htejun@gmail.com>
>
> Index: work/drivers/scsi/libata-core.c
> ===================================================================
> --- work.orig/drivers/scsi/libata-core.c 2005-06-26 20:59:05.000000000 +0900
> +++ work/drivers/scsi/libata-core.c 2005-06-26 21:06:01.000000000 +0900
> @@ -1444,7 +1444,9 @@ void __sata_phy_reset(struct ata_port *a
> if (ap->flags & ATA_FLAG_SATA_RESET) {
> /* issue phy wake/reset */
> scr_write_flush(ap, SCR_CONTROL, 0x301);
> - udelay(400); /* FIXME: a guess */
> + /* Couldn't find anything in SATA I/II specs, but
> + * AHCI-1.1 10.4.2 says at least 1 ms. */
> + msleep(1);
applied, though I changed msleep to mdelay, since this code has not had
wide testing.
I would like to see some testing on other controllers, before we make
the mdelay->msleep transition.
Jeff
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-06-28 4:07 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-06-26 14:27 [PATCH] libata-dev-2.6-ncq: lengthen COMMRESET delay Tejun Heo
2005-06-26 17:19 ` Jeff Garzik
2005-06-28 4:07 ` 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).