summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Gwynne <dlg@cvs.openbsd.org>2014-03-25 12:01:29 +0000
committerDavid Gwynne <dlg@cvs.openbsd.org>2014-03-25 12:01:29 +0000
commit427cb859b812ffe8941ecb3b0a210b1e1c5116c4 (patch)
treefdcac3f19e3802c0681274da88dbb7a32b76ef92
parent4f16c4fd643e778974fb4d347b5aea00a9ae6e4c (diff)
when working with the cdb its better to use cmdlen than datalen.
ok jmatthew@
-rw-r--r--sys/dev/pci/qle.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/pci/qle.c b/sys/dev/pci/qle.c
index c40f9109a07..4a06d935d7e 100644
--- a/sys/dev/pci/qle.c
+++ b/sys/dev/pci/qle.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: qle.c,v 1.17 2014/03/25 07:15:52 dlg Exp $ */
+/* $OpenBSD: qle.c,v 1.18 2014/03/25 12:01:28 dlg Exp $ */
/*
* Copyright (c) 2013, 2014 Jonathan Matthew <jmatthew@openbsd.org>
@@ -2388,7 +2388,7 @@ qle_put_cmd(struct qle_softc *sc, void *buf, struct scsi_xfer *xs,
if (xs->cmdlen > 16) {
htolem16(&req->req_fcp_cmnd_len, 12 + xs->cmdlen + 4);
cmnd->fcp_add_cdb_len = xs->cmdlen - 16;
- memcpy(cmnd->fcp_cdb + xs->datalen, &fcp_dl, sizeof(fcp_dl));
+ memcpy(cmnd->fcp_cdb + xs->cmdlen, &fcp_dl, sizeof(fcp_dl));
} else {
htolem16(&req->req_fcp_cmnd_len, 12 + 16 + 4);
cmnd->fcp_add_cdb_len = 0;