Skip to content

Commit

Permalink
[SCSI] libfc: rename rport event CREATED to READY
Browse files Browse the repository at this point in the history
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: Joe Eykholt <jeykholt@cisco.com>
Signed-off-by: Robert Love <robert.w.love@intel.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
  • Loading branch information
Joe Eykholt authored and James Bottomley committed Sep 10, 2009
1 parent 629f442 commit 4c0f62b
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion drivers/scsi/libfc/fc_disc.c
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ static void fc_disc_rport_callback(struct fc_lport *lport,
rdata->ids.port_id);

switch (event) {
case RPORT_EV_CREATED:
case RPORT_EV_READY:
if (disc) {
mutex_lock(&disc->disc_mutex);
list_add_tail(&rdata->peers, &disc->rports);
Expand Down
4 changes: 2 additions & 2 deletions drivers/scsi/libfc/fc_lport.c
Original file line number Diff line number Diff line change
Expand Up @@ -147,14 +147,14 @@ static void fc_lport_rport_callback(struct fc_lport *lport,
rdata->ids.port_id);

switch (event) {
case RPORT_EV_CREATED:
case RPORT_EV_READY:
if (rdata->ids.port_id == FC_FID_DIR_SERV) {
mutex_lock(&lport->lp_mutex);
if (lport->state == LPORT_ST_DNS) {
lport->dns_rp = rdata;
fc_lport_enter_rpn_id(lport);
} else {
FC_LPORT_DBG(lport, "Received an CREATED event "
FC_LPORT_DBG(lport, "Received an READY event "
"on port (%6x) for the directory "
"server, but the lport is not "
"in the DNS state, it's in the "
Expand Down
4 changes: 2 additions & 2 deletions drivers/scsi/libfc/fc_rport.c
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ static void fc_rport_work(struct work_struct *work)
rport = rdata->rport;

switch (event) {
case RPORT_EV_CREATED:
case RPORT_EV_READY:
ids = rdata->ids;
rdata->event = RPORT_EV_NONE;
mutex_unlock(&rdata->rp_mutex);
Expand Down Expand Up @@ -413,7 +413,7 @@ static void fc_rport_enter_ready(struct fc_rport_priv *rdata)

if (rdata->event == RPORT_EV_NONE)
queue_work(rport_event_queue, &rdata->event_work);
rdata->event = RPORT_EV_CREATED;
rdata->event = RPORT_EV_READY;
}

/**
Expand Down
2 changes: 1 addition & 1 deletion include/scsi/libfc.h
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ struct fc_disc_port {

enum fc_rport_event {
RPORT_EV_NONE = 0,
RPORT_EV_CREATED,
RPORT_EV_READY,
RPORT_EV_FAILED,
RPORT_EV_STOP,
RPORT_EV_LOGO
Expand Down

0 comments on commit 4c0f62b

Please sign in to comment.