/* Called from the LLD when the network link is ready.  */
void fcoe_ctlr_link_up(struct fcoe_ctlr *fip)
/* Called from the LLD when the network link is ready.  */
void fcoe_ctlr_link_up(struct fcoe_ctlr *fip)
{
	spin_lock_bh(&fip->lock);
	if (fip->state == FIP_ST_NON_FIP || fip->state == FIP_ST_AUTO) {
		fip->last_link = 1;
		fip->link = 1;
		spin_unlock_bh(&fip->lock);
		fc_linkup(fip->lp);
	} else if (fip->state == FIP_ST_LINK_WAIT) {
		fip->state = fip->mode;
		fip->last_link = 1;
		fip->link = 1;
		spin_unlock_bh(&fip->lock);
		if (fip->state == FIP_ST_AUTO)
			LIBFCOE_FIP_DBG(fip, "%s", "setting AUTO mode.\n");
		fc_linkup(fip->lp);
		fcoe_ctlr_solicit(fip, NULL);
	} else
		spin_unlock_bh(&fip->lock);
}