Module Name:    src
Committed By:   jdolecek
Date:           Tue Jun 20 21:00:47 UTC 2017

Modified Files:
        src/sys/dev/ic [jdolecek-ncq]: siisata.c

Log Message:
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())


To generate a diff of this commit:
cvs rdiff -u -r1.30.4.17 -r1.30.4.18 src/sys/dev/ic/siisata.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/ic/siisata.c
diff -u src/sys/dev/ic/siisata.c:1.30.4.17 src/sys/dev/ic/siisata.c:1.30.4.18
--- src/sys/dev/ic/siisata.c:1.30.4.17	Mon Jun 19 21:00:00 2017
+++ src/sys/dev/ic/siisata.c	Tue Jun 20 21:00:47 2017
@@ -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 @@ siisata_reset_drive(struct ata_drive_dat
 	 * 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_probe_drive(struct ata_channel *
 	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_probe_drive(struct ata_channel *
 	}
 
 	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 @@ siisata_atapi_scsipi_request(struct scsi
 			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);

Reply via email to