/* This routine waits for the command to be returned by the Firmware for some max time.  */
static int qla4xxx_eh_wait_on_command(struct scsi_qla_host *ha, struct scsi_cmnd *cmd)
/* This routine waits for the command to be returned by the Firmware for some max time.  */
static int qla4xxx_eh_wait_on_command(struct scsi_qla_host *ha, struct scsi_cmnd *cmd)
{
	int done = 0;
	struct srb *rp;
	uint32_t max_wait_time = EH_WAIT_CMD_TOV;
	do {
		rp = (struct srb *) cmd->SCp.ptr;
		if (rp == NULL) {
			done++;
			break;
		}
		msleep(2000);
	} while (max_wait_time--);
	return done;
}