diff options
author | Matt Carlson <mcarlson@broadcom.com> | 2010-08-02 07:26:07 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-08-02 18:46:33 -0400 |
commit | f07e9af31e6e1bf2a499e1f52cbf0982619fa611 (patch) | |
tree | 53add5d2a93f239b916b8a69fcd91093c56f8894 /drivers/net/tg3.h | |
parent | 80096068bc21420ba4d690341a3c70c49017d167 (diff) |
tg3: Migrate tg3_flags to phy_flags
This patch moves most of the phy related flag definitions over to the
phyflags member and changes the code accordingly.
Reviewed-by: Benjamin Li <benli@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/tg3.h')
-rw-r--r-- | drivers/net/tg3.h | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/drivers/net/tg3.h b/drivers/net/tg3.h index 5d684d2b4034..4937bd190964 100644 --- a/drivers/net/tg3.h +++ b/drivers/net/tg3.h | |||
@@ -2774,7 +2774,6 @@ struct tg3 { | |||
2774 | #define TG3_FLAG_TXD_MBOX_HWBUG 0x00000002 | 2774 | #define TG3_FLAG_TXD_MBOX_HWBUG 0x00000002 |
2775 | #define TG3_FLAG_RX_CHECKSUMS 0x00000004 | 2775 | #define TG3_FLAG_RX_CHECKSUMS 0x00000004 |
2776 | #define TG3_FLAG_USE_LINKCHG_REG 0x00000008 | 2776 | #define TG3_FLAG_USE_LINKCHG_REG 0x00000008 |
2777 | #define TG3_FLAG_USE_MI_INTERRUPT 0x00000010 | ||
2778 | #define TG3_FLAG_ENABLE_ASF 0x00000020 | 2777 | #define TG3_FLAG_ENABLE_ASF 0x00000020 |
2779 | #define TG3_FLAG_ASPM_WORKAROUND 0x00000040 | 2778 | #define TG3_FLAG_ASPM_WORKAROUND 0x00000040 |
2780 | #define TG3_FLAG_POLL_SERDES 0x00000080 | 2779 | #define TG3_FLAG_POLL_SERDES 0x00000080 |
@@ -2796,7 +2795,6 @@ struct tg3 { | |||
2796 | #define TG3_FLAG_TX_RECOVERY_PENDING 0x00200000 | 2795 | #define TG3_FLAG_TX_RECOVERY_PENDING 0x00200000 |
2797 | #define TG3_FLAG_WOL_CAP 0x00400000 | 2796 | #define TG3_FLAG_WOL_CAP 0x00400000 |
2798 | #define TG3_FLAG_JUMBO_RING_ENABLE 0x00800000 | 2797 | #define TG3_FLAG_JUMBO_RING_ENABLE 0x00800000 |
2799 | #define TG3_FLAG_10_100_ONLY 0x01000000 | ||
2800 | #define TG3_FLAG_PAUSE_AUTONEG 0x02000000 | 2798 | #define TG3_FLAG_PAUSE_AUTONEG 0x02000000 |
2801 | #define TG3_FLAG_CPMU_PRESENT 0x04000000 | 2799 | #define TG3_FLAG_CPMU_PRESENT 0x04000000 |
2802 | #define TG3_FLAG_40BIT_DMA_BUG 0x08000000 | 2800 | #define TG3_FLAG_40BIT_DMA_BUG 0x08000000 |
@@ -2807,22 +2805,15 @@ struct tg3 { | |||
2807 | u32 tg3_flags2; | 2805 | u32 tg3_flags2; |
2808 | #define TG3_FLG2_RESTART_TIMER 0x00000001 | 2806 | #define TG3_FLG2_RESTART_TIMER 0x00000001 |
2809 | #define TG3_FLG2_TSO_BUG 0x00000002 | 2807 | #define TG3_FLG2_TSO_BUG 0x00000002 |
2810 | #define TG3_FLG2_NO_ETH_WIRE_SPEED 0x00000004 | ||
2811 | #define TG3_FLG2_IS_5788 0x00000008 | 2808 | #define TG3_FLG2_IS_5788 0x00000008 |
2812 | #define TG3_FLG2_MAX_RXPEND_64 0x00000010 | 2809 | #define TG3_FLG2_MAX_RXPEND_64 0x00000010 |
2813 | #define TG3_FLG2_TSO_CAPABLE 0x00000020 | 2810 | #define TG3_FLG2_TSO_CAPABLE 0x00000020 |
2814 | #define TG3_FLG2_PHY_ADC_BUG 0x00000040 | ||
2815 | #define TG3_FLG2_PHY_5704_A0_BUG 0x00000080 | ||
2816 | #define TG3_FLG2_PHY_BER_BUG 0x00000100 | ||
2817 | #define TG3_FLG2_PCI_EXPRESS 0x00000200 | 2811 | #define TG3_FLG2_PCI_EXPRESS 0x00000200 |
2818 | #define TG3_FLG2_ASF_NEW_HANDSHAKE 0x00000400 | 2812 | #define TG3_FLG2_ASF_NEW_HANDSHAKE 0x00000400 |
2819 | #define TG3_FLG2_HW_AUTONEG 0x00000800 | 2813 | #define TG3_FLG2_HW_AUTONEG 0x00000800 |
2820 | #define TG3_FLG2_IS_NIC 0x00001000 | 2814 | #define TG3_FLG2_IS_NIC 0x00001000 |
2821 | #define TG3_FLG2_PHY_SERDES 0x00002000 | ||
2822 | #define TG3_FLG2_CAPACITIVE_COUPLING 0x00004000 | ||
2823 | #define TG3_FLG2_FLASH 0x00008000 | 2815 | #define TG3_FLG2_FLASH 0x00008000 |
2824 | #define TG3_FLG2_HW_TSO_1 0x00010000 | 2816 | #define TG3_FLG2_HW_TSO_1 0x00010000 |
2825 | #define TG3_FLG2_SERDES_PREEMPHASIS 0x00020000 | ||
2826 | #define TG3_FLG2_5705_PLUS 0x00040000 | 2817 | #define TG3_FLG2_5705_PLUS 0x00040000 |
2827 | #define TG3_FLG2_5750_PLUS 0x00080000 | 2818 | #define TG3_FLG2_5750_PLUS 0x00080000 |
2828 | #define TG3_FLG2_HW_TSO_3 0x00100000 | 2819 | #define TG3_FLG2_HW_TSO_3 0x00100000 |
@@ -2830,10 +2821,6 @@ struct tg3 { | |||
2830 | #define TG3_FLG2_USING_MSIX 0x00400000 | 2821 | #define TG3_FLG2_USING_MSIX 0x00400000 |
2831 | #define TG3_FLG2_USING_MSI_OR_MSIX (TG3_FLG2_USING_MSI | \ | 2822 | #define TG3_FLG2_USING_MSI_OR_MSIX (TG3_FLG2_USING_MSI | \ |
2832 | TG3_FLG2_USING_MSIX) | 2823 | TG3_FLG2_USING_MSIX) |
2833 | #define TG3_FLG2_MII_SERDES 0x00800000 | ||
2834 | #define TG3_FLG2_ANY_SERDES (TG3_FLG2_PHY_SERDES | \ | ||
2835 | TG3_FLG2_MII_SERDES) | ||
2836 | #define TG3_FLG2_PARALLEL_DETECT 0x01000000 | ||
2837 | #define TG3_FLG2_ICH_WORKAROUND 0x02000000 | 2824 | #define TG3_FLG2_ICH_WORKAROUND 0x02000000 |
2838 | #define TG3_FLG2_5780_CLASS 0x04000000 | 2825 | #define TG3_FLG2_5780_CLASS 0x04000000 |
2839 | #define TG3_FLG2_HW_TSO_2 0x08000000 | 2826 | #define TG3_FLG2_HW_TSO_2 0x08000000 |
@@ -2841,9 +2828,7 @@ struct tg3 { | |||
2841 | TG3_FLG2_HW_TSO_2 | \ | 2828 | TG3_FLG2_HW_TSO_2 | \ |
2842 | TG3_FLG2_HW_TSO_3) | 2829 | TG3_FLG2_HW_TSO_3) |
2843 | #define TG3_FLG2_1SHOT_MSI 0x10000000 | 2830 | #define TG3_FLG2_1SHOT_MSI 0x10000000 |
2844 | #define TG3_FLG2_PHY_JITTER_BUG 0x20000000 | ||
2845 | #define TG3_FLG2_NO_FWARE_REPORTED 0x40000000 | 2831 | #define TG3_FLG2_NO_FWARE_REPORTED 0x40000000 |
2846 | #define TG3_FLG2_PHY_ADJUST_TRIM 0x80000000 | ||
2847 | u32 tg3_flags3; | 2832 | u32 tg3_flags3; |
2848 | #define TG3_FLG3_NO_NVRAM_ADDR_TRANS 0x00000001 | 2833 | #define TG3_FLG3_NO_NVRAM_ADDR_TRANS 0x00000001 |
2849 | #define TG3_FLG3_ENABLE_APE 0x00000002 | 2834 | #define TG3_FLG3_ENABLE_APE 0x00000002 |
@@ -2851,15 +2836,12 @@ struct tg3 { | |||
2851 | #define TG3_FLG3_5701_DMA_BUG 0x00000008 | 2836 | #define TG3_FLG3_5701_DMA_BUG 0x00000008 |
2852 | #define TG3_FLG3_USE_PHYLIB 0x00000010 | 2837 | #define TG3_FLG3_USE_PHYLIB 0x00000010 |
2853 | #define TG3_FLG3_MDIOBUS_INITED 0x00000020 | 2838 | #define TG3_FLG3_MDIOBUS_INITED 0x00000020 |
2854 | #define TG3_FLG3_PHY_CONNECTED 0x00000080 | ||
2855 | #define TG3_FLG3_RGMII_INBAND_DISABLE 0x00000100 | 2839 | #define TG3_FLG3_RGMII_INBAND_DISABLE 0x00000100 |
2856 | #define TG3_FLG3_RGMII_EXT_IBND_RX_EN 0x00000200 | 2840 | #define TG3_FLG3_RGMII_EXT_IBND_RX_EN 0x00000200 |
2857 | #define TG3_FLG3_RGMII_EXT_IBND_TX_EN 0x00000400 | 2841 | #define TG3_FLG3_RGMII_EXT_IBND_TX_EN 0x00000400 |
2858 | #define TG3_FLG3_CLKREQ_BUG 0x00000800 | 2842 | #define TG3_FLG3_CLKREQ_BUG 0x00000800 |
2859 | #define TG3_FLG3_PHY_ENABLE_APD 0x00001000 | ||
2860 | #define TG3_FLG3_5755_PLUS 0x00002000 | 2843 | #define TG3_FLG3_5755_PLUS 0x00002000 |
2861 | #define TG3_FLG3_NO_NVRAM 0x00004000 | 2844 | #define TG3_FLG3_NO_NVRAM 0x00004000 |
2862 | #define TG3_FLG3_PHY_IS_FET 0x00010000 | ||
2863 | #define TG3_FLG3_ENABLE_RSS 0x00020000 | 2845 | #define TG3_FLG3_ENABLE_RSS 0x00020000 |
2864 | #define TG3_FLG3_ENABLE_TSS 0x00040000 | 2846 | #define TG3_FLG3_ENABLE_TSS 0x00040000 |
2865 | #define TG3_FLG3_4G_DMA_BNDRY_BUG 0x00080000 | 2847 | #define TG3_FLG3_4G_DMA_BNDRY_BUG 0x00080000 |
@@ -2966,6 +2948,24 @@ struct tg3 { | |||
2966 | 2948 | ||
2967 | u32 phy_flags; | 2949 | u32 phy_flags; |
2968 | #define TG3_PHYFLG_IS_LOW_POWER 0x00000001 | 2950 | #define TG3_PHYFLG_IS_LOW_POWER 0x00000001 |
2951 | #define TG3_PHYFLG_IS_CONNECTED 0x00000002 | ||
2952 | #define TG3_PHYFLG_USE_MI_INTERRUPT 0x00000004 | ||
2953 | #define TG3_PHYFLG_PHY_SERDES 0x00000010 | ||
2954 | #define TG3_PHYFLG_MII_SERDES 0x00000020 | ||
2955 | #define TG3_PHYFLG_ANY_SERDES (TG3_PHYFLG_PHY_SERDES | \ | ||
2956 | TG3_PHYFLG_MII_SERDES) | ||
2957 | #define TG3_PHYFLG_IS_FET 0x00000040 | ||
2958 | #define TG3_PHYFLG_10_100_ONLY 0x00000080 | ||
2959 | #define TG3_PHYFLG_ENABLE_APD 0x00000100 | ||
2960 | #define TG3_PHYFLG_CAPACITIVE_COUPLING 0x00000200 | ||
2961 | #define TG3_PHYFLG_NO_ETH_WIRE_SPEED 0x00000400 | ||
2962 | #define TG3_PHYFLG_JITTER_BUG 0x00000800 | ||
2963 | #define TG3_PHYFLG_ADJUST_TRIM 0x00001000 | ||
2964 | #define TG3_PHYFLG_ADC_BUG 0x00002000 | ||
2965 | #define TG3_PHYFLG_5704_A0_BUG 0x00004000 | ||
2966 | #define TG3_PHYFLG_BER_BUG 0x00008000 | ||
2967 | #define TG3_PHYFLG_SERDES_PREEMPHASIS 0x00010000 | ||
2968 | #define TG3_PHYFLG_PARALLEL_DETECT 0x00020000 | ||
2969 | 2969 | ||
2970 | u32 led_ctrl; | 2970 | u32 led_ctrl; |
2971 | u32 phy_otp; | 2971 | u32 phy_otp; |