diff options
author | imp <imp@FreeBSD.org> | 2008-10-31 23:24:13 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 2008-10-31 23:24:13 +0000 |
commit | 6abe76f0961574a372b66ca353e91581a3c08ecb (patch) | |
tree | 303bb70a9bc5ec77f0989901a7b1eeaf0ceda9a9 /sys/pci/if_rlreg.h | |
parent | 7e60f291b22872c56c3e044cd9247ea674fbfa22 (diff) | |
download | FreeBSD-src-6abe76f0961574a372b66ca353e91581a3c08ecb.zip FreeBSD-src-6abe76f0961574a372b66ca353e91581a3c08ecb.tar.gz |
Add RL_TWISTER_ENABLE option. This enables the magic bits to do long
cable tuning. This has helped in some installations for hardware
deployed by a former employer. Made optional because the lists aren't
full of complaints about these cards... even when they were wildly
popular.
Reviewed by: attilio@, jhb@, trhodes@ (all an older version of the patch)
Diffstat (limited to 'sys/pci/if_rlreg.h')
-rw-r--r-- | sys/pci/if_rlreg.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/sys/pci/if_rlreg.h b/sys/pci/if_rlreg.h index c75365c..f33eaed 100644 --- a/sys/pci/if_rlreg.h +++ b/sys/pci/if_rlreg.h @@ -309,6 +309,27 @@ #define RL_CMD_RESET 0x0010 /* + * Twister register values. These are completely undocumented and derived + * from public sources. + */ +#define RL_CSCFG_LINK_OK 0x0400 +#define RL_CSCFG_CHANGE 0x0800 +#define RL_CSCFG_STATUS 0xf000 +#define RL_CSCFG_ROW3 0x7000 +#define RL_CSCFG_ROW2 0x3000 +#define RL_CSCFG_ROW1 0x1000 +#define RL_CSCFG_LINK_DOWN_OFF_CMD 0x03c0 +#define RL_CSCFG_LINK_DOWN_CMD 0xf3c0 + +#define RL_NWAYTST_RESET 0 +#define RL_NWAYTST_CBL_TEST 0x20 + +#define RL_PARA78 0x78 +#define RL_PARA78_DEF 0x78fa8388 +#define RL_PARA7C 0x7C +#define RL_PARA7C_DEF 0xcb38de43 +#define RL_PARA7C_RETUNE 0xfb38de03 +/* * EEPROM control register */ #define RL_EE_DATAOUT 0x01 /* Data out */ @@ -809,6 +830,10 @@ struct rl_list_data { bus_addr_t rl_tx_list_addr; }; +#ifdef RL_TWISTER_ENABLE +enum rl_twist { DONE, CHK_LINK, FIND_ROW, SET_PARAM, RECHK_LONG, RETUNE }; +#endif + struct rl_softc { struct ifnet *rl_ifp; /* interface info */ bus_space_handle_t rl_bhandle; /* bus space handle */ @@ -837,6 +862,11 @@ struct rl_softc { uint32_t rl_rxlenmask; int rl_testmode; int rl_if_flags; +#ifdef RL_TWISTER_ENABLE + enum rl_twist rl_twister; + int rl_twist_row; + int rl_twist_col; +#endif int suspended; /* 0 = normal 1 = suspended */ #ifdef DEVICE_POLLING int rxcycles; |