Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-9]: src/sys/dev/ata Pull up following revision(s) (requested by p...



details:   https://anonhg.NetBSD.org/src/rev/251eb5f3696d
branches:  netbsd-9
changeset: 363916:251eb5f3696d
user:      martin <martin%NetBSD.org@localhost>
date:      Tue Mar 15 18:00:26 2022 +0000

description:
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:

 sys/dev/ata/ata.c |  18 ++++++++++--------
 1 files changed, 10 insertions(+), 8 deletions(-)

diffs (39 lines):

diff -r d2b100cc0443 -r 251eb5f3696d sys/dev/ata/ata.c
--- a/sys/dev/ata/ata.c Tue Mar 15 09:59:28 2022 +0000
+++ b/sys/dev/ata/ata.c Tue Mar 15 18:00:26 2022 +0000
@@ -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 @@
                        /* 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;



Home | Main Index | Thread Index | Old Index