Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/ic ahci_exec_fis: wait for the correct amount of tim...



details:   https://anonhg.NetBSD.org/src/rev/e03dc8491065
branches:  trunk
changeset: 947890:e03dc8491065
user:      jmcneill <jmcneill%NetBSD.org@localhost>
date:      Sat Dec 19 19:12:02 2020 +0000

description:
ahci_exec_fis: wait for the correct amount of time when AT_WAIT is set

diffstat:

 sys/dev/ic/ahcisata_core.c |  14 +++++---------
 1 files changed, 5 insertions(+), 9 deletions(-)

diffs (36 lines):

diff -r a70d6507043b -r e03dc8491065 sys/dev/ic/ahcisata_core.c
--- a/sys/dev/ic/ahcisata_core.c        Sat Dec 19 18:09:44 2020 +0000
+++ b/sys/dev/ic/ahcisata_core.c        Sat Dec 19 19:12:02 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ahcisata_core.c,v 1.83 2020/04/13 10:49:34 jdolecek Exp $      */
+/*     $NetBSD: ahcisata_core.c,v 1.84 2020/12/19 19:12:02 jmcneill Exp $      */
 
 /*
  * Copyright (c) 2006 Manuel Bouyer.
@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ahcisata_core.c,v 1.83 2020/04/13 10:49:34 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ahcisata_core.c,v 1.84 2020/12/19 19:12:02 jmcneill Exp $");
 
 #include <sys/types.h>
 #include <sys/malloc.h>
@@ -761,14 +761,10 @@
        uint32_t is;
 
        /*
-        * Base timeout is specified in ms.
-        * If we are allowed to sleep, wait a tick each round.
-        * Otherwise delay for 10ms on each round.
+        * Base timeout is specified in ms. Delay for 10ms
+        * on each round.
         */
-       if (flags & AT_WAIT)
-               timeout = MAX(1, mstohz(timeout));
-       else
-               timeout = timeout / 10;
+       timeout = timeout / 10;
 
        AHCI_CMDTBL_SYNC(sc, achp, slot, BUS_DMASYNC_PREWRITE);
        AHCI_CMDH_SYNC(sc, achp, slot,



Home | Main Index | Thread Index | Old Index