Per T11/10-019v4 section 1.4.2.1, if we receive a point-to-point
claim notification or beacon, send a probe.

Signed-off-by: Joe Eykholt <[email protected]>
---
 drivers/scsi/fcoe/libfcoe.c |    9 +++++++++
 include/scsi/libfcoe.h      |    2 ++
 2 files changed, 11 insertions(+), 0 deletions(-)


diff --git a/drivers/scsi/fcoe/libfcoe.c b/drivers/scsi/fcoe/libfcoe.c
index f8f7ec3..03682a5 100644
--- a/drivers/scsi/fcoe/libfcoe.c
+++ b/drivers/scsi/fcoe/libfcoe.c
@@ -1870,6 +1870,7 @@ static int fcoe_ctlr_vn_parse(struct fcoe_ctlr *fip,
        memset(vnport, 0, sizeof(*vnport));
 
        fiph = (struct fip_header *)skb->data;
+       vnport->flags = ntohs(fiph->fip_flags);
 
        rlen = ntohs(fiph->fip_dl_len) * 4;
        if (rlen + sizeof(*fiph) > skb->len)
@@ -2089,6 +2090,10 @@ static int fcoe_ctlr_vn_lookup(struct fcoe_ctlr *fip, 
u32 port_id, u8 *mac)
 static void fcoe_ctlr_vn_claim_notify(struct fcoe_ctlr *fip,
                                      struct fcoe_vn_port *vnport)
 {
+       if (vnport->flags & FIP_FL_P2P) {
+               fcoe_ctlr_vn_send(fip, FIP_SC_VN_PROBE_REQ, fcoe_all_vn2vn, 0);
+               return;
+       }
        switch (fip->state) {
        case FIP_ST_VNMP_START:
        case FIP_ST_VNMP_PROBE1:
@@ -2144,6 +2149,10 @@ static void fcoe_ctlr_vn_beacon(struct fcoe_ctlr *fip, 
struct fcoe_vn_port *bp)
        struct fcoe_vn_port *vnport;
        struct fcoe_vn_port *next;
 
+       if (bp->flags & FIP_FL_P2P) {
+               fcoe_ctlr_vn_send(fip, FIP_SC_VN_PROBE_REQ, fcoe_all_vn2vn, 0);
+               return;
+       }
        if (fip->state != FIP_ST_VNMP_UP)
                return;
        list_for_each_entry_safe(vnport, next, &fip->remote_vn_ports, list) {
diff --git a/include/scsi/libfcoe.h b/include/scsi/libfcoe.h
index b19b896..f5ec564 100644
--- a/include/scsi/libfcoe.h
+++ b/include/scsi/libfcoe.h
@@ -195,6 +195,7 @@ struct fcoe_fcf {
  * @node_name: world-wide node name
  * @port_id:   FC_ID self-assigned by node
  * @fcoe_len:  max FCoE frame size, not including VLAN or Ethernet headers
+ * @flags:     flags from probe or claim
  * @login_count: number of unsuccessful rport logins to this port
  * @enode_mac: E_Node control MAC address
  * @vn_mac:    VN_Node assigned MAC address for data
@@ -209,6 +210,7 @@ struct fcoe_vn_port {
        u64 node_name;
        u32 port_id;
        u16 fcoe_len;
+       u16 flags;
        u8 login_count;
        u8 enode_mac[ETH_ALEN];
        u8 vn_mac[ETH_ALEN];


_______________________________________________
devel mailing list
[email protected]
http://www.open-fcoe.org/mailman/listinfo/devel

Reply via email to