/* Return value: 0 when dev was taken offline by error recovery. 1 OK to proceed.  */
int scsi_block_when_processing_errors(struct scsi_device *sdev)
/* Return value: 0 when dev was taken offline by error recovery. 1 OK to proceed.  */
int scsi_block_when_processing_errors(struct scsi_device *sdev)
{
	int online;
	wait_event(sdev->host->host_wait, !scsi_host_in_recovery(sdev->host));
	online = scsi_device_online(sdev);
	SCSI_LOG_ERROR_RECOVERY(5, printk("%s: rtn: %d\n", __func__,
					  online));
	return online;
}