aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/fcoe/libfcoe.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/fcoe/libfcoe.c')
-rw-r--r--drivers/scsi/fcoe/libfcoe.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/scsi/fcoe/libfcoe.c b/drivers/scsi/fcoe/libfcoe.c
index f410f4abb548..444a06bdb70b 100644
--- a/drivers/scsi/fcoe/libfcoe.c
+++ b/drivers/scsi/fcoe/libfcoe.c
@@ -198,6 +198,8 @@ static void fcoe_ctlr_solicit(struct fcoe_ctlr *fip, struct fcoe_fcf *fcf)
198 sol->fip.fip_subcode = FIP_SC_SOL; 198 sol->fip.fip_subcode = FIP_SC_SOL;
199 sol->fip.fip_dl_len = htons(sizeof(sol->desc) / FIP_BPW); 199 sol->fip.fip_dl_len = htons(sizeof(sol->desc) / FIP_BPW);
200 sol->fip.fip_flags = htons(FIP_FL_FPMA); 200 sol->fip.fip_flags = htons(FIP_FL_FPMA);
201 if (fip->spma)
202 sol->fip.fip_flags |= htons(FIP_FL_SPMA);
201 203
202 sol->desc.mac.fd_desc.fip_dtype = FIP_DT_MAC; 204 sol->desc.mac.fd_desc.fip_dtype = FIP_DT_MAC;
203 sol->desc.mac.fd_desc.fip_dlen = sizeof(sol->desc.mac) / FIP_BPW; 205 sol->desc.mac.fd_desc.fip_dlen = sizeof(sol->desc.mac) / FIP_BPW;
@@ -350,6 +352,8 @@ static void fcoe_ctlr_send_keep_alive(struct fcoe_ctlr *fip, int ports, u8 *sa)
350 kal->fip.fip_dl_len = htons((sizeof(kal->mac) + 352 kal->fip.fip_dl_len = htons((sizeof(kal->mac) +
351 ports * sizeof(*vn)) / FIP_BPW); 353 ports * sizeof(*vn)) / FIP_BPW);
352 kal->fip.fip_flags = htons(FIP_FL_FPMA); 354 kal->fip.fip_flags = htons(FIP_FL_FPMA);
355 if (fip->spma)
356 kal->fip.fip_flags |= htons(FIP_FL_SPMA);
353 357
354 kal->mac.fd_desc.fip_dtype = FIP_DT_MAC; 358 kal->mac.fd_desc.fip_dtype = FIP_DT_MAC;
355 kal->mac.fd_desc.fip_dlen = sizeof(kal->mac) / FIP_BPW; 359 kal->mac.fd_desc.fip_dlen = sizeof(kal->mac) / FIP_BPW;
@@ -413,6 +417,8 @@ static int fcoe_ctlr_encaps(struct fcoe_ctlr *fip,
413 cap->fip.fip_subcode = FIP_SC_REQ; 417 cap->fip.fip_subcode = FIP_SC_REQ;
414 cap->fip.fip_dl_len = htons((dlen + sizeof(*mac)) / FIP_BPW); 418 cap->fip.fip_dl_len = htons((dlen + sizeof(*mac)) / FIP_BPW);
415 cap->fip.fip_flags = htons(FIP_FL_FPMA); 419 cap->fip.fip_flags = htons(FIP_FL_FPMA);
420 if (fip->spma)
421 cap->fip.fip_flags |= htons(FIP_FL_SPMA);
416 422
417 cap->encaps.fd_desc.fip_dtype = dtype; 423 cap->encaps.fd_desc.fip_dtype = dtype;
418 cap->encaps.fd_desc.fip_dlen = dlen / FIP_BPW; 424 cap->encaps.fd_desc.fip_dlen = dlen / FIP_BPW;
@@ -421,8 +427,10 @@ static int fcoe_ctlr_encaps(struct fcoe_ctlr *fip,
421 memset(mac, 0, sizeof(mac)); 427 memset(mac, 0, sizeof(mac));
422 mac->fd_desc.fip_dtype = FIP_DT_MAC; 428 mac->fd_desc.fip_dtype = FIP_DT_MAC;
423 mac->fd_desc.fip_dlen = sizeof(*mac) / FIP_BPW; 429 mac->fd_desc.fip_dlen = sizeof(*mac) / FIP_BPW;
424 if (dtype != ELS_FLOGI) 430 if (dtype != FIP_DT_FLOGI)
425 memcpy(mac->fd_mac, fip->data_src_addr, ETH_ALEN); 431 memcpy(mac->fd_mac, fip->data_src_addr, ETH_ALEN);
432 else if (fip->spma)
433 memcpy(mac->fd_mac, fip->ctl_src_addr, ETH_ALEN);
426 434
427 skb->protocol = htons(ETH_P_802_3); 435 skb->protocol = htons(ETH_P_802_3);
428 skb_reset_mac_header(skb); 436 skb_reset_mac_header(skb);