aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/ciss/ciss.c
diff options
context:
space:
mode:
authorPaul Saab <ps@FreeBSD.org>2004-06-15 19:40:47 +0000
committerPaul Saab <ps@FreeBSD.org>2004-06-15 19:40:47 +0000
commit6f71a9531a2c386642142f9d1f2e95a272783f10 (patch)
tree45ee7ed0406262e78aba750a5fb09303ef090d83 /sys/dev/ciss/ciss.c
parent7b9d474460c942d8578cf49b172f217087439b1e (diff)
downloadsrc-6f71a9531a2c386642142f9d1f2e95a272783f10.tar.gz
src-6f71a9531a2c386642142f9d1f2e95a272783f10.zip
If a device is not ONLINE, do not attempt to submit any commands
or I/O to the volume. This solves a panic when removing a disk in a RAID 0 volume. Reported by: le
Notes
Notes: svn path=/head/; revision=130540
Diffstat (limited to 'sys/dev/ciss/ciss.c')
-rw-r--r--sys/dev/ciss/ciss.c27
1 files changed, 4 insertions, 23 deletions
diff --git a/sys/dev/ciss/ciss.c b/sys/dev/ciss/ciss.c
index 880e03a66b42..6e328e6ad4bf 100644
--- a/sys/dev/ciss/ciss.c
+++ b/sys/dev/ciss/ciss.c
@@ -2613,35 +2613,16 @@ ciss_cam_emulate(struct ciss_softc *sc, struct ccb_scsiio *csio)
*(u_int8_t *)csio->cdb_io.cdb_ptr : csio->cdb_io.cdb_bytes[0];
/*
- * Handle requests for volumes that don't exist. A selection timeout
- * is slightly better than an illegal request. Other errors might be
- * better.
+ * Handle requests for volumes that don't exist or are not online.
+ * A selection timeout is slightly better than an illegal request.
+ * Other errors might be better.
*/
- if (sc->ciss_logical[bus][target].cl_status == CISS_LD_NONEXISTENT) {
+ if (sc->ciss_logical[bus][target].cl_status != CISS_LD_ONLINE) {
csio->ccb_h.status = CAM_SEL_TIMEOUT;
xpt_done((union ccb *)csio);
return(1);
}
- /*
- * Handle requests for volumes that exist but are offline.
- *
- * I/O operations should fail, everything else should work.
- */
- if (sc->ciss_logical[bus][target].cl_status == CISS_LD_OFFLINE) {
- switch(opcode) {
- case READ_6:
- case READ_10:
- case READ_12:
- case WRITE_6:
- case WRITE_10:
- case WRITE_12:
- csio->ccb_h.status = CAM_SEL_TIMEOUT;
- xpt_done((union ccb *)csio);
- return(1);
- }
- }
-
/* if we have to fake Synchronise Cache */
if (sc->ciss_flags & CISS_FLAG_FAKE_SYNCH) {
/*