Module Name:    src
Committed By:   msaitoh
Date:           Mon Sep 11 10:11:05 UTC 2017

Modified Files:
        src/sys/dev/pci/ixgbe: ixv.c

Log Message:
 Print Mailbox API version.


To generate a diff of this commit:
cvs rdiff -u -r1.59 -r1.60 src/sys/dev/pci/ixgbe/ixv.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/pci/ixgbe/ixv.c
diff -u src/sys/dev/pci/ixgbe/ixv.c:1.59 src/sys/dev/pci/ixgbe/ixv.c:1.60
--- src/sys/dev/pci/ixgbe/ixv.c:1.59	Mon Sep 11 09:52:13 2017
+++ src/sys/dev/pci/ixgbe/ixv.c	Mon Sep 11 10:11:05 2017
@@ -1,4 +1,4 @@
-/*$NetBSD: ixv.c,v 1.59 2017/09/11 09:52:13 msaitoh Exp $*/
+/*$NetBSD: ixv.c,v 1.60 2017/09/11 10:11:05 msaitoh Exp $*/
 
 /******************************************************************************
 
@@ -290,7 +290,7 @@ ixv_attach(device_t parent, device_t dev
 	pcireg_t	id, subid;
 	ixgbe_vendor_info_t *ent;
 	const struct pci_attach_args *pa = aux;
-
+	const char *apivstr;
 	INIT_DEBUGOUT("ixv_attach: begin");
 
 	/*
@@ -414,6 +414,27 @@ ixv_attach(device_t parent, device_t dev
 	if (error)
 		aprint_normal_dev(dev,
 		    "MBX API negotiation failed during attach!\n");
+	switch (hw->api_version) {
+	case ixgbe_mbox_api_10:
+		apivstr = "1.0";
+		break;
+	case ixgbe_mbox_api_20:
+		apivstr = "2.0";
+		break;
+	case ixgbe_mbox_api_11:
+		apivstr = "1.1";
+		break;
+	case ixgbe_mbox_api_12:
+		apivstr = "1.2";
+		break;
+	case ixgbe_mbox_api_13:
+		apivstr = "1.3";
+		break;
+	default:
+		apivstr = "unknown";
+		break;
+	}
+	aprint_normal_dev(dev, "Mailbox API %s\n", apivstr);
 
 	/* If no mac address was assigned, make a random one */
 	if (!ixv_check_ether_addr(hw->mac.addr)) {

Reply via email to