Module Name: src
Committed By: jdolecek
Date: Sat Jul 22 22:02:21 UTC 2017
Modified Files:
src/sys/dev/ata [jdolecek-ncq]: ata.c atavar.h
Log Message:
provide channel flag when executing NCQ commands, so that e.g. intr
handler can use this for handling decisions without checking xfer
To generate a diff of this commit:
cvs rdiff -u -r1.132.8.20 -r1.132.8.21 src/sys/dev/ata/ata.c
cvs rdiff -u -r1.92.8.18 -r1.92.8.19 src/sys/dev/ata/atavar.h
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.20 src/sys/dev/ata/ata.c:1.132.8.21
--- src/sys/dev/ata/ata.c:1.132.8.20 Fri Jul 21 18:12:37 2017
+++ src/sys/dev/ata/ata.c Sat Jul 22 22:02:21 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: ata.c,v 1.132.8.20 2017/07/21 18:12:37 jdolecek Exp $ */
+/* $NetBSD: ata.c,v 1.132.8.21 2017/07/22 22:02:21 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.20 2017/07/21 18:12:37 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ata.c,v 1.132.8.21 2017/07/22 22:02:21 jdolecek Exp $");
#include "opt_ata.h"
@@ -1305,6 +1305,11 @@ atastart(struct ata_channel *chp)
drvp->state = 0;
}
+ if (ISSET(xfer->c_flags, C_NCQ))
+ SET(chp->ch_flags, ATACH_NCQ);
+ else
+ CLR(chp->ch_flags, ATACH_NCQ);
+
ata_activate_xfer_locked(chp, xfer);
if (atac->atac_cap & ATAC_CAP_NOIRQ)
Index: src/sys/dev/ata/atavar.h
diff -u src/sys/dev/ata/atavar.h:1.92.8.18 src/sys/dev/ata/atavar.h:1.92.8.19
--- src/sys/dev/ata/atavar.h:1.92.8.18 Fri Jul 21 17:32:27 2017
+++ src/sys/dev/ata/atavar.h Sat Jul 22 22:02:21 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: atavar.h,v 1.92.8.18 2017/07/21 17:32:27 jdolecek Exp $ */
+/* $NetBSD: atavar.h,v 1.92.8.19 2017/07/22 22:02:21 jdolecek Exp $ */
/*
* Copyright (c) 1998, 2001 Manuel Bouyer.
@@ -394,6 +394,7 @@ struct ata_channel {
#define ATACH_TH_RUN 0x100 /* the kernel thread is working */
#define ATACH_TH_RESET 0x200 /* someone ask the thread to reset */
#define ATACH_TH_RESCAN 0x400 /* rescan requested */
+#define ATACH_NCQ 0x800 /* channel executing NCQ commands */
#if 1 /* for now */
uint8_t ch_status; /* copy of status register */
uint8_t ch_error; /* copy of error register */