diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2007-11-06 02:49:20 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2007-11-06 02:49:20 +0000 |
commit | 2499ae4d6f8e22c6fb9509842c2765109edf9276 (patch) | |
tree | 455d801574aa2ede337dedf9fe411f372a61382b /sys/scsi/scsiconf.c | |
parent | afa192bae9ff2b3a8a5bf48110b86f17ee9dcd21 (diff) |
Fix SDF_DIRTY handling, eliminate useless SDF_FLUSHING. The sd_flush()
called from the last sdclose() on a device will now reset SDF_DIRTY
after submitting the SYNCHRONIZE CACHE command. sddone() need not
worry about SDF_DIRTY since it was never called for the SYNCHRONIZE
CACHE command anyway.
This eliminates a spurious SYNCHRONIZE CACHE command being issued for
every sd device from sd_shutdown().
ok dlg@
Diffstat (limited to 'sys/scsi/scsiconf.c')
-rw-r--r-- | sys/scsi/scsiconf.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/scsi/scsiconf.c b/sys/scsi/scsiconf.c index a32a29ec168..b2c4e367216 100644 --- a/sys/scsi/scsiconf.c +++ b/sys/scsi/scsiconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: scsiconf.c,v 1.126 2007/09/16 15:54:52 krw Exp $ */ +/* $OpenBSD: scsiconf.c,v 1.127 2007/11/06 02:49:19 krw Exp $ */ /* $NetBSD: scsiconf.c,v 1.57 1996/05/02 01:09:01 neil Exp $ */ /* @@ -799,7 +799,10 @@ scsi_probedev(struct scsibus_softc *scsi, int target, int lun) sc_link->quirks &= ~SDEV_NOSYNC; if ((inqbuf.flags & SID_WBus16) != 0) sc_link->quirks &= ~SDEV_NOWIDE; - } + } else + /* Older devices do not have SYNCHRONIZE CACHE capability. */ + sc_link->quirks |= SDEV_NOSYNCCACHE; + /* * Now apply any quirks from the table. */ |