--- //depot/vendor/freebsd/src/sys/cam/scsi/scsi_low.c 2011-11-07 06:50:30.000000000 0000 +++ //depot/user/jhb/cleanup/sys/cam/scsi/scsi_low.c 2012-08-12 22:46:16.000000000 0000 @@ -1300,6 +1300,11 @@ sprintf(slp->sl_xname, "%s%d", DEVPORT_DEVNAME(slp->sl_dev), DEVPORT_DEVUNIT(slp->sl_dev)); + callout_init(&slp->sl_si.engage_timer, 0); + callout_init(&slp->sl_si.timeout_timer, 0); +#ifdef SCSI_LOW_POWFUNC + callout_init(&slp->sl_si.recover_timer, 0); +#endif devq = cam_simq_alloc(SCSI_LOW_NCCB); if (devq == NULL) @@ -1350,6 +1355,11 @@ struct scsi_low_softc *slp; { + callout_drain(&slp->sl_si.engage_timer); + callout_drain(&slp->sl_si.timeout_timer); +#ifdef SCSI_LOW_POWFUNC + callout_drain(&slp->sl_si.recover_timer); +#endif xpt_async(AC_LOST_DEVICE, slp->sl_si.path, NULL); xpt_free_path(slp->sl_si.path); xpt_bus_deregister(cam_sim_path(slp->sl_si.sim)); @@ -1454,11 +1464,11 @@ switch (action) { case SCSI_LOW_TIMEOUT_START: - slp->sl_si.timeout_ch = timeout(scsi_low_timeout, slp, - hz / SCSI_LOW_TIMEOUT_HZ); + callout_reset(&slp->sl_si.timeout_timer, + hz / SCSI_LOW_TIMEOUT_HZ, scsi_low_timeout, slp); break; case SCSI_LOW_TIMEOUT_STOP: - untimeout(scsi_low_timeout, slp, slp->sl_si.timeout_ch); + callout_stop(&slp->sl_si.timeout_timer); break; } break; @@ -1467,10 +1477,11 @@ switch (action) { case SCSI_LOW_TIMEOUT_START: - slp->sl_si.engage_ch = timeout(scsi_low_engage, slp, 1); + callout_reset(&slp->sl_si.engage_timer, 1, + scsi_low_engage, slp); break; case SCSI_LOW_TIMEOUT_STOP: - untimeout(scsi_low_engage, slp, slp->sl_si.engage_ch); + callout_stop(&slp->sl_si.engage_timer); break; } break; --- //depot/vendor/freebsd/src/sys/cam/scsi/scsi_low.h 2007-12-25 17:56:52.000000000 0000 +++ //depot/user/jhb/cleanup/sys/cam/scsi/scsi_low.h 2012-08-12 22:46:16.000000000 0000 @@ -122,10 +122,10 @@ int si_poll_count; - struct callout_handle engage_ch; - struct callout_handle timeout_ch; + struct callout engage_timer; + struct callout timeout_timer; #ifdef SCSI_LOW_POWFUNC - struct callout_handle recover_ch; + struct callout recover_timer; #endif };