Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pci/ixgbe - Print NVM Image Version, PHY FW Revision...
details: https://anonhg.NetBSD.org/src/rev/95cd675cd6d1
branches: trunk
changeset: 354043:95cd675cd6d1
user: msaitoh <msaitoh%NetBSD.org@localhost>
date: Fri Jun 02 08:16:52 2017 +0000
description:
- Print NVM Image Version, PHY FW Revision, NVM Map version and OEM NVM
Image version
- s/TrackID/ETrackID/
diffstat:
sys/dev/pci/ixgbe/ixgbe.c | 78 ++++++++++++++++++++++++++++++++++++++---
sys/dev/pci/ixgbe/ixgbe_type.h | 10 +++-
2 files changed, 79 insertions(+), 9 deletions(-)
diffs (134 lines):
diff -r 4c40be3c780f -r 95cd675cd6d1 sys/dev/pci/ixgbe/ixgbe.c
--- a/sys/dev/pci/ixgbe/ixgbe.c Fri Jun 02 03:41:20 2017 +0000
+++ b/sys/dev/pci/ixgbe/ixgbe.c Fri Jun 02 08:16:52 2017 +0000
@@ -59,7 +59,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
/*$FreeBSD: head/sys/dev/ixgbe/if_ix.c 302384 2016-07-07 03:39:18Z sbruno $*/
-/*$NetBSD: ixgbe.c,v 1.87 2017/05/26 09:17:32 msaitoh Exp $*/
+/*$NetBSD: ixgbe.c,v 1.88 2017/06/02 08:16:52 msaitoh Exp $*/
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@@ -466,7 +466,8 @@
struct adapter *adapter;
struct ixgbe_hw *hw;
int error = -1;
- u16 csum, high, low;
+ u16 csum, high, low, nvmreg;
+ u8 id;
u32 ctrl_ext;
ixgbe_vendor_info_t *ent;
struct pci_attach_args *pa = aux;
@@ -630,10 +631,75 @@
goto err_late;
}
- /* Print the TrackID */
- hw->eeprom.ops.read(hw, IXGBE_TRACKID_H, &high);
- hw->eeprom.ops.read(hw, IXGBE_TRACKID_L, &low);
- aprint_normal_dev(dev, "TrackID %08x\n", ((uint32_t)high << 16) | low);
+ aprint_normal("%s:", device_xname(dev));
+ /* NVM Image Version */
+ switch (hw->mac.type) {
+ case ixgbe_mac_X540:
+ hw->eeprom.ops.read(hw, IXGBE_NVM_IMAGE_VER, &nvmreg);
+ if (nvmreg == 0xffff)
+ break;
+ high = (nvmreg >> 12) & 0x0f;
+ low = (nvmreg >> 4) & 0xff;
+ id = nvmreg & 0x0f;
+ aprint_normal(" NVM Image Version %u.%u ID 0x%x,", high, low,
+ id);
+ break;
+ case ixgbe_mac_X550EM_x:
+ case ixgbe_mac_X550:
+ hw->eeprom.ops.read(hw, IXGBE_NVM_IMAGE_VER, &nvmreg);
+ if (nvmreg == 0xffff)
+ break;
+ high = (nvmreg >> 12) & 0x0f;
+ low = nvmreg & 0xff;
+ aprint_normal(" NVM Image Version %u.%u,", high, low);
+ break;
+ default:
+ break;
+ }
+
+ /* PHY firmware revision */
+ switch (hw->mac.type) {
+ case ixgbe_mac_X540:
+ case ixgbe_mac_X550:
+ hw->eeprom.ops.read(hw, IXGBE_PHYFW_REV, &nvmreg);
+ if (nvmreg == 0xffff)
+ break;
+ high = (nvmreg >> 12) & 0x0f;
+ low = (nvmreg >> 4) & 0xff;
+ id = nvmreg & 0x000f;
+ aprint_normal(" PHY FW Revision %u.%u ID 0x%x,", high, low,
+ id);
+ break;
+ default:
+ break;
+ }
+
+ /* NVM Map version & OEM NVM Image version */
+ switch (hw->mac.type) {
+ case ixgbe_mac_X550:
+ case ixgbe_mac_X550EM_x:
+ hw->eeprom.ops.read(hw, IXGBE_NVM_MAP_VER, &nvmreg);
+ if (nvmreg != 0xffff) {
+ high = (nvmreg >> 12) & 0x0f;
+ low = nvmreg & 0x00ff;
+ aprint_normal(" NVM Map version %u.%02x,", high, low);
+ }
+ hw->eeprom.ops.read(hw, IXGBE_OEM_NVM_IMAGE_VER, &nvmreg);
+ if (nvmreg == 0xffff) {
+ high = (nvmreg >> 12) & 0x0f;
+ low = nvmreg & 0x00ff;
+ aprint_verbose(" OEM NVM Image version %u.%02x,", high,
+ low);
+ }
+ break;
+ default:
+ break;
+ }
+
+ /* Print the ETrackID */
+ hw->eeprom.ops.read(hw, IXGBE_ETRACKID_H, &high);
+ hw->eeprom.ops.read(hw, IXGBE_ETRACKID_L, &low);
+ aprint_normal(" ETrackID %08x\n", ((uint32_t)high << 16) | low);
error = ixgbe_init_hw(hw);
switch (error) {
diff -r 4c40be3c780f -r 95cd675cd6d1 sys/dev/pci/ixgbe/ixgbe_type.h
--- a/sys/dev/pci/ixgbe/ixgbe_type.h Fri Jun 02 03:41:20 2017 +0000
+++ b/sys/dev/pci/ixgbe/ixgbe_type.h Fri Jun 02 08:16:52 2017 +0000
@@ -31,7 +31,7 @@
******************************************************************************/
/*$FreeBSD: head/sys/dev/ixgbe/ixgbe_type.h 299200 2016-05-06 22:54:56Z pfg $*/
-/*$NetBSD: ixgbe_type.h,v 1.21 2017/05/26 08:36:42 msaitoh Exp $*/
+/*$NetBSD: ixgbe_type.h,v 1.22 2017/06/02 08:16:52 msaitoh Exp $*/
#ifndef _IXGBE_TYPE_H_
#define _IXGBE_TYPE_H_
@@ -2221,13 +2221,17 @@
#define IXGBE_FW_PTR 0x0F
#define IXGBE_PBANUM0_PTR 0x15
#define IXGBE_PBANUM1_PTR 0x16
+#define IXGBE_NVM_IMAGE_VER 0x18
+#define IXGBE_PHYFW_REV 0x19
#define IXGBE_ALT_MAC_ADDR_PTR 0x37
#define IXGBE_FREE_SPACE_PTR 0X3E
#define IXGBE_SAN_MAC_ADDR_PTR 0x28
+#define IXGBE_NVM_MAP_VER 0x29
+#define IXGBE_OEM_NVM_IMAGE_VER 0x2A
#define IXGBE_DEVICE_CAPS 0x2C
-#define IXGBE_TRACKID_L 0x2d
-#define IXGBE_TRACKID_H 0x2e
+#define IXGBE_ETRACKID_L 0x2D
+#define IXGBE_ETRACKID_H 0x2E
#define IXGBE_SERIAL_NUMBER_MAC_ADDR 0x11
#define IXGBE_PCIE_MSIX_82599_CAPS 0x72
#define IXGBE_MAX_MSIX_VECTORS_82599 0x40
Home |
Main Index |
Thread Index |
Old Index