--- sys/kern/kern_shutdown.c.old Mon Apr 5 22:03:35 2004 +++ sys/kern/kern_shutdown.c Thu Apr 8 18:31:25 2004 @@ -187,7 +187,7 @@ { shutdown_howto = howto; - + printf("shutdown_nice called\n"); /* Send a signal to init(8) and have it shutdown the world */ if (initproc != NULL) { PROC_LOCK(initproc); @@ -363,14 +363,19 @@ * Ok, now do things that assume all filesystem activity has * been completed. */ + printf("About to shutdown_post_sync\n"); EVENTHANDLER_INVOKE(shutdown_post_sync, howto); + printf("shutdown_post_sync returned\n"); + DELAY(1000000); /* wait 1 sec for printf's to complete and be read */ splhigh(); if ((howto & (RB_HALT|RB_DUMP)) == RB_DUMP && !cold && dumper.dumper != NULL && !dumping) doadump(); /* Now that we're going to really halt the system... */ + printf("About to shutdown_final\n"); EVENTHANDLER_INVOKE(shutdown_final, howto); + printf("shutdown_final returned\n"); for(;;) ; /* safety against shutdown_reset not working */ /* NOTREACHED */ --- sys/cam/scsi/scsi_da.c.old Mon Apr 19 14:38:10 2004 +++ sys/cam/scsi/scsi_da.c Wed Apr 21 10:37:11 2004 @@ -1747,10 +1747,12 @@ struct cam_periph *periph; struct da_softc *softc; + printf(" - dashutdown started... "); TAILQ_FOREACH(periph, &dadriver.units, unit_links) { union ccb ccb; softc = (struct da_softc *)periph->softc; + printf("\n - - pass 1 "); /* * We only sync the cache if the drive is still open, and * if the drive is capable of it.. @@ -1758,10 +1760,11 @@ if (((softc->flags & DA_FLAG_OPEN) == 0) || (softc->quirks & DA_Q_NO_SYNC_CACHE)) continue; - + printf("setup..."); xpt_setup_ccb(&ccb.ccb_h, periph->path, /*priority*/1); ccb.ccb_h.ccb_state = DA_CCB_DUMP; + printf("sync_cache..."); scsi_synchronize_cache(&ccb.csio, /*retries*/1, /*cbfcnp*/dadone, @@ -1769,15 +1772,18 @@ /*begin_lba*/0, /* whole disk */ /*lb_count*/0, SSD_FULL_SIZE, - 60 * 60 * 1000); + 5 * 60 * 1000); + printf("polled_action..."); xpt_polled_action(&ccb); + printf("returned. "); if ((ccb.ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) { if (((ccb.ccb_h.status & CAM_STATUS_MASK) == CAM_SCSI_STATUS_ERROR) && (ccb.csio.scsi_status == SCSI_STATUS_CHECK_COND)){ int error_code, sense_key, asc, ascq; + printf("error extract..."); scsi_extract_sense(&ccb.csio.sense_data, &error_code, &sense_key, @@ -1793,14 +1799,20 @@ } } - if ((ccb.ccb_h.status & CAM_DEV_QFRZN) != 0) + if ((ccb.ccb_h.status & CAM_DEV_QFRZN) != 0) { + printf("release_devq..."); cam_release_devq(ccb.ccb_h.path, /*relsim_flags*/0, /*reduction*/0, - /*timeout*/0, + /*timeout*/120 * 1000, /*getcount_only*/0); + printf("returned."); + } else { + printf("no release_devq..."); + } } + printf("\n - dashutdown finished\n"); } #else /* !_KERNEL */ --- sys/dev/ata/ata-all.c.old Tue Apr 13 10:44:20 2004 +++ sys/dev/ata/ata-all.c Wed Apr 21 10:59:34 2004 @@ -343,6 +343,7 @@ struct ata_channel *ch; int ctlr; + printf(" - ata_shutdown started... "); /* flush cache on all devices */ for (ctlr = 0; ctlr < devclass_get_maxunit(ata_devclass); ctlr++) { if (!(ch = devclass_get_softc(ata_devclass, ctlr))) @@ -354,6 +355,7 @@ ch->device[SLAVE].param->support.command2 & ATA_SUPPORT_FLUSHCACHE) ata_controlcmd(&ch->device[SLAVE], ATA_FLUSHCACHE, 0, 0, 0); } + printf("finished.\n"); } /*