In cases that it is not ready to unjam host, the operation could be deferred by yielding cpu since busy testing earns little help. Signed-off-by: Hillf Danton <dhillf@xxxxxxxxx> --- --- a/drivers/scsi/scsi_error.c 2010-09-13 07:07:38.000000000 +0800 +++ b/drivers/scsi/scsi_error.c 2010-11-01 20:56:36.000000000 +0800 @@ -1765,6 +1765,7 @@ int scsi_error_handler(void *data) SCSI_LOG_ERROR_RECOVERY(1, printk("Error handler scsi_eh_%d sleeping\n", shost->host_no)); + yield: schedule(); set_current_state(TASK_INTERRUPTIBLE); continue; @@ -1785,7 +1786,8 @@ int scsi_error_handler(void *data) printk(KERN_ERR "Error handler scsi_eh_%d " "unable to autoresume\n", shost->host_no)); - continue; + set_current_state(TASK_INTERRUPTIBLE); + goto yield; } if (shost->transportt->eh_strategy_handler) -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html