diff options
author | Chad Dupuis <chad.dupuis@cavium.com> | 2018-05-22 00:28:44 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-05-22 23:29:54 -0400 |
commit | 8673daf4f55bf3b918dec78aee2132d191225106 (patch) | |
tree | b30e093f6f56ba07321c91e892fcc073013296d8 | |
parent | 642a0b37e669465765cad9b64b9798be65df0f09 (diff) |
qedf: Add get_generic_tlv_data handler.
Signed-off-by: Chad Dupuis <chad.dupuis@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/scsi/qedf/qedf.h | 1 | ||||
-rw-r--r-- | drivers/scsi/qedf/qedf_main.c | 17 |
2 files changed, 18 insertions, 0 deletions
diff --git a/drivers/scsi/qedf/qedf.h b/drivers/scsi/qedf/qedf.h index 0cb0490bac01..cabb6af60fb8 100644 --- a/drivers/scsi/qedf/qedf.h +++ b/drivers/scsi/qedf/qedf.h @@ -503,6 +503,7 @@ extern void qedf_process_seq_cleanup_compl(struct qedf_ctx *qedf, extern int qedf_send_flogi(struct qedf_ctx *qedf); extern void qedf_get_protocol_tlv_data(void *dev, void *data); extern void qedf_fp_io_handler(struct work_struct *work); +extern void qedf_get_generic_tlv_data(void *dev, struct qed_generic_tlvs *data); #define FCOE_WORD_TO_BYTE 4 #define QEDF_MAX_TASK_NUM 0xFFFF diff --git a/drivers/scsi/qedf/qedf_main.c b/drivers/scsi/qedf/qedf_main.c index 730e480df256..d3f73d8d7738 100644 --- a/drivers/scsi/qedf/qedf_main.c +++ b/drivers/scsi/qedf/qedf_main.c @@ -566,6 +566,7 @@ static struct qed_fcoe_cb_ops qedf_cb_ops = { { .link_update = qedf_link_update, .dcbx_aen = qedf_dcbx_handler, + .get_generic_tlv_data = qedf_get_generic_tlv_data, .get_protocol_tlv_data = qedf_get_protocol_tlv_data, } }; @@ -3479,6 +3480,22 @@ void qedf_get_protocol_tlv_data(void *dev, void *data) fcoe->scsi_tsk_full = qedf->task_set_fulls; } +/* Generic TLV data callback */ +void qedf_get_generic_tlv_data(void *dev, struct qed_generic_tlvs *data) +{ + struct qedf_ctx *qedf; + + if (!dev) { + QEDF_INFO(NULL, QEDF_LOG_EVT, + "dev is NULL so ignoring get_generic_tlv_data request.\n"); + return; + } + qedf = (struct qedf_ctx *)dev; + + memset(data, 0, sizeof(struct qed_generic_tlvs)); + ether_addr_copy(data->mac[0], qedf->mac); +} + /* * Module Init/Remove */ |