diff options
author | Eilon Greenstein <eilong@broadcom.com> | 2009-08-12 04:23:59 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-08-13 02:02:56 -0400 |
commit | 1ef70b9c12407f0bf332ba775a8aa8f8035d0a24 (patch) | |
tree | fe663ad2b1e6d358fdc4d3c3aacebefa297c34a5 /drivers/net/bnx2x_link.h | |
parent | 8924665a7d77bb79ee895b98864e3201507f6ef2 (diff) |
bnx2x: Re-arrange the link structures for better alignment
Change ieee_fc to u16 instead of u32 and re-arrange the link parameters
structures
Signed-off-by: Yitchak Gertner <gertner@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/bnx2x_link.h')
-rw-r--r-- | drivers/net/bnx2x_link.h | 31 |
1 files changed, 19 insertions, 12 deletions
diff --git a/drivers/net/bnx2x_link.h b/drivers/net/bnx2x_link.h index 6d26d6c524b9..e0d7eef1ced5 100644 --- a/drivers/net/bnx2x_link.h +++ b/drivers/net/bnx2x_link.h | |||
@@ -81,6 +81,11 @@ struct link_params { | |||
81 | #define SWITCH_CFG_AUTO_DETECT PORT_FEATURE_CON_SWITCH_AUTO_DETECT | 81 | #define SWITCH_CFG_AUTO_DETECT PORT_FEATURE_CON_SWITCH_AUTO_DETECT |
82 | 82 | ||
83 | u16 hw_led_mode; /* part of the hw_config read from the shmem */ | 83 | u16 hw_led_mode; /* part of the hw_config read from the shmem */ |
84 | |||
85 | /* phy_addr populated by the phy_init function */ | ||
86 | u8 phy_addr; | ||
87 | /*u8 reserved1;*/ | ||
88 | |||
84 | u32 lane_config; | 89 | u32 lane_config; |
85 | u32 ext_phy_config; | 90 | u32 ext_phy_config; |
86 | #define XGXS_EXT_PHY_TYPE(ext_phy_config) (ext_phy_config & \ | 91 | #define XGXS_EXT_PHY_TYPE(ext_phy_config) (ext_phy_config & \ |
@@ -90,39 +95,41 @@ struct link_params { | |||
90 | /* Phy register parameter */ | 95 | /* Phy register parameter */ |
91 | u32 chip_id; | 96 | u32 chip_id; |
92 | 97 | ||
93 | /* phy_addr populated by the CLC */ | ||
94 | u8 phy_addr; | ||
95 | u16 xgxs_config_rx[4]; /* preemphasis values for the rx side */ | 98 | u16 xgxs_config_rx[4]; /* preemphasis values for the rx side */ |
96 | |||
97 | u16 xgxs_config_tx[4]; /* preemphasis values for the tx side */ | 99 | u16 xgxs_config_tx[4]; /* preemphasis values for the tx side */ |
100 | |||
98 | u32 feature_config_flags; | 101 | u32 feature_config_flags; |
99 | #define FEATURE_CONFIG_OVERRIDE_PREEMPHASIS_ENABLED (1<<0) | 102 | #define FEATURE_CONFIG_OVERRIDE_PREEMPHASIS_ENABLED (1<<0) |
100 | #define FEATURE_CONFIG_BC_SUPPORTS_OPT_MDL_VRFY (1<<2) | 103 | #define FEATURE_CONFIG_BC_SUPPORTS_OPT_MDL_VRFY (1<<2) |
101 | #define FEATURE_CONFIG_BCM8727_NOC (1<<3) | 104 | #define FEATURE_CONFIG_BCM8727_NOC (1<<3) |
105 | |||
102 | /* Device pointer passed to all callback functions */ | 106 | /* Device pointer passed to all callback functions */ |
103 | struct bnx2x *bp; | 107 | struct bnx2x *bp; |
104 | }; | 108 | }; |
105 | 109 | ||
106 | /* Output parameters */ | 110 | /* Output parameters */ |
107 | struct link_vars { | 111 | struct link_vars { |
112 | u8 phy_flags; | ||
113 | |||
114 | u8 mac_type; | ||
115 | #define MAC_TYPE_NONE 0 | ||
116 | #define MAC_TYPE_EMAC 1 | ||
117 | #define MAC_TYPE_BMAC 2 | ||
118 | |||
108 | u8 phy_link_up; /* internal phy link indication */ | 119 | u8 phy_link_up; /* internal phy link indication */ |
109 | u8 link_up; | 120 | u8 link_up; |
121 | |||
122 | u16 line_speed; | ||
110 | u16 duplex; | 123 | u16 duplex; |
124 | |||
111 | u16 flow_ctrl; | 125 | u16 flow_ctrl; |
112 | u32 ieee_fc; | 126 | u16 ieee_fc; |
113 | u8 mac_type; | ||
114 | 127 | ||
115 | #define MAC_TYPE_NONE 0 | ||
116 | #define MAC_TYPE_EMAC 1 | ||
117 | #define MAC_TYPE_BMAC 2 | ||
118 | u16 line_speed; | ||
119 | u32 autoneg; | 128 | u32 autoneg; |
120 | #define AUTO_NEG_DISABLED 0x0 | 129 | #define AUTO_NEG_DISABLED 0x0 |
121 | #define AUTO_NEG_ENABLED 0x1 | 130 | #define AUTO_NEG_ENABLED 0x1 |
122 | #define AUTO_NEG_COMPLETE 0x2 | 131 | #define AUTO_NEG_COMPLETE 0x2 |
123 | #define AUTO_NEG_PARALLEL_DETECTION_USED 0x3 | 132 | #define AUTO_NEG_PARALLEL_DETECTION_USED 0x3 |
124 | |||
125 | u8 phy_flags; | ||
126 | 133 | ||
127 | /* The same definitions as the shmem parameter */ | 134 | /* The same definitions as the shmem parameter */ |
128 | u32 link_status; | 135 | u32 link_status; |