Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/ic Fix locking bug seen when using WDCNDELAY_DEBUG i...



details:   https://anonhg.NetBSD.org/src/rev/efbefbb7d725
branches:  trunk
changeset: 1004610:efbefbb7d725
user:      prlw1 <prlw1%NetBSD.org@localhost>
date:      Mon Nov 04 15:12:10 2019 +0000

description:
Fix locking bug seen when using WDCNDELAY_DEBUG in PR kern/52126
(Observed
  piixide0:0:0: warning: busy-wait took 200us
with no panic)

diffstat:

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

diffs (27 lines):

diff -r 23fb1c9d1f3c -r efbefbb7d725 sys/dev/ic/wdc.c
--- a/sys/dev/ic/wdc.c  Mon Nov 04 12:45:10 2019 +0000
+++ b/sys/dev/ic/wdc.c  Mon Nov 04 15:12:10 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: wdc.c,v 1.294 2019/10/23 14:44:41 christos Exp $ */
+/*     $NetBSD: wdc.c,v 1.295 2019/11/04 15:12:10 prlw1 Exp $ */
 
 /*
  * Copyright (c) 1998, 2001, 2003 Manuel Bouyer.  All rights reserved.
@@ -58,7 +58,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: wdc.c,v 1.294 2019/10/23 14:44:41 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wdc.c,v 1.295 2019/11/04 15:12:10 prlw1 Exp $");
 
 #include "opt_ata.h"
 #include "opt_wdc.h"
@@ -1240,7 +1240,7 @@
        if (!cold && xtime > WDCNDELAY_DEBUG) {
                struct ata_xfer *xfer;
 
-               xfer = ata_queue_get_active_xfer(chp);
+               xfer = ata_queue_get_active_xfer_locked(chp);
                if (xfer == NULL)
                        printf("%s channel %d: warning: busy-wait took %dus\n",
                            device_xname(chp->ch_atac->atac_dev),



Home | Main Index | Thread Index | Old Index