svn commit: r348387 - head/sys/dev/ena

Marcin Wojtas mw at FreeBSD.org
Thu May 30 13:08:01 UTC 2019


Author: mw
Date: Thu May 30 13:08:00 2019
New Revision: 348387
URL: https://svnweb.freebsd.org/changeset/base/348387

Log:
  Print information when ENA admin error occurs
  
  ENA_ADMIN_FATAL_ERROR and ENA_ADMIN_WARNING aenq groups were indicated
  as supported, so the unimplemented_aenq_handler() will print out error
  message, whenever an error will occur within the ENA admin context.
  
  Submitted by:  Michal Krawczyk <mk at semihalf.com>
  Obtained from: Semihalf
  Sponsored by:  Amazon, Inc.

Modified:
  head/sys/dev/ena/ena.c

Modified: head/sys/dev/ena/ena.c
==============================================================================
--- head/sys/dev/ena/ena.c	Thu May 30 13:06:07 2019	(r348386)
+++ head/sys/dev/ena/ena.c	Thu May 30 13:08:00 2019	(r348387)
@@ -3254,7 +3254,10 @@ ena_device_init(struct ena_adapter *adapter, device_t 
 		goto err_admin_init;
 	}
 
-	aenq_groups = BIT(ENA_ADMIN_LINK_CHANGE) | BIT(ENA_ADMIN_KEEP_ALIVE);
+	aenq_groups = BIT(ENA_ADMIN_LINK_CHANGE) |
+	    BIT(ENA_ADMIN_FATAL_ERROR) |
+	    BIT(ENA_ADMIN_WARNING) |
+	    BIT(ENA_ADMIN_KEEP_ALIVE);
 
 	aenq_groups &= get_feat_ctx->aenq.supported_groups;
 	rc = ena_com_set_aenq_config(ena_dev, aenq_groups);
@@ -3916,10 +3919,13 @@ ena_update_on_link_change(void *adapter_data,
  * This handler will called for unknown event group or unimplemented handlers
  **/
 static void
-unimplemented_aenq_handler(void *data,
+unimplemented_aenq_handler(void *adapter_data,
     struct ena_admin_aenq_entry *aenq_e)
 {
-	return;
+	struct ena_adapter *adapter = (struct ena_adapter *)adapter_data;
+
+	device_printf(adapter->pdev,
+	    "Unknown event was received or event with unimplemented handler\n");
 }
 
 static struct ena_aenq_handlers aenq_handlers = {


More information about the svn-src-head mailing list