Index: ciss.c =================================================================== RCS file: /home/ncvs/src/sys/dev/ciss/ciss.c,v retrieving revision 1.64.2.4 diff -u -r1.64.2.4 ciss.c --- ciss.c 14 Dec 2006 22:00:53 -0000 1.64.2.4 +++ ciss.c 29 Sep 2007 07:24:11 -0000 @@ -3035,6 +3035,9 @@ ciss_periodic(void *arg) { struct ciss_softc *sc; + struct ciss_request *cr = NULL; + struct ciss_command *cc = NULL; + int error = 0; debug_called(1); @@ -3058,6 +3061,29 @@ } /* + * Send the NOP message and wait for a response. + */ + if ((error = ciss_get_request(sc, &cr)) != 0) { + goto out; + } + + cc = CISS_FIND_COMMAND(cr); + cc->cdb.cdb_length = 1; + cc->cdb.type = CISS_CDB_TYPE_MESSAGE; + cc->cdb.attribute = CISS_CDB_ATTRIBUTE_SIMPLE; + cc->cdb.direction = CISS_CDB_DIRECTION_WRITE; + cc->cdb.timeout = 0; + cc->cdb.cdb[0] = CISS_OPCODE_MESSAGE_NOP; + + if ((error = ciss_synch_request(cr, 10 * 1000)) != 0) { + ciss_printf(sc, "SENDING NOP MESSAGE FAILED\n"); + /* XXX should reset adapter here */ + goto out; + } + + ciss_release_request(cr); + + /* * If the notify event request has died for some reason, or has * not started yet, restart it. */ @@ -3071,6 +3097,14 @@ */ if (!(sc->ciss_flags & CISS_FLAG_ABORTING)) sc->ciss_periodic = timeout(ciss_periodic, sc, CISS_HEARTBEAT_RATE * hz); + + return; + +out: + ciss_printf(sc, "abort ciss_periodic() on error (%d)\n", error); + if (cr != NULL) { + ciss_release_request(cr); + } } /************************************************************************