Module Name: src
Committed By: msaitoh
Date: Wed Feb 21 12:34:06 UTC 2024
Modified Files:
src/sys/dev/pci/igc: if_igc.c
Log Message:
igc(4): Modify dmesg output of PHY and NVM info.
- Print PHY info first and then print NVM info.
- Remove debug output.
To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/sys/dev/pci/igc/if_igc.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/igc/if_igc.c
diff -u src/sys/dev/pci/igc/if_igc.c:1.11 src/sys/dev/pci/igc/if_igc.c:1.12
--- src/sys/dev/pci/igc/if_igc.c:1.11 Thu Feb 8 09:59:35 2024
+++ src/sys/dev/pci/igc/if_igc.c Wed Feb 21 12:34:06 2024
@@ -1,4 +1,4 @@
-/* $NetBSD: if_igc.c,v 1.11 2024/02/08 09:59:35 msaitoh Exp $ */
+/* $NetBSD: if_igc.c,v 1.12 2024/02/21 12:34:06 msaitoh Exp $ */
/* $OpenBSD: if_igc.c,v 1.13 2023/04/28 10:18:57 bluhm Exp $ */
/*-
* SPDX-License-Identifier: BSD-2-Clause
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_igc.c,v 1.11 2024/02/08 09:59:35 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_igc.c,v 1.12 2024/02/21 12:34:06 msaitoh Exp $");
#ifdef _KERNEL_OPT
#include "opt_if_igc.h"
@@ -3862,23 +3862,21 @@ igc_print_devinfo(struct igc_softc *sc)
rev = MII_REV(id2);
mii_get_descr(descr, sizeof(descr), oui, model);
if (descr[0])
- aprint_normal_dev(dev, "PHY: %s, rev. %d\n",
+ aprint_normal_dev(dev, "PHY: %s, rev. %d",
descr, rev);
else
aprint_normal_dev(dev,
- "PHY OUI 0x%06x, model 0x%04x, rev. %d\n",
+ "PHY OUI 0x%06x, model 0x%04x, rev. %d",
oui, model, rev);
+ /* PHY FW version */
+ phy->ops.read_reg(hw, 0x1e, &phy_ver);
+ aprint_normal(", PHY FW version 0x%04hx\n", phy_ver);
+
/* Get NVM version */
hw->nvm.ops.read(hw, NVM_VERSION, 1, &nvm_ver);
- /* Get PHY FW version */
- phy->ops.read_reg(hw, 0x1e, &phy_ver);
-
- aprint_normal_dev(dev, "ROM image version %x.%02x",
+ aprint_normal_dev(dev, "ROM image version %x.%02x\n",
(nvm_ver & NVM_VERSION_MAJOR) >> NVM_VERSION_MAJOR_SHIFT,
(nvm_ver & NVM_VERSION_MINOR));
- aprint_debug("(0x%04hx)", nvm_ver);
-
- aprint_normal(", PHY FW version 0x%04hx\n", phy_ver);
}