qedi: Add get_generic_tlv_data handler.
authorManish Rangankar <manish.rangankar@cavium.com>
Tue, 22 May 2018 07:28:46 +0000 (00:28 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 23 May 2018 03:29:54 +0000 (23:29 -0400)
Signed-off-by: Manish Rangankar <manish.rangankar@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/scsi/qedi/qedi_main.c

index d2045a5e39b84fa23d8fb2e44d58727c50c8221b..32ee7f62fef973abdbee2341b170d0c2c65282aa 100644 (file)
@@ -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,
        }
 };