summaryrefslogtreecommitdiff
path: root/sbin/atactl/atactl.c
diff options
context:
space:
mode:
authorGrigoriy Orlov <gluk@cvs.openbsd.org>2002-03-27 17:42:38 +0000
committerGrigoriy Orlov <gluk@cvs.openbsd.org>2002-03-27 17:42:38 +0000
commit87bbeef386d9841d66a33f3656cceb83128598e6 (patch)
treed84266ad34936de88e8a8e36b5da9522a2223f9a /sbin/atactl/atactl.c
parentd0d12731d1effad29d23f723d67ceb4f520e40ca (diff)
Calculate the maximum queue depth correctly.
PR2490 from Alexander Yurchenko <grange@rt.mipt.ru>
Diffstat (limited to 'sbin/atactl/atactl.c')
-rw-r--r--sbin/atactl/atactl.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sbin/atactl/atactl.c b/sbin/atactl/atactl.c
index e4f3ef4beaf..876d2b9bf61 100644
--- a/sbin/atactl/atactl.c
+++ b/sbin/atactl/atactl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: atactl.c,v 1.11 2002/03/14 06:51:41 mpech Exp $ */
+/* $OpenBSD: atactl.c,v 1.12 2002/03/27 17:42:37 gluk Exp $ */
/* $NetBSD: atactl.c,v 1.4 1999/02/24 18:49:14 jwise Exp $ */
/*-
@@ -438,9 +438,10 @@ device_identify(argc, argv)
(inqbuf->atap_capacity[1] << 16) |
inqbuf->atap_capacity[0]);
- if (inqbuf->atap_queuedepth & WDC_QUEUE_DEPTH_MASK)
+ if ((inqbuf->atap_cmd_set2 & ATA_CMD2_RWQ) &&
+ (inqbuf->atap_queuedepth & WDC_QUEUE_DEPTH_MASK))
printf("Device supports command queue depth of %d\n",
- inqbuf->atap_queuedepth & 0xf);
+ (inqbuf->atap_queuedepth & WDC_QUEUE_DEPTH_MASK) + 1);
printf("Device capabilities:\n");
print_bitinfo("\t%s\n", inqbuf->atap_capabilities1, ata_caps);