/* Call queue_work only if there's no event already pending. Set the new event so that the old pending event will not occur. Since we have the mutex, even if fc_rport_work() is already started, it'll see the new event.  */
static void fc_rport_enter_delete(struct fc_rport_priv *rdata, enum fc_rport_event event)
/* Call queue_work only if there's no event already pending. Set the new event so that the old pending event will not occur. Since we have the mutex, even if fc_rport_work() is already started, it'll see the new event.  */
static void fc_rport_enter_delete(struct fc_rport_priv *rdata, enum fc_rport_event event)
{
	if (rdata->rp_state == RPORT_ST_DELETE)
		return;
	FC_RPORT_DBG(rdata, "Delete port\n");
	fc_rport_state_enter(rdata, RPORT_ST_DELETE);
	if (rdata->event == RPORT_EV_NONE)
		queue_work(rport_event_queue, &rdata->event_work);
	rdata->event = event;
}