OSDN Git Service

scsi: bnx2fc: Redo setting source FCoE MAC
authorChad Dupuis <cdupuis@marvell.com>
Mon, 24 Jun 2019 08:29:55 +0000 (01:29 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Thu, 27 Jun 2019 02:42:32 +0000 (22:42 -0400)
commit4adb451c8d1656e28a9ec472ccbdc4463205424a
tree647456a13c7c7c3ea4cf4b78bc9b981bad300032
parent8c09d75276971da6f98871a1bb4a336b96728bba
scsi: bnx2fc: Redo setting source FCoE MAC

For bnx2fc, the source FCoE MAC is stored in the fcoe_port struct in the
data_src_mac field.  Currently this is set in fcoe_ctlr_recv_flogi which
ends up setting it by simply using fc_fcoe_set_mac() which only uses the
default FCF-MAC.  We still want to store the source FCoE MAC in
port->data_src_mac but we want to snoop the FLOGI response payload so as to
set it in the following method:

1. If a granted_mac is found, use that.

2. If not granted_mac is there but there is a FCF-MAP from the FCF then
   create the MAC from the FCF-MAP and the destination ID from the frame.

3. If there is no FCF-MAP the use the spec. default FCF-MAP and the
   destination ID from the frame.

Signed-off-by: Chad Dupuis <cdupuis@marvell.com>
Signed-off-by: Saurav Kashyap <skashyap@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/bnx2fc/bnx2fc_els.c