Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/ata Count only the initial start of a transfer, not ...
details: https://anonhg.NetBSD.org/src/rev/7b0c54d74ea5
branches: trunk
changeset: 457011:7b0c54d74ea5
user: mlelstv <mlelstv%NetBSD.org@localhost>
date: Thu Jun 06 20:41:04 2019 +0000
description:
Count only the initial start of a transfer, not the retries.
Should fix kern/54166.
Thanks to macallan@ for spotting the issue.
diffstat:
sys/dev/ata/wd.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diffs (38 lines):
diff -r 6a4a30a23108 -r 7b0c54d74ea5 sys/dev/ata/wd.c
--- a/sys/dev/ata/wd.c Thu Jun 06 16:05:45 2019 +0000
+++ b/sys/dev/ata/wd.c Thu Jun 06 20:41:04 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: wd.c,v 1.450 2019/05/24 06:01:05 mlelstv Exp $ */
+/* $NetBSD: wd.c,v 1.451 2019/06/06 20:41:04 mlelstv 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.450 2019/05/24 06:01:05 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wd.c,v 1.451 2019/06/06 20:41:04 mlelstv Exp $");
#include "opt_ata.h"
#include "opt_wd.h"
@@ -734,7 +734,8 @@
xfer->c_bio.flags |= ATA_FUA;
}
- wd->inflight++;
+ if (xfer->c_retries == 0)
+ wd->inflight++;
switch (wd->atabus->ata_bio(wd->drvp, xfer)) {
case ATACMD_TRY_AGAIN:
panic("wdstart1: try again");
@@ -989,7 +990,9 @@
ata_free_xfer(wd->drvp->chnl_softc, xfer);
+ mutex_enter(&wd->sc_lock);
wd->inflight--;
+ mutex_exit(&wd->sc_lock);
dk_done(dksc, bp);
dk_start(dksc, NULL);
}
Home |
Main Index |
Thread Index |
Old Index