Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 362080
b: refs/heads/master
c: 0807619
h: refs/heads/master
v: v3
  • Loading branch information
Robert Love committed Mar 25, 2013
1 parent d94c42d commit 05dbeb0
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 12 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8a9a71381208b2364a2d12b0d257ae333917a1bc
refs/heads/master: 0807619d3c64d935c257a377ac86982c777f969c
3 changes: 2 additions & 1 deletion trunk/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
Original file line number Diff line number Diff line change
Expand Up @@ -939,7 +939,8 @@ static int bnx2fc_libfc_config(struct fc_lport *lport)
fc_elsct_init(lport);
fc_exch_init(lport);
fc_rport_init(lport);
fc_disc_init(lport, lport);
fc_disc_init(lport);
fc_disc_config(lport, lport);
return 0;
}

Expand Down
3 changes: 2 additions & 1 deletion trunk/drivers/scsi/fcoe/fcoe_ctlr.c
Original file line number Diff line number Diff line change
Expand Up @@ -2847,7 +2847,8 @@ int fcoe_libfc_config(struct fc_lport *lport, struct fcoe_ctlr *fip,
priv = fip;
}

fc_disc_init(lport, priv);
fc_disc_init(lport);
fc_disc_config(lport, priv);

return 0;
}
Expand Down
25 changes: 17 additions & 8 deletions trunk/drivers/scsi/libfc/fc_disc.c
Original file line number Diff line number Diff line change
Expand Up @@ -712,13 +712,13 @@ static void fc_disc_stop_final(struct fc_lport *lport)
}

/**
* fc_disc_init() - Initialize the discovery layer for a local port
* @lport: The local port that needs the discovery layer to be initialized
* fc_disc_config() - Configure the discovery layer for a local port
* @lport: The local port that needs the discovery layer to be configured
* @priv: Private data structre for users of the discovery layer
*/
int fc_disc_init(struct fc_lport *lport, void *priv)
void fc_disc_config(struct fc_lport *lport, void *priv)
{
struct fc_disc *disc;
struct fc_disc *disc = &lport->disc;

if (!lport->tt.disc_start)
lport->tt.disc_start = fc_disc_start;
Expand All @@ -733,12 +733,21 @@ int fc_disc_init(struct fc_lport *lport, void *priv)
lport->tt.disc_recv_req = fc_disc_recv_req;

disc = &lport->disc;
INIT_DELAYED_WORK(&disc->disc_work, fc_disc_timeout);
mutex_init(&disc->disc_mutex);
INIT_LIST_HEAD(&disc->rports);

disc->priv = priv;
}
EXPORT_SYMBOL(fc_disc_config);

return 0;
/**
* fc_disc_init() - Initialize the discovery layer for a local port
* @lport: The local port that needs the discovery layer to be initialized
*/
void fc_disc_init(struct fc_lport *lport)
{
struct fc_disc *disc = &lport->disc;

INIT_DELAYED_WORK(&disc->disc_work, fc_disc_timeout);
mutex_init(&disc->disc_mutex);
INIT_LIST_HEAD(&disc->rports);
}
EXPORT_SYMBOL(fc_disc_init);
3 changes: 2 additions & 1 deletion trunk/include/scsi/libfc.h
Original file line number Diff line number Diff line change
Expand Up @@ -1074,7 +1074,8 @@ void fc_rport_terminate_io(struct fc_rport *);
/*
* DISCOVERY LAYER
*****************************/
int fc_disc_init(struct fc_lport *, void *);
void fc_disc_init(struct fc_lport *);
void fc_disc_config(struct fc_lport *, void *);

static inline struct fc_lport *fc_disc_lport(struct fc_disc *disc)
{
Expand Down

0 comments on commit 05dbeb0

Please sign in to comment.