Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/ata stop xfer timeouts during recovery, all xfers wi...
details: https://anonhg.NetBSD.org/src/rev/0aa978984c0d
branches: trunk
changeset: 1008888:0aa978984c0d
user: jdolecek <jdolecek%NetBSD.org@localhost>
date: Sat Apr 04 22:30:02 2020 +0000
description:
stop xfer timeouts during recovery, all xfers will be requeued anyway
this avoids race with the timeout routine when processing the xfers
for requeueing
should fix PR kern/54790 by Izumi Tsutsui
diffstat:
sys/dev/ata/ata_recovery.c | 7 +++++--
sys/dev/ata/ata_subr.c | 9 +++++++--
2 files changed, 12 insertions(+), 4 deletions(-)
diffs (58 lines):
diff -r 410ceb820bce -r 0aa978984c0d sys/dev/ata/ata_recovery.c
--- a/sys/dev/ata/ata_recovery.c Sat Apr 04 22:08:33 2020 +0000
+++ b/sys/dev/ata/ata_recovery.c Sat Apr 04 22:30:02 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ata_recovery.c,v 1.2 2018/10/22 20:13:47 jdolecek Exp $ */
+/* $NetBSD: ata_recovery.c,v 1.3 2020/04/04 22:30:02 jdolecek Exp $ */
/*-
* Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ata_recovery.c,v 1.2 2018/10/22 20:13:47 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ata_recovery.c,v 1.3 2020/04/04 22:30:02 jdolecek Exp $");
#include "opt_ata.h"
@@ -171,6 +171,9 @@
ata_queue_hold(chp);
+ /* Stop the timeout callout, recovery will requeue once done */
+ callout_stop(&chp->c_timo_callout);
+
KASSERT(drive < chp->ch_ndrives);
drvp = &chp->ch_drive[drive];
diff -r 410ceb820bce -r 0aa978984c0d sys/dev/ata/ata_subr.c
--- a/sys/dev/ata/ata_subr.c Sat Apr 04 22:08:33 2020 +0000
+++ b/sys/dev/ata/ata_subr.c Sat Apr 04 22:30:02 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ata_subr.c,v 1.8 2018/11/07 17:05:54 jdolecek Exp $ */
+/* $NetBSD: ata_subr.c,v 1.9 2020/04/04 22:30:02 jdolecek Exp $ */
/*
* Copyright (c) 1998, 2001 Manuel Bouyer. All rights reserved.
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ata_subr.c,v 1.8 2018/11/07 17:05:54 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ata_subr.c,v 1.9 2020/04/04 22:30:02 jdolecek Exp $");
#include "opt_ata.h"
@@ -235,6 +235,11 @@
callout_ack(&chp->c_timo_callout);
+ if (chp->ch_flags & ATACH_RECOVERING) {
+ /* Do nothing, recovery will requeue the xfers */
+ return;
+ }
+
/*
* If there is a timeout, means the last enqueued command
* timed out, and thus all commands timed out.
Home |
Main Index |
Thread Index |
Old Index