Module Name: src
Committed By: jdolecek
Date: Mon Jun 26 20:36:14 UTC 2017
Modified Files:
src/sys/dev/ic [jdolecek-ncq]: siisata.c
Log Message:
when reducing DELAY(), it's necessary to appropriately increase number
of iteration, or command can timeout too soon
adjust also siisata_atapi_start() to use DELAY(100) for the polled command,
mostly for consistency, ATAPI devices are quite slow so likely won't have
real effect
To generate a diff of this commit:
cvs rdiff -u -r1.30.4.22 -r1.30.4.23 src/sys/dev/ic/siisata.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/dev/ic/siisata.c
diff -u src/sys/dev/ic/siisata.c:1.30.4.22 src/sys/dev/ic/siisata.c:1.30.4.23
--- src/sys/dev/ic/siisata.c:1.30.4.22 Sat Jun 24 11:34:33 2017
+++ src/sys/dev/ic/siisata.c Mon Jun 26 20:36:14 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: siisata.c,v 1.30.4.22 2017/06/24 11:34:33 jdolecek Exp $ */
+/* $NetBSD: siisata.c,v 1.30.4.23 2017/06/26 20:36:14 jdolecek Exp $ */
/* from ahcisata_core.c */
@@ -79,7 +79,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: siisata.c,v 1.30.4.22 2017/06/24 11:34:33 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: siisata.c,v 1.30.4.23 2017/06/26 20:36:14 jdolecek Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -944,7 +944,7 @@ siisata_cmd_start(struct ata_channel *ch
/*
* polled command
*/
- for (i = 0; i < ata_c->timeout / 10; i++) {
+ for (i = 0; i < ata_c->timeout * 10; i++) {
if (ata_c->flags & AT_DONE)
break;
siisata_intr_port(schp);
@@ -1148,7 +1148,7 @@ siisata_bio_start(struct ata_channel *ch
/*
* polled command
*/
- for (i = 0; i < ATA_DELAY / 10; i++) {
+ for (i = 0; i < ATA_DELAY * 10; i++) {
if (ata_bio->flags & ATA_ITSDONE)
break;
siisata_intr_port(schp);
@@ -1693,11 +1693,11 @@ siisata_atapi_start(struct ata_channel *
/*
* polled command
*/
- for (i = 0; i < ATA_DELAY / 10; i++) {
+ for (i = 0; i < ATA_DELAY * 10; i++) {
if (sc_xfer->xs_status & XS_STS_DONE)
break;
siisata_intr_port(schp);
- DELAY(1000);
+ DELAY(100);
}
if ((sc_xfer->xs_status & XS_STS_DONE) == 0) {
siisata_timeout(xfer);