Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 173657
b: refs/heads/master
c: dc8596d
h: refs/heads/master
i:
  173655: bcdf402
v: v3
  • Loading branch information
Chris Leech authored and James Bottomley committed Dec 4, 2009
1 parent 7b326ac commit fed5d6b
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c914f7d16df6420cfd4c09399957425ba9c21f47
refs/heads/master: dc8596d303bb306da9ab5326fa6209710de86b8b
33 changes: 33 additions & 0 deletions trunk/drivers/scsi/fcoe/fcoe.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ static struct scsi_transport_template *fcoe_vport_transport_template;
static int fcoe_vport_destroy(struct fc_vport *vport);
static int fcoe_vport_create(struct fc_vport *vport, bool disabled);
static int fcoe_vport_disable(struct fc_vport *vport, bool disable);
static void fcoe_set_vport_symbolic_name(struct fc_vport *vport);

struct fc_function_template fcoe_transport_function = {
.show_host_node_name = 1,
Expand Down Expand Up @@ -132,6 +133,7 @@ struct fc_function_template fcoe_transport_function = {
.vport_create = fcoe_vport_create,
.vport_delete = fcoe_vport_destroy,
.vport_disable = fcoe_vport_disable,
.set_vport_symbolic_name = fcoe_set_vport_symbolic_name,
};

struct fc_function_template fcoe_vport_transport_function = {
Expand Down Expand Up @@ -2326,3 +2328,34 @@ static int fcoe_vport_disable(struct fc_vport *vport, bool disable)
return 0;
}

/**
* fcoe_vport_set_symbolic_name() - append vport string to symbolic name
* @vport: fc_vport with a new symbolic name string
*
* After generating a new symbolic name string, a new RSPN_ID request is
* sent to the name server. There is no response handler, so if it fails
* for some reason it will not be retried.
*/
static void fcoe_set_vport_symbolic_name(struct fc_vport *vport)
{
struct fc_lport *lport = vport->dd_data;
struct fc_frame *fp;
size_t len;

snprintf(fc_host_symbolic_name(lport->host), FC_SYMBOLIC_NAME_SIZE,
"%s v%s over %s : %s", FCOE_NAME, FCOE_VERSION,
fcoe_netdev(lport)->name, vport->symbolic_name);

if (lport->state != LPORT_ST_READY)
return;

len = strnlen(fc_host_symbolic_name(lport->host), 255);
fp = fc_frame_alloc(lport,
sizeof(struct fc_ct_hdr) +
sizeof(struct fc_ns_rspn) + len);
if (!fp)
return;
lport->tt.elsct_send(lport, FC_FID_DIR_SERV, fp, FC_NS_RSPN_ID,
NULL, NULL, lport->e_d_tov);
}

1 change: 1 addition & 0 deletions trunk/drivers/scsi/libfc/fc_frame.c
Original file line number Diff line number Diff line change
Expand Up @@ -86,3 +86,4 @@ struct fc_frame *fc_frame_alloc_fill(struct fc_lport *lp, size_t payload_len)
}
return fp;
}
EXPORT_SYMBOL(fc_frame_alloc_fill);

0 comments on commit fed5d6b

Please sign in to comment.