Index: ciss.c =================================================================== RCS file: /home/ncvs/src/sys/dev/ciss/ciss.c,v retrieving revision 1.81 diff -u -r1.81 ciss.c --- ciss.c 17 Jun 2007 05:55:49 -0000 1.81 +++ ciss.c 29 Sep 2007 07:30:23 -0000 @@ -3067,6 +3067,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); @@ -3090,6 +3093,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. */ @@ -3102,6 +3128,14 @@ * Reschedule. */ callout_reset(&sc->ciss_periodic, CISS_HEARTBEAT_RATE * hz, ciss_periodic, sc); + + return; + +out: + ciss_printf(sc, "abort ciss_periodic() on error (%d)\n", error); + if (cr != NULL) { + ciss_release_request(cr); + } } /************************************************************************