/* ibmvscsi_eh_host_reset_handler - Reset the connection to the server @cmd: struct scsi_cmnd having problems  */
static int ibmvscsi_eh_host_reset_handler(struct scsi_cmnd *cmd)
/* ibmvscsi_eh_host_reset_handler - Reset the connection to the server @cmd: struct scsi_cmnd having problems  */
static int ibmvscsi_eh_host_reset_handler(struct scsi_cmnd *cmd)
{
	unsigned long wait_switch = 0;
	struct ibmvscsi_host_data *hostdata = shost_priv(cmd->device->host);
	dev_err(hostdata->dev, "Resetting connection due to error recovery\n");
	ibmvscsi_reset_host(hostdata);
	for (wait_switch = jiffies + (init_timeout * HZ);
	     time_before(jiffies, wait_switch) &&
		     atomic_read(&hostdata->request_limit) < 2;) {
		msleep(10);
	}
	if (atomic_read(&hostdata->request_limit) <= 0)
		return FAILED;
	return SUCCESS;
}