Module Name: src
Committed By: jdolecek
Date: Tue Aug 15 11:21:32 UTC 2017
Modified Files:
src/sys/dev/ata [jdolecek-ncq]: ata.c
Log Message:
explicitly do not try to activate any further commands when running recovery
xfer; it was kind of implied since the code would not queue another non-NCQ
command when non-NCQ command is active, but this is better for readibility
To generate a diff of this commit:
cvs rdiff -u -r1.132.8.28 -r1.132.8.29 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.132.8.28 src/sys/dev/ata/ata.c:1.132.8.29
--- src/sys/dev/ata/ata.c:1.132.8.28 Sat Aug 12 22:31:50 2017
+++ src/sys/dev/ata/ata.c Tue Aug 15 11:21:32 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: ata.c,v 1.132.8.28 2017/08/12 22:31:50 jdolecek Exp $ */
+/* $NetBSD: ata.c,v 1.132.8.29 2017/08/15 11:21:32 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.28 2017/08/12 22:31:50 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ata.c,v 1.132.8.29 2017/08/15 11:21:32 jdolecek Exp $");
#include "opt_ata.h"
@@ -1249,7 +1249,7 @@ atastart(struct ata_channel *chp)
struct atac_softc *atac = chp->ch_atac;
struct ata_queue *chq = chp->ch_queue;
struct ata_xfer *xfer, *axfer;
- bool immediate;
+ bool recovery;
#ifdef ATA_DEBUG
int spl1, spl2;
@@ -1276,10 +1276,10 @@ again:
if ((xfer = TAILQ_FIRST(&chp->ch_queue->queue_xfer)) == NULL)
goto out;
- immediate = ISSET(xfer->c_flags, C_RECOVERY);
+ recovery = ISSET(xfer->c_flags, C_RECOVERY);
/* is the queue frozen? */
- if (__predict_false(!immediate && chq->queue_freeze > 0)) {
+ if (__predict_false(!recovery && chq->queue_freeze > 0)) {
if (chq->queue_flags & QF_IDLE_WAIT) {
chq->queue_flags &= ~QF_IDLE_WAIT;
wakeup(&chq->queue_flags);
@@ -1298,7 +1298,7 @@ again:
* Need only check first xfer.
* XXX FIS-based switching - revisit
*/
- if (!immediate && (axfer = TAILQ_FIRST(&chp->ch_queue->active_xfers))) {
+ if (!recovery && (axfer = TAILQ_FIRST(&chp->ch_queue->active_xfers))) {
if (!ISSET(xfer->c_flags, C_NCQ) ||
!ISSET(axfer->c_flags, C_NCQ) ||
xfer->c_drive != axfer->c_drive)
@@ -1344,8 +1344,8 @@ again:
*/
xfer->c_start(chp, xfer);
- /* Queue more commands if possible */
- if (chq->queue_active < chq->queue_openings)
+ /* Queue more commands if possible, but not during recovery */
+ if (!recovery && chq->queue_active < chq->queue_openings)
goto again;
return;