Source-Changes-HG archive

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

[src/jdolecek-ncq]: src/sys/dev/ata remove ata_queue_get_active_xfer() KASSER...



details:   https://anonhg.NetBSD.org/src/rev/87604f32ddd5
branches:  jdolecek-ncq
changeset: 823029:87604f32ddd5
user:      jdolecek <jdolecek%NetBSD.org@localhost>
date:      Sat Sep 23 13:13:19 2017 +0000

description:
remove ata_queue_get_active_xfer() KASSERT() about having at least one
active xfer; it can happen we get interrupt while no longer having the cmd
active e.g. during recovery, and all callers handle getting NULL as result

fixes panic in mvsata(4) during error recovery

diffstat:

 sys/dev/ata/ata.c |  7 ++-----
 1 files changed, 2 insertions(+), 5 deletions(-)

diffs (29 lines):

diff -r 4c766b7246b7 -r 87604f32ddd5 sys/dev/ata/ata.c
--- a/sys/dev/ata/ata.c Fri Sep 22 20:19:08 2017 +0000
+++ b/sys/dev/ata/ata.c Sat Sep 23 13:13:19 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ata.c,v 1.132.8.34 2017/09/20 19:39:36 jdolecek Exp $  */
+/*     $NetBSD: ata.c,v 1.132.8.35 2017/09/23 13:13:19 jdolecek 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.132.8.34 2017/09/20 19:39:36 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ata.c,v 1.132.8.35 2017/09/23 13:13:19 jdolecek Exp $");
 
 #include "opt_ata.h"
 
@@ -244,10 +244,7 @@
        struct ata_xfer *xfer = NULL;
 
        ata_channel_lock(chp);
-
-       KASSERT(chp->ch_queue->queue_active <= 1);
        xfer = ata_queue_get_active_xfer_locked(chp);
-
        ata_channel_unlock(chp);
 
        return xfer;



Home | Main Index | Thread Index | Old Index