tg3 patch to enable GMII test modes
Subsystems (2)
I have been trying to get a GigE adapter to go into the GMII test modes described in section 40 of the 802.3 spec.
I was able to get e1000 into those modes, but it was transmitting a 100bt pulse code instead of gigE (according to the guy with the scope).
I'm now trying to get the tg3 to use these test modes. I should have confirmation from the scope guy in a few days, but in the mean time I thought I'd run the patch buy you all.
If this is something that is desired in the main kernel, I have the rest of the ethtool parts as well, and a user-space application to drive it.
Comments welcome.
Thanks,
Ben
drivers/net/tg3.h +10 -0
@@ -1417,6 +1417,13 @@#define MII_TG3_CTRL_AS_MASTER 0x0800#define MII_TG3_CTRL_ENABLE_AS_MASTER 0x1000 +/* Hoping these are the same as in the e1000 --Ben */ +#define MII_TG3_1000T_TEST_MODE_NORMAL 0x0000/* Normal Operation */ +#define MII_TG3_TEST_MODE_1 0x2000/* Transmit Waveform test */ +#define MII_TG3_TEST_MODE_2 0x4000/* Master Transmit Jitter test */ +#define MII_TG3_TEST_MODE_3 0x6000/* Slave Transmit Jitter test */ +#define MII_TG3_TEST_MODE_4 0x8000/* Transmitter Distortion test */ +#define MII_TG3_EXT_CTRL 0x10/* Extended control register */ #define MII_TG3_EXT_CTRL_LNK3_LED_MODE 0x0002#define MII_TG3_EXT_CTRL_TBI 0x8000
@@ -1994,6 +2001,9 @@struct tg3_hw_stats *hw_stats;dma_addr_t stats_mapping;struct tq_struct reset_task; + + u32 gmii_test; /* See ethtool.h for GMII_TEST_MODE* definitions */ + };#endif /* !(_T3_H) */
drivers/net/tg3.c +114 -0
151 lines not on this page · raw message
Signature · 2 lines
Ben Greear <[email protected]> Candela Technologies Inc http://www.candelatech.com