Module Name: src
Committed By: prlw1
Date: Mon Nov 4 15:12:10 UTC 2019
Modified Files:
src/sys/dev/ic: wdc.c
Log Message:
Fix locking bug seen when using WDCNDELAY_DEBUG in PR kern/52126
(Observed
piixide0:0:0: warning: busy-wait took 200us
with no panic)
To generate a diff of this commit:
cvs rdiff -u -r1.294 -r1.295 src/sys/dev/ic/wdc.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/wdc.c
diff -u src/sys/dev/ic/wdc.c:1.294 src/sys/dev/ic/wdc.c:1.295
--- src/sys/dev/ic/wdc.c:1.294 Wed Oct 23 14:44:41 2019
+++ src/sys/dev/ic/wdc.c Mon Nov 4 15:12:10 2019
@@ -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 @@ __wdcwait(struct ata_channel *chp, int m
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),