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 only limit the openings for I/O xfer if t...



details:   https://anonhg.NetBSD.org/src/rev/2a6182e73fc6
branches:  jdolecek-ncq
changeset: 822943:2a6182e73fc6
user:      jdolecek <jdolecek%NetBSD.org@localhost>
date:      Sat Jun 24 00:00:10 2017 +0000

description:
only limit the openings for I/O xfer if the drive actually supports NCQ; if
it's non-NCQ drive, the tag is not going to be used, so we can use any xfer

diffstat:

 sys/dev/ata/TODO.ncq |  3 ---
 sys/dev/ata/wd.c     |  9 +++++----
 2 files changed, 5 insertions(+), 7 deletions(-)

diffs (44 lines):

diff -r 19878bd9007e -r 2a6182e73fc6 sys/dev/ata/TODO.ncq
--- a/sys/dev/ata/TODO.ncq      Fri Jun 23 23:49:20 2017 +0000
+++ b/sys/dev/ata/TODO.ncq      Sat Jun 24 00:00:10 2017 +0000
@@ -16,9 +16,6 @@
 maybe do device error handling in not-interrupt-context (maybe this should be
 done on a mpata branch?)
 
-do not limit openings for xfers for non-NCQ drives in wdstart(), the tag
-will not be used so can use any xfer
-
 in atastart(), restrict NCQ commands to commands for the same drive? it's
 fine for fis-based switching to have outstanding for several drives, but
 not non-FIS
diff -r 19878bd9007e -r 2a6182e73fc6 sys/dev/ata/wd.c
--- a/sys/dev/ata/wd.c  Fri Jun 23 23:49:20 2017 +0000
+++ b/sys/dev/ata/wd.c  Sat Jun 24 00:00:10 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: wd.c,v 1.428.2.22 2017/06/23 23:45:09 jdolecek Exp $ */
+/*     $NetBSD: wd.c,v 1.428.2.23 2017/06/24 00:00:10 jdolecek Exp $ */
 
 /*
  * Copyright (c) 1998, 2001 Manuel Bouyer.  All rights reserved.
@@ -54,7 +54,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: wd.c,v 1.428.2.22 2017/06/23 23:45:09 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wd.c,v 1.428.2.23 2017/06/24 00:00:10 jdolecek Exp $");
 
 #include "opt_ata.h"
 
@@ -659,9 +659,10 @@
                goto out;
 
        while (bufq_peek(wd->sc_q) != NULL) {
-               /* First try to get command */
+               /* First try to get xfer. Limit to drive openings iff NCQ. */
                xfer = ata_get_xfer_ext(wd->drvp->chnl_softc, false,
-                   wd->drvp->drv_openings);
+                   ISSET(wd->drvp->drive_flags, ATA_DRIVE_NCQ)
+                       ? wd->drvp->drv_openings : 0);
                if (xfer == NULL)
                        break;
 



Home | Main Index | Thread Index | Old Index