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 provide channel flag when executing NCQ c...



details:   https://anonhg.NetBSD.org/src/rev/f9cd144622f5
branches:  jdolecek-ncq
changeset: 822969:f9cd144622f5
user:      jdolecek <jdolecek%NetBSD.org@localhost>
date:      Sat Jul 22 22:02:21 2017 +0000

description:
provide channel flag when executing NCQ commands, so that e.g. intr
handler can use this for handling decisions without checking xfer

diffstat:

 sys/dev/ata/ata.c    |  9 +++++++--
 sys/dev/ata/atavar.h |  3 ++-
 2 files changed, 9 insertions(+), 3 deletions(-)

diffs (47 lines):

diff -r 9a7d9e0e6dce -r f9cd144622f5 sys/dev/ata/ata.c
--- a/sys/dev/ata/ata.c Fri Jul 21 18:36:47 2017 +0000
+++ b/sys/dev/ata/ata.c Sat Jul 22 22:02:21 2017 +0000
@@ -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 @@
                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)
diff -r 9a7d9e0e6dce -r f9cd144622f5 sys/dev/ata/atavar.h
--- a/sys/dev/ata/atavar.h      Fri Jul 21 18:36:47 2017 +0000
+++ b/sys/dev/ata/atavar.h      Sat Jul 22 22:02:21 2017 +0000
@@ -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 @@
 #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 */



Home | Main Index | Thread Index | Old Index