Module Name: src Committed By: jdolecek Date: Sat Jun 24 00:00:10 UTC 2017
Modified Files: src/sys/dev/ata [jdolecek-ncq]: TODO.ncq wd.c Log Message: 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 To generate a diff of this commit: cvs rdiff -u -r1.1.2.23 -r1.1.2.24 src/sys/dev/ata/TODO.ncq cvs rdiff -u -r1.428.2.22 -r1.428.2.23 src/sys/dev/ata/wd.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/ata/TODO.ncq diff -u src/sys/dev/ata/TODO.ncq:1.1.2.23 src/sys/dev/ata/TODO.ncq:1.1.2.24 --- src/sys/dev/ata/TODO.ncq:1.1.2.23 Fri Jun 23 23:49:20 2017 +++ src/sys/dev/ata/TODO.ncq Sat Jun 24 00:00:10 2017 @@ -16,9 +16,6 @@ do proper NCQ error recovery (currently 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 Index: src/sys/dev/ata/wd.c diff -u src/sys/dev/ata/wd.c:1.428.2.22 src/sys/dev/ata/wd.c:1.428.2.23 --- src/sys/dev/ata/wd.c:1.428.2.22 Fri Jun 23 23:45:09 2017 +++ src/sys/dev/ata/wd.c Sat Jun 24 00:00:10 2017 @@ -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 @@ wdstart(device_t self) 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;