Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/jdolecek-ncq]: src/sys/dev/ic when reducing DELAY(), it's necessary to a...



details:   https://anonhg.NetBSD.org/src/rev/8afd7813ff7f
branches:  jdolecek-ncq
changeset: 822949:8afd7813ff7f
user:      jdolecek <jdolecek%NetBSD.org@localhost>
date:      Mon Jun 26 20:36:14 2017 +0000

description:
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

diffstat:

 sys/dev/ic/siisata.c |  12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diffs (50 lines):

diff -r c3976c51d669 -r 8afd7813ff7f sys/dev/ic/siisata.c
--- a/sys/dev/ic/siisata.c      Sat Jun 24 14:59:10 2017 +0000
+++ b/sys/dev/ic/siisata.c      Mon Jun 26 20:36:14 2017 +0000
@@ -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 @@
        /*
         * 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 @@
        /*
         * 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 @@
        /*
         * 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);



Home | Main Index | Thread Index | Old Index