diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2007-11-11 16:46:52 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2007-11-11 16:46:52 +0000 |
commit | 1e8381fe5c518359d653c43c8f8d27b143e0cda2 (patch) | |
tree | 6533444561c6e50e873b0b64a794da355c7a0fa7 | |
parent | 228ff7a606d4fe8e90b0219e4c0b664a5f612d46 (diff) |
Revert useless textual optimization that resulted in 16 bytes being
sent to the adapter instead of the 10 bytes the scsi_sychronize_cache
command actually occupies. This freaked out the ahc on jsing@'s SGI
and probably others.
Found, isolated, fix tested, and ok jsing@
-rw-r--r-- | sys/scsi/sd.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/scsi/sd.c b/sys/scsi/sd.c index c8027ef918c..780b801fdc5 100644 --- a/sys/scsi/sd.c +++ b/sys/scsi/sd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sd.c,v 1.138 2007/11/06 02:49:19 krw Exp $ */ +/* $OpenBSD: sd.c,v 1.139 2007/11/11 16:46:51 krw Exp $ */ /* $NetBSD: sd.c,v 1.111 1997/04/02 02:29:41 mycroft Exp $ */ /*- @@ -1465,7 +1465,7 @@ void sd_flush(struct sd_softc *sd, int flags) { struct scsi_link *sc_link = sd->sc_link; - struct scsi_generic cmd; + struct scsi_synchronize_cache cmd; if (sc_link->quirks & SDEV_NOSYNCCACHE) return; @@ -1479,8 +1479,9 @@ sd_flush(struct sd_softc *sd, int flags) bzero(&cmd, sizeof(cmd)); cmd.opcode = SYNCHRONIZE_CACHE; - if (scsi_scsi_cmd(sc_link, &cmd, sizeof(cmd), NULL, 0, SDRETRIES, - 100000, NULL, flags | SCSI_IGNORE_ILLEGAL_REQUEST)) { + if (scsi_scsi_cmd(sc_link, (struct scsi_generic *)&cmd, sizeof(cmd), + NULL, 0, SDRETRIES, 100000, NULL, + flags | SCSI_IGNORE_ILLEGAL_REQUEST)) { SC_DEBUG(sc_link, SDEV_DB1, ("cache sync failed\n")); } else sd->flags &= ~SDF_DIRTY; |