Commit 4c0f62b5 authored by Joe Eykholt's avatar Joe Eykholt Committed by James Bottomley

[SCSI] libfc: rename rport event CREATED to READY

Remote ports will become READY more than once after
ADISC is implemented in a later patch.

The event callback that has been called "CREATED" will mean "READY".
Rename it now in preparation for those changes.
Signed-off-by: default avatarJoe Eykholt <jeykholt@cisco.com>
Signed-off-by: default avatarRobert Love <robert.w.love@intel.com>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@suse.de>
parent 629f4427
...@@ -118,7 +118,7 @@ static void fc_disc_rport_callback(struct fc_lport *lport, ...@@ -118,7 +118,7 @@ static void fc_disc_rport_callback(struct fc_lport *lport,
rdata->ids.port_id); rdata->ids.port_id);
switch (event) { switch (event) {
case RPORT_EV_CREATED: case RPORT_EV_READY:
if (disc) { if (disc) {
mutex_lock(&disc->disc_mutex); mutex_lock(&disc->disc_mutex);
list_add_tail(&rdata->peers, &disc->rports); list_add_tail(&rdata->peers, &disc->rports);
......
...@@ -147,14 +147,14 @@ static void fc_lport_rport_callback(struct fc_lport *lport, ...@@ -147,14 +147,14 @@ static void fc_lport_rport_callback(struct fc_lport *lport,
rdata->ids.port_id); rdata->ids.port_id);
switch (event) { switch (event) {
case RPORT_EV_CREATED: case RPORT_EV_READY:
if (rdata->ids.port_id == FC_FID_DIR_SERV) { if (rdata->ids.port_id == FC_FID_DIR_SERV) {
mutex_lock(&lport->lp_mutex); mutex_lock(&lport->lp_mutex);
if (lport->state == LPORT_ST_DNS) { if (lport->state == LPORT_ST_DNS) {
lport->dns_rp = rdata; lport->dns_rp = rdata;
fc_lport_enter_rpn_id(lport); fc_lport_enter_rpn_id(lport);
} else { } else {
FC_LPORT_DBG(lport, "Received an CREATED event " FC_LPORT_DBG(lport, "Received an READY event "
"on port (%6x) for the directory " "on port (%6x) for the directory "
"server, but the lport is not " "server, but the lport is not "
"in the DNS state, it's in the " "in the DNS state, it's in the "
......
...@@ -244,7 +244,7 @@ static void fc_rport_work(struct work_struct *work) ...@@ -244,7 +244,7 @@ static void fc_rport_work(struct work_struct *work)
rport = rdata->rport; rport = rdata->rport;
switch (event) { switch (event) {
case RPORT_EV_CREATED: case RPORT_EV_READY:
ids = rdata->ids; ids = rdata->ids;
rdata->event = RPORT_EV_NONE; rdata->event = RPORT_EV_NONE;
mutex_unlock(&rdata->rp_mutex); mutex_unlock(&rdata->rp_mutex);
...@@ -413,7 +413,7 @@ static void fc_rport_enter_ready(struct fc_rport_priv *rdata) ...@@ -413,7 +413,7 @@ static void fc_rport_enter_ready(struct fc_rport_priv *rdata)
if (rdata->event == RPORT_EV_NONE) if (rdata->event == RPORT_EV_NONE)
queue_work(rport_event_queue, &rdata->event_work); queue_work(rport_event_queue, &rdata->event_work);
rdata->event = RPORT_EV_CREATED; rdata->event = RPORT_EV_READY;
} }
/** /**
......
...@@ -167,7 +167,7 @@ struct fc_disc_port { ...@@ -167,7 +167,7 @@ struct fc_disc_port {
enum fc_rport_event { enum fc_rport_event {
RPORT_EV_NONE = 0, RPORT_EV_NONE = 0,
RPORT_EV_CREATED, RPORT_EV_READY,
RPORT_EV_FAILED, RPORT_EV_FAILED,
RPORT_EV_STOP, RPORT_EV_STOP,
RPORT_EV_LOGO RPORT_EV_LOGO
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment