__MOD_DEC_USE_COUNT(sd_template.module);
/* check that we actually have a write back cache to synchronize */
- if(sdkp->WCE)
+ if(sdkp->WCE) {
+ printk(KERN_NOTICE "Synchronizing SCSI cache: ");
sd_synchronize_cache(dsk_nr, 1);
+ printk("\n");
+ }
return 0;
}
static int sd_notifier(struct notifier_block *nbt, unsigned long event, void *buf)
{
int i;
+ char *msg = "Synchronizing SCSI caches: ";
if (!(event == SYS_RESTART || event == SYS_HALT
|| event == SYS_POWER_OFF))
if (!sdkp || !sdkp->device)
continue;
- if (sdkp->WCE)
+ if (sdkp->WCE) {
+ if(msg) {
+ printk(KERN_NOTICE "%s", msg);
+ msg = NULL;
+ }
sd_synchronize_cache(i, 1);
+ }
}
+ if(!msg)
+ printk("\n");
return NOTIFY_OK;
}
sd_dskname(index, buf);
- printk("%s: synchronizing cache...", buf);
+ printk("%s ", buf);
}
SRpnt = scsi_allocate_request(SDpnt);
the_result = SRpnt->sr_result;
scsi_release_request(SRpnt);
if(verbose) {
- if(the_result == 0) {
- printk("OK\n");
- } else {
+ if(the_result != 0) {
printk("FAILED\n status = %x, message = %02x, host = %d, driver = %02x\n ",
status_byte(the_result),
msg_byte(the_result),