diff options
author | Robert Love <robert.w.love@intel.com> | 2010-05-07 15:18:41 -0700 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2010-05-16 22:22:34 -0400 |
commit | 7b2787ec15b9d1c2f716da61b0eec21a3f5e6520 (patch) | |
tree | 39b098d4253fa266ea75bf1f7feb75458e78b77d /drivers/scsi/fcoe | |
parent | 5e4f8fe7b58f4da5043b7f219fe9193cddd9262e (diff) | |
download | linux-7b2787ec15b9d1c2f716da61b0eec21a3f5e6520.tar.gz |
[SCSI] libfc: Move the port_id into lport
This patch creates a port_id member in struct fc_lport.
This allows libfc to just deal with fc_lport instances
instead of calling into the fc_host to get the port_id.
This change helps in only using symbols necessary for
operation from the libfc structures. libfc still needs
to change the fc_host_port_id() if the port_id changes
so the presentation layer (scsi_transport_fc) can provide
the user with the correct value, but libfc shouldn't
rely on the presentation layer for operational values.
Signed-off-by: Robert Love <robert.w.love@intel.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/fcoe')
-rw-r--r-- | drivers/scsi/fcoe/libfcoe.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/scsi/fcoe/libfcoe.c b/drivers/scsi/fcoe/libfcoe.c index ec4c88c2d131..948364a3342f 100644 --- a/drivers/scsi/fcoe/libfcoe.c +++ b/drivers/scsi/fcoe/libfcoe.c @@ -343,7 +343,7 @@ static void fcoe_ctlr_send_keep_alive(struct fcoe_ctlr *fip, fcf = fip->sel_fcf; lp = fip->lp; - if (!fcf || !fc_host_port_id(lp->host)) + if (!fcf || !lp->port_id) return; len = sizeof(*kal) + ports * sizeof(*vn); @@ -374,7 +374,7 @@ static void fcoe_ctlr_send_keep_alive(struct fcoe_ctlr *fip, vn->fd_desc.fip_dtype = FIP_DT_VN_ID; vn->fd_desc.fip_dlen = sizeof(*vn) / FIP_BPW; memcpy(vn->fd_mac, fip->get_src_addr(lport), ETH_ALEN); - hton24(vn->fd_fc_id, fc_host_port_id(lp->host)); + hton24(vn->fd_fc_id, lp->port_id); put_unaligned_be64(lp->wwpn, &vn->fd_wwpn); } skb_put(skb, len); @@ -949,7 +949,7 @@ static void fcoe_ctlr_recv_clr_vlink(struct fcoe_ctlr *fip, LIBFCOE_FIP_DBG(fip, "Clear Virtual Link received\n"); - if (!fcf || !fc_host_port_id(lport->host)) + if (!fcf || !lport->port_id) return; /* @@ -987,8 +987,7 @@ static void fcoe_ctlr_recv_clr_vlink(struct fcoe_ctlr *fip, if (compare_ether_addr(vp->fd_mac, fip->get_src_addr(lport)) == 0 && get_unaligned_be64(&vp->fd_wwpn) == lport->wwpn && - ntoh24(vp->fd_fc_id) == - fc_host_port_id(lport->host)) + ntoh24(vp->fd_fc_id) == lport->port_id) desc_mask &= ~BIT(FIP_DT_VN_ID); break; default: |