diff options
-rw-r--r-- | drivers/scsi/fcoe/libfcoe.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/scsi/fcoe/libfcoe.c b/drivers/scsi/fcoe/libfcoe.c index ff5ccba3d741..de5c329cb3b4 100644 --- a/drivers/scsi/fcoe/libfcoe.c +++ b/drivers/scsi/fcoe/libfcoe.c | |||
@@ -442,10 +442,15 @@ static int fcoe_ctlr_encaps(struct fcoe_ctlr *fip, struct fc_lport *lport, | |||
442 | memset(mac, 0, sizeof(mac)); | 442 | memset(mac, 0, sizeof(mac)); |
443 | mac->fd_desc.fip_dtype = FIP_DT_MAC; | 443 | mac->fd_desc.fip_dtype = FIP_DT_MAC; |
444 | mac->fd_desc.fip_dlen = sizeof(*mac) / FIP_BPW; | 444 | mac->fd_desc.fip_dlen = sizeof(*mac) / FIP_BPW; |
445 | if (dtype != FIP_DT_FLOGI && dtype != FIP_DT_FDISC) | 445 | if (dtype != FIP_DT_FLOGI && dtype != FIP_DT_FDISC) { |
446 | memcpy(mac->fd_mac, fip->get_src_addr(lport), ETH_ALEN); | 446 | memcpy(mac->fd_mac, fip->get_src_addr(lport), ETH_ALEN); |
447 | else if (fip->spma) | 447 | } else if (fip_flags & FIP_FL_SPMA) { |
448 | LIBFCOE_FIP_DBG(fip, "FLOGI/FDISC sent with SPMA\n"); | ||
448 | memcpy(mac->fd_mac, fip->ctl_src_addr, ETH_ALEN); | 449 | memcpy(mac->fd_mac, fip->ctl_src_addr, ETH_ALEN); |
450 | } else { | ||
451 | LIBFCOE_FIP_DBG(fip, "FLOGI/FDISC sent with FPMA\n"); | ||
452 | /* FPMA only FLOGI must leave the MAC desc set to all 0s */ | ||
453 | } | ||
449 | 454 | ||
450 | skb->protocol = htons(ETH_P_FIP); | 455 | skb->protocol = htons(ETH_P_FIP); |
451 | skb_reset_mac_header(skb); | 456 | skb_reset_mac_header(skb); |