summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authormartin <martin@NetBSD.org>2022-03-15 18:00:26 +0000
committermartin <martin@NetBSD.org>2022-03-15 18:00:26 +0000
commit1bbf5441344f05a5c1b904920d2ad7697b07f22c (patch)
tree6376031202767478cf5b5d0dab1f23e8705d9a4c /sys
parentc08d337c78624b625e1ab2fd67f45628c2b8a7e2 (diff)
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.
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/ata/ata.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/sys/dev/ata/ata.c b/sys/dev/ata/ata.c
index c73e70fec5c..56c0b2f0576 100644
--- a/sys/dev/ata/ata.c
+++ b/sys/dev/ata/ata.c
@@ -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, int flags, int type, int arg)
/* 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;