summaryrefslogtreecommitdiffstats
path: root/sys/dev/fxp/if_fxpreg.h
diff options
context:
space:
mode:
authoryongari <yongari@FreeBSD.org>2012-03-28 01:27:27 +0000
committeryongari <yongari@FreeBSD.org>2012-03-28 01:27:27 +0000
commit58e81052f33ee5383a25ab4bf3808931829d996a (patch)
tree6a2d1ddc994dcd5068c7572701dfebf151d61575 /sys/dev/fxp/if_fxpreg.h
parent26312bd9696baac97096e845c010eb7bc99ee477 (diff)
downloadFreeBSD-src-58e81052f33ee5383a25ab4bf3808931829d996a.zip
FreeBSD-src-58e81052f33ee5383a25ab4bf3808931829d996a.tar.gz
Load entire EEPROM contents in device attach time and verify
whether the checksum of EEPROM is valid or not. Because driver heavily relies on EEPROM information when it selectively enables features/workarounds, it would be helpful to know whether driver sees valid EEPROM. While I'm here remove all other EEPROM accesses since the entire EEPROM is loaded at device attach time. MFC after: 2 weeks
Diffstat (limited to 'sys/dev/fxp/if_fxpreg.h')
-rw-r--r--sys/dev/fxp/if_fxpreg.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/sys/dev/fxp/if_fxpreg.h b/sys/dev/fxp/if_fxpreg.h
index bb6a88b..cc764b5 100644
--- a/sys/dev/fxp/if_fxpreg.h
+++ b/sys/dev/fxp/if_fxpreg.h
@@ -448,6 +448,24 @@ struct fxp_stats {
#define FXP_EEPROM_OPC_READ 0x6
/*
+ * EEPROM map
+ */
+#define FXP_EEPROM_MAP_IA0 0x00 /* Station address */
+#define FXP_EEPROM_MAP_IA1 0x01
+#define FXP_EEPROM_MAP_IA2 0x02
+#define FXP_EEPROM_MAP_COMPAT 0x03 /* Compatibility */
+#define FXP_EEPROM_MAP_CNTR 0x05 /* Controller/connector type */
+#define FXP_EEPROM_MAP_PRI_PHY 0x06 /* Primary PHY record */
+#define FXP_EEPROM_MAP_SEC_PHY 0x07 /* Secondary PHY record */
+#define FXP_EEPROM_MAP_PWA0 0x08 /* Printed wire assembly num. */
+#define FXP_EEPROM_MAP_PWA1 0x09 /* Printed wire assembly num. */
+#define FXP_EEPROM_MAP_ID 0x0A /* EEPROM ID */
+#define FXP_EEPROM_MAP_SUBSYS 0x0B /* Subsystem ID */
+#define FXP_EEPROM_MAP_SUBVEN 0x0C /* Subsystem vendor ID */
+#define FXP_EEPROM_MAP_CKSUM64 0x3F /* 64-word EEPROM checksum */
+#define FXP_EEPROM_MAP_CKSUM256 0xFF /* 256-word EEPROM checksum */
+
+/*
* Management Data Interface opcodes
*/
#define FXP_MDI_WRITE 0x1
OpenPOWER on IntegriCloud