summaryrefslogtreecommitdiff
path: root/sys/scsi
diff options
context:
space:
mode:
authorDavid Gwynne <dlg@cvs.openbsd.org>2009-12-03 06:09:31 +0000
committerDavid Gwynne <dlg@cvs.openbsd.org>2009-12-03 06:09:31 +0000
commit87daf3f58d90c81782326b86413d4c495f87d8e0 (patch)
tree41f50be1c7e6495dc77508f5ec673110c9bcf294 /sys/scsi
parent1e2a1f061c3c0090c1cafe2aedc73ea9e7acab5b (diff)
set the length of the cdb when synchronising cache.
noticed by deraadt@ and miod@
Diffstat (limited to 'sys/scsi')
-rw-r--r--sys/scsi/sd.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/scsi/sd.c b/sys/scsi/sd.c
index 56112eab8b0..08378cbcc33 100644
--- a/sys/scsi/sd.c
+++ b/sys/scsi/sd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sd.c,v 1.167 2009/12/01 03:43:17 krw Exp $ */
+/* $OpenBSD: sd.c,v 1.168 2009/12/03 06:09:30 dlg Exp $ */
/* $NetBSD: sd.c,v 1.111 1997/04/02 02:29:41 mycroft Exp $ */
/*-
@@ -1482,6 +1482,7 @@ sd_flush(struct sd_softc *sc, int flags)
cmd = (struct scsi_synchronize_cache *)xs->cmd;
cmd->opcode = SYNCHRONIZE_CACHE;
+ xs->cmdlen = sizeof(*cmd);
xs->timeout = 100000;
xs->done = sd_flush_done;