Module Name: src
Committed By: martin
Date: Tue Mar 15 18:00:27 UTC 2022
Modified Files:
src/sys/dev/ata [netbsd-9]: ata.c
Log Message:
Pull up following revision(s) (requested by perseant in ticket #1435):
sys/dev/ata/ata.c: revision 1.167
Avoid an unaccounted extra channel freeze, if a reset is requested
more than once before the thread services the request. Closes PR#56745.
To generate a diff of this commit:
cvs rdiff -u -r1.149 -r1.149.2.1 src/sys/dev/ata/ata.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/ata.c
diff -u src/sys/dev/ata/ata.c:1.149 src/sys/dev/ata/ata.c:1.149.2.1
--- src/sys/dev/ata/ata.c:1.149 Sat May 25 16:30:18 2019
+++ src/sys/dev/ata/ata.c Tue Mar 15 18:00:26 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: ata.c,v 1.149 2019/05/25 16:30:18 christos Exp $ */
+/* $NetBSD: ata.c,v 1.149.2.1 2022/03/15 18:00:26 martin Exp $ */
/*
* Copyright (c) 1998, 2001 Manuel Bouyer. All rights reserved.
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ata.c,v 1.149 2019/05/25 16:30:18 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ata.c,v 1.149.2.1 2022/03/15 18:00:26 martin Exp $");
#include "opt_ata.h"
@@ -1584,12 +1584,14 @@ ata_thread_run(struct ata_channel *chp,
/* NOTREACHED */
}
- /*
- * Block execution of other commands while reset is scheduled
- * to a thread.
- */
- ata_channel_freeze_locked(chp);
- chp->ch_flags |= type;
+ if (!(chp->ch_flags & type)) {
+ /*
+ * Block execution of other commands while
+ * reset is scheduled to a thread.
+ */
+ ata_channel_freeze_locked(chp);
+ chp->ch_flags |= type;
+ }
cv_signal(&chp->ch_thr_idle);
return;