summaryrefslogtreecommitdiffstats
path: root/sys/dev/ciss
diff options
context:
space:
mode:
authorps <ps@FreeBSD.org>2004-06-15 19:40:47 +0000
committerps <ps@FreeBSD.org>2004-06-15 19:40:47 +0000
commit6e7aa9fe96e18be01b73fa5f884c902b19a68d2a (patch)
tree45ee7ed0406262e78aba750a5fb09303ef090d83 /sys/dev/ciss
parent72b65ac70d0ea0478fffd2150b3a870223126cb4 (diff)
downloadFreeBSD-src-6e7aa9fe96e18be01b73fa5f884c902b19a68d2a.zip
FreeBSD-src-6e7aa9fe96e18be01b73fa5f884c902b19a68d2a.tar.gz
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
Diffstat (limited to 'sys/dev/ciss')
-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 880e03a..6e328e6 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) {
/*
OpenPOWER on IntegriCloud