diff options
Diffstat (limited to 'drivers/scsi/fcoe/libfcoe.c')
-rw-r--r-- | drivers/scsi/fcoe/libfcoe.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/scsi/fcoe/libfcoe.c b/drivers/scsi/fcoe/libfcoe.c index 2aab97221c6c..2988b71d1e87 100644 --- a/drivers/scsi/fcoe/libfcoe.c +++ b/drivers/scsi/fcoe/libfcoe.c | |||
@@ -1254,10 +1254,9 @@ static void fcoe_ctlr_recv_work(struct work_struct *recv_work) | |||
1254 | } | 1254 | } |
1255 | 1255 | ||
1256 | /** | 1256 | /** |
1257 | * fcoe_ctlr_recv_flogi() - Snoop pre-FIP receipt of FLOGI response or request | 1257 | * fcoe_ctlr_recv_flogi() - Snoop pre-FIP receipt of FLOGI response |
1258 | * @fip: The FCoE controller | 1258 | * @fip: The FCoE controller |
1259 | * @fp: The FC frame to snoop | 1259 | * @fp: The FC frame to snoop |
1260 | * @sa: Ethernet source MAC address from received FCoE frame | ||
1261 | * | 1260 | * |
1262 | * Snoop potential response to FLOGI or even incoming FLOGI. | 1261 | * Snoop potential response to FLOGI or even incoming FLOGI. |
1263 | * | 1262 | * |
@@ -1265,16 +1264,18 @@ static void fcoe_ctlr_recv_work(struct work_struct *recv_work) | |||
1265 | * by fip->flogi_oxid != FC_XID_UNKNOWN. | 1264 | * by fip->flogi_oxid != FC_XID_UNKNOWN. |
1266 | * | 1265 | * |
1267 | * The caller is responsible for freeing the frame. | 1266 | * The caller is responsible for freeing the frame. |
1267 | * Fill in the granted_mac address. | ||
1268 | * | 1268 | * |
1269 | * Return non-zero if the frame should not be delivered to libfc. | 1269 | * Return non-zero if the frame should not be delivered to libfc. |
1270 | */ | 1270 | */ |
1271 | int fcoe_ctlr_recv_flogi(struct fcoe_ctlr *fip, struct fc_lport *lport, | 1271 | int fcoe_ctlr_recv_flogi(struct fcoe_ctlr *fip, struct fc_lport *lport, |
1272 | struct fc_frame *fp, u8 *sa) | 1272 | struct fc_frame *fp) |
1273 | { | 1273 | { |
1274 | struct fc_frame_header *fh; | 1274 | struct fc_frame_header *fh; |
1275 | u8 op; | 1275 | u8 op; |
1276 | u8 mac[ETH_ALEN]; | 1276 | u8 *sa; |
1277 | 1277 | ||
1278 | sa = eth_hdr(&fp->skb)->h_source; | ||
1278 | fh = fc_frame_header_get(fp); | 1279 | fh = fc_frame_header_get(fp); |
1279 | if (fh->fh_type != FC_TYPE_ELS) | 1280 | if (fh->fh_type != FC_TYPE_ELS) |
1280 | return 0; | 1281 | return 0; |
@@ -1305,9 +1306,8 @@ int fcoe_ctlr_recv_flogi(struct fcoe_ctlr *fip, struct fc_lport *lport, | |||
1305 | fip->map_dest = 0; | 1306 | fip->map_dest = 0; |
1306 | } | 1307 | } |
1307 | fip->flogi_oxid = FC_XID_UNKNOWN; | 1308 | fip->flogi_oxid = FC_XID_UNKNOWN; |
1308 | fc_fcoe_set_mac(mac, fh->fh_d_id); | ||
1309 | fip->update_mac(lport, mac); | ||
1310 | spin_unlock_bh(&fip->lock); | 1309 | spin_unlock_bh(&fip->lock); |
1310 | fc_fcoe_set_mac(fr_cb(fp)->granted_mac, fh->fh_d_id); | ||
1311 | } else if (op == ELS_FLOGI && fh->fh_r_ctl == FC_RCTL_ELS_REQ && sa) { | 1311 | } else if (op == ELS_FLOGI && fh->fh_r_ctl == FC_RCTL_ELS_REQ && sa) { |
1312 | /* | 1312 | /* |
1313 | * Save source MAC for point-to-point responses. | 1313 | * Save source MAC for point-to-point responses. |