summaryrefslogtreecommitdiff
path: root/sys/scsi/sd.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2010-08-31 16:34:39 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2010-08-31 16:34:39 +0000
commit57091ba13b8a979e4d0e69b1e99be79155d77ed0 (patch)
treee7d5f56301124b00a586e02e9e8c009df7688a61 /sys/scsi/sd.c
parent96a7260cbfa15e94cbc504cbc834181f38f6bca8 (diff)
in the activate function, order the DVACT_ functions in the order they
can expect to be used
Diffstat (limited to 'sys/scsi/sd.c')
-rw-r--r--sys/scsi/sd.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/sys/scsi/sd.c b/sys/scsi/sd.c
index 6a5f9901651..8ca02b80fd4 100644
--- a/sys/scsi/sd.c
+++ b/sys/scsi/sd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sd.c,v 1.206 2010/08/28 20:23:22 matthew Exp $ */
+/* $OpenBSD: sd.c,v 1.207 2010/08/31 16:34:38 deraadt Exp $ */
/* $NetBSD: sd.c,v 1.111 1997/04/02 02:29:41 mycroft Exp $ */
/*-
@@ -273,12 +273,6 @@ sdactivate(struct device *self, int act)
switch (act) {
case DVACT_ACTIVATE:
break;
-
- case DVACT_DEACTIVATE:
- sc->flags |= SDF_DYING;
- bufq_drain(sc->sc_bufq);
- break;
-
case DVACT_SUSPEND:
/*
* Stop the disk. Stopping the disk should flush the
@@ -290,13 +284,15 @@ sdactivate(struct device *self, int act)
scsi_start(sc->sc_link, SSS_STOP,
SCSI_IGNORE_ILLEGAL_REQUEST | SCSI_AUTOCONF);
break;
-
case DVACT_RESUME:
scsi_start(sc->sc_link, SSS_START,
SCSI_IGNORE_ILLEGAL_REQUEST | SCSI_AUTOCONF);
break;
+ case DVACT_DEACTIVATE:
+ sc->flags |= SDF_DYING;
+ bufq_drain(sc->sc_bufq);
+ break;
}
-
return (rv);
}