/* fc_disc_error() - Handle error on dNS request @disc: The discovery context @fp: The error code encoded as a frame pointer  */
static void fc_disc_error(struct fc_disc *disc, struct fc_frame *fp)
/* fc_disc_error() - Handle error on dNS request @disc: The discovery context @fp: The error code encoded as a frame pointer  */
static void fc_disc_error(struct fc_disc *disc, struct fc_frame *fp)
{
	struct fc_lport *lport = disc->lport;
	unsigned long delay = 0;
	FC_DISC_DBG(disc, "Error %ld, retries %d/%d\n",
		    PTR_ERR(fp), disc->retry_count,
		    FC_DISC_RETRY_LIMIT);
	if (!fp || PTR_ERR(fp) == -FC_EX_TIMEOUT) {
		if (disc->retry_count < FC_DISC_RETRY_LIMIT) {
			if (!fp)
				delay = msecs_to_jiffies(FC_DISC_RETRY_DELAY);
			else {
				delay = msecs_to_jiffies(lport->e_d_tov);
				if (!disc->retry_count)
					delay /= 4;
			}
			disc->retry_count++;
			schedule_delayed_work(&disc->disc_work, delay);
		} else
			fc_disc_done(disc, DISC_EV_FAILED);
	}
}