summaryrefslogtreecommitdiff
path: root/drivers/scsi/qedi
diff options
context:
space:
mode:
authorManish Rangankar <manish.rangankar@cavium.com>2018-05-22 10:28:46 +0300
committerDavid S. Miller <davem@davemloft.net>2018-05-23 06:29:54 +0300
commit269afb36030b04f7d8b3a0e9e4141112f86e08fc (patch)
tree2183f24ca57b444511f8971f06e6c5d15cdc393d /drivers/scsi/qedi
parent534bbdf8832ae48491cb8cfa42eaba0c21421ea9 (diff)
downloadlinux-269afb36030b04f7d8b3a0e9e4141112f86e08fc.tar.xz
qedi: Add get_generic_tlv_data handler.
Signed-off-by: Manish Rangankar <manish.rangankar@cavium.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/scsi/qedi')
-rw-r--r--drivers/scsi/qedi/qedi_main.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/scsi/qedi/qedi_main.c b/drivers/scsi/qedi/qedi_main.c
index d2045a5e39b8..32ee7f62fef9 100644
--- a/drivers/scsi/qedi/qedi_main.c
+++ b/drivers/scsi/qedi/qedi_main.c
@@ -995,6 +995,21 @@ free_tgt:
return ret;
}
+static void qedi_get_generic_tlv_data(void *dev, struct qed_generic_tlvs *data)
+{
+ struct qedi_ctx *qedi;
+
+ if (!dev) {
+ QEDI_INFO(NULL, QEDI_LOG_EVT,
+ "dev is NULL so ignoring get_generic_tlv_data request.\n");
+ return;
+ }
+ qedi = (struct qedi_ctx *)dev;
+
+ memset(data, 0, sizeof(struct qed_generic_tlvs));
+ ether_addr_copy(data->mac[0], qedi->mac);
+}
+
/*
* Protocol TLV handler
*/
@@ -1078,6 +1093,7 @@ static struct qed_iscsi_cb_ops qedi_cb_ops = {
{
.link_update = qedi_link_update,
.get_protocol_tlv_data = qedi_get_protocol_tlv_data,
+ .get_generic_tlv_data = qedi_get_generic_tlv_data,
}
};