Module Name: src
Committed By: jdolecek
Date: Sun Jul 23 13:50:43 UTC 2017
Modified Files:
src/sys/dev/ata [jdolecek-ncq]: wd.c
Log Message:
for wd, only call disk_busy() on the first try, do not call it on retries,
as unbusy is called just once when the xfer is finished
also noticed in PR kern/43169 by Matthias Pfaller, but contrary to suggested
fix done in way to keep the disk marked busy during the timeouts, as I think
it's more correct
To generate a diff of this commit:
cvs rdiff -u -r1.428.2.28 -r1.428.2.29 src/sys/dev/ata/wd.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/ata/wd.c
diff -u src/sys/dev/ata/wd.c:1.428.2.28 src/sys/dev/ata/wd.c:1.428.2.29
--- src/sys/dev/ata/wd.c:1.428.2.28 Fri Jul 21 17:32:27 2017
+++ src/sys/dev/ata/wd.c Sun Jul 23 13:50:43 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: wd.c,v 1.428.2.28 2017/07/21 17:32:27 jdolecek Exp $ */
+/* $NetBSD: wd.c,v 1.428.2.29 2017/07/23 13:50:43 jdolecek Exp $ */
/*
* Copyright (c) 1998, 2001 Manuel Bouyer. All rights reserved.
@@ -54,7 +54,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: wd.c,v 1.428.2.28 2017/07/21 17:32:27 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wd.c,v 1.428.2.29 2017/07/23 13:50:43 jdolecek Exp $");
#include "opt_ata.h"
#include "opt_wd.h"
@@ -766,7 +766,8 @@ wdstart1(struct wd_softc *wd, struct buf
}
/* Instrumentation. */
- disk_busy(&wd->sc_dk);
+ if (xfer->c_retries == 0)
+ disk_busy(&wd->sc_dk);
switch (wd->atabus->ata_bio(wd->drvp, xfer)) {
case ATACMD_TRY_AGAIN:
panic("wdstart1: try again");