Source-Changes-HG archive

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

[src/jdolecek-ncq]: src/sys/dev/ic remove ata queue downsizing - every device...



details:   https://anonhg.NetBSD.org/src/rev/7335f4269111
branches:  jdolecek-ncq
changeset: 352681:7335f4269111
user:      jdolecek <jdolecek%NetBSD.org@localhost>
date:      Tue Jun 20 21:00:47 2017 +0000

description:
remove ata queue downsizing - every device, attached to the same channel,
uses slots according to it's own limits

wdc code changed to expect maximum one active xfer, and not check number
of openings in the channel; this is to facilitate using wdc functions
for e.g. handling of atapi commands  for drivers which support both ATAPI
and NCQ

siisata(4) part, including fix to hang on drive probe (missing ata_free_xfer())

diffstat:

 sys/dev/ic/siisata.c |  13 ++++++++-----
 1 files changed, 8 insertions(+), 5 deletions(-)

diffs (55 lines):

diff -r b744e795b607 -r 7335f4269111 sys/dev/ic/siisata.c
--- a/sys/dev/ic/siisata.c      Tue Jun 20 20:58:22 2017 +0000
+++ b/sys/dev/ic/siisata.c      Tue Jun 20 21:00:47 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: siisata.c,v 1.30.4.17 2017/06/19 21:00:00 jdolecek Exp $ */
+/* $NetBSD: siisata.c,v 1.30.4.18 2017/06/20 21:00:47 jdolecek Exp $ */
 
 /* from ahcisata_core.c */
 
@@ -79,7 +79,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: siisata.c,v 1.30.4.17 2017/06/19 21:00:00 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: siisata.c,v 1.30.4.18 2017/06/20 21:00:47 jdolecek Exp $");
 
 #include <sys/types.h>
 #include <sys/param.h>
@@ -588,7 +588,7 @@
         * Try to get available slot. If there is none available, must
         * do full channel reset.
         */
-       xfer = ata_get_xfer(chp, false);
+       xfer = ata_get_xfer_ext(chp, false, 0);
        if (xfer == NULL) {
                siisata_reset_channel(chp, flags);
                return;
@@ -738,7 +738,7 @@
        SIISATA_DEBUG_PRINT(("%s: %s: port %d start\n", SIISATANAME(sc),
            __func__, chp->ch_channel), DEBUG_FUNCS);
 
-       xfer = ata_get_xfer(chp, true);
+       xfer = ata_get_xfer(chp);
        if (xfer == NULL) {
                aprint_error_dev(sc->sc_atac.atac_dev,
                    "failed to get xfer port %d\n",
@@ -821,6 +821,9 @@
        }
 
        siisata_enable_port_interrupt(chp);
+
+       ata_free_xfer(chp, xfer);
+
        SIISATA_DEBUG_PRINT(("%s: %s: port %d done\n", SIISATANAME(sc),
            __func__, chp->ch_channel), DEBUG_PROBE);
        return;
@@ -1597,7 +1600,7 @@
                        scsipi_done(sc_xfer);
                        return;
                }
-               xfer = ata_get_xfer(atac->atac_channels[channel], false);
+               xfer = ata_get_xfer_ext(atac->atac_channels[channel], false, 0);
                if (xfer == NULL) {
                        sc_xfer->error = XS_RESOURCE_SHORTAGE;
                        scsipi_done(sc_xfer);



Home | Main Index | Thread Index | Old Index