diff options
Diffstat (limited to 'drivers/net/bnx2.h')
-rw-r--r-- | drivers/net/bnx2.h | 37 |
1 files changed, 28 insertions, 9 deletions
diff --git a/drivers/net/bnx2.h b/drivers/net/bnx2.h index 0b032c3c7b61..2f43c45b7ad6 100644 --- a/drivers/net/bnx2.h +++ b/drivers/net/bnx2.h | |||
@@ -4202,7 +4202,14 @@ struct l2_fhdr { | |||
4202 | 4202 | ||
4203 | #define BNX2_RBUF_CONFIG 0x0020000c | 4203 | #define BNX2_RBUF_CONFIG 0x0020000c |
4204 | #define BNX2_RBUF_CONFIG_XOFF_TRIP (0x3ffL<<0) | 4204 | #define BNX2_RBUF_CONFIG_XOFF_TRIP (0x3ffL<<0) |
4205 | #define BNX2_RBUF_CONFIG_XOFF_TRIP_VAL(mtu) \ | ||
4206 | ((((mtu) - 1500) * 31 / 1000) + 54) | ||
4205 | #define BNX2_RBUF_CONFIG_XON_TRIP (0x3ffL<<16) | 4207 | #define BNX2_RBUF_CONFIG_XON_TRIP (0x3ffL<<16) |
4208 | #define BNX2_RBUF_CONFIG_XON_TRIP_VAL(mtu) \ | ||
4209 | ((((mtu) - 1500) * 39 / 1000) + 66) | ||
4210 | #define BNX2_RBUF_CONFIG_VAL(mtu) \ | ||
4211 | (BNX2_RBUF_CONFIG_XOFF_TRIP_VAL(mtu) | \ | ||
4212 | (BNX2_RBUF_CONFIG_XON_TRIP_VAL(mtu) << 16)) | ||
4206 | 4213 | ||
4207 | #define BNX2_RBUF_FW_BUF_ALLOC 0x00200010 | 4214 | #define BNX2_RBUF_FW_BUF_ALLOC 0x00200010 |
4208 | #define BNX2_RBUF_FW_BUF_ALLOC_VALUE (0x1ffL<<7) | 4215 | #define BNX2_RBUF_FW_BUF_ALLOC_VALUE (0x1ffL<<7) |
@@ -4224,11 +4231,25 @@ struct l2_fhdr { | |||
4224 | 4231 | ||
4225 | #define BNX2_RBUF_CONFIG2 0x0020001c | 4232 | #define BNX2_RBUF_CONFIG2 0x0020001c |
4226 | #define BNX2_RBUF_CONFIG2_MAC_DROP_TRIP (0x3ffL<<0) | 4233 | #define BNX2_RBUF_CONFIG2_MAC_DROP_TRIP (0x3ffL<<0) |
4234 | #define BNX2_RBUF_CONFIG2_MAC_DROP_TRIP_VAL(mtu) \ | ||
4235 | ((((mtu) - 1500) * 4 / 1000) + 5) | ||
4227 | #define BNX2_RBUF_CONFIG2_MAC_KEEP_TRIP (0x3ffL<<16) | 4236 | #define BNX2_RBUF_CONFIG2_MAC_KEEP_TRIP (0x3ffL<<16) |
4237 | #define BNX2_RBUF_CONFIG2_MAC_KEEP_TRIP_VAL(mtu) \ | ||
4238 | ((((mtu) - 1500) * 2 / 100) + 30) | ||
4239 | #define BNX2_RBUF_CONFIG2_VAL(mtu) \ | ||
4240 | (BNX2_RBUF_CONFIG2_MAC_DROP_TRIP_VAL(mtu) | \ | ||
4241 | (BNX2_RBUF_CONFIG2_MAC_KEEP_TRIP_VAL(mtu) << 16)) | ||
4228 | 4242 | ||
4229 | #define BNX2_RBUF_CONFIG3 0x00200020 | 4243 | #define BNX2_RBUF_CONFIG3 0x00200020 |
4230 | #define BNX2_RBUF_CONFIG3_CU_DROP_TRIP (0x3ffL<<0) | 4244 | #define BNX2_RBUF_CONFIG3_CU_DROP_TRIP (0x3ffL<<0) |
4245 | #define BNX2_RBUF_CONFIG3_CU_DROP_TRIP_VAL(mtu) \ | ||
4246 | ((((mtu) - 1500) * 12 / 1000) + 18) | ||
4231 | #define BNX2_RBUF_CONFIG3_CU_KEEP_TRIP (0x3ffL<<16) | 4247 | #define BNX2_RBUF_CONFIG3_CU_KEEP_TRIP (0x3ffL<<16) |
4248 | #define BNX2_RBUF_CONFIG3_CU_KEEP_TRIP_VAL(mtu) \ | ||
4249 | ((((mtu) - 1500) * 2 / 100) + 30) | ||
4250 | #define BNX2_RBUF_CONFIG3_VAL(mtu) \ | ||
4251 | (BNX2_RBUF_CONFIG3_CU_DROP_TRIP_VAL(mtu) | \ | ||
4252 | (BNX2_RBUF_CONFIG3_CU_KEEP_TRIP_VAL(mtu) << 16)) | ||
4232 | 4253 | ||
4233 | #define BNX2_RBUF_PKT_DATA 0x00208000 | 4254 | #define BNX2_RBUF_PKT_DATA 0x00208000 |
4234 | #define BNX2_RBUF_CLIST_DATA 0x00210000 | 4255 | #define BNX2_RBUF_CLIST_DATA 0x00210000 |
@@ -6661,8 +6682,6 @@ struct bnx2_napi { | |||
6661 | struct bnx2_tx_ring_info tx_ring; | 6682 | struct bnx2_tx_ring_info tx_ring; |
6662 | }; | 6683 | }; |
6663 | 6684 | ||
6664 | #define BNX2_TIMER_INTERVAL HZ | ||
6665 | |||
6666 | struct bnx2 { | 6685 | struct bnx2 { |
6667 | /* Fields used in the tx and intr/napi performance paths are grouped */ | 6686 | /* Fields used in the tx and intr/napi performance paths are grouped */ |
6668 | /* together in the beginning of the structure. */ | 6687 | /* together in the beginning of the structure. */ |
@@ -6710,7 +6729,11 @@ struct bnx2 { | |||
6710 | 6729 | ||
6711 | /* End of fields used in the performance code paths. */ | 6730 | /* End of fields used in the performance code paths. */ |
6712 | 6731 | ||
6713 | int current_interval; | 6732 | unsigned int current_interval; |
6733 | #define BNX2_TIMER_INTERVAL HZ | ||
6734 | #define BNX2_SERDES_AN_TIMEOUT (HZ / 3) | ||
6735 | #define BNX2_SERDES_FORCED_TIMEOUT (HZ / 10) | ||
6736 | |||
6714 | struct timer_list timer; | 6737 | struct timer_list timer; |
6715 | struct work_struct reset_task; | 6738 | struct work_struct reset_task; |
6716 | 6739 | ||
@@ -6842,8 +6865,6 @@ struct bnx2 { | |||
6842 | #define PHY_LOOPBACK 2 | 6865 | #define PHY_LOOPBACK 2 |
6843 | 6866 | ||
6844 | u8 serdes_an_pending; | 6867 | u8 serdes_an_pending; |
6845 | #define SERDES_AN_TIMEOUT (HZ / 3) | ||
6846 | #define SERDES_FORCED_TIMEOUT (HZ / 10) | ||
6847 | 6868 | ||
6848 | u8 mac_addr[8]; | 6869 | u8 mac_addr[8]; |
6849 | 6870 | ||
@@ -6854,8 +6875,6 @@ struct bnx2 { | |||
6854 | int pm_cap; | 6875 | int pm_cap; |
6855 | int pcix_cap; | 6876 | int pcix_cap; |
6856 | 6877 | ||
6857 | struct net_device_stats net_stats; | ||
6858 | |||
6859 | struct flash_spec *flash_info; | 6878 | struct flash_spec *flash_info; |
6860 | u32 flash_size; | 6879 | u32 flash_size; |
6861 | 6880 | ||
@@ -6944,14 +6963,14 @@ struct fw_info { | |||
6944 | /* This value (in milliseconds) determines the frequency of the driver | 6963 | /* This value (in milliseconds) determines the frequency of the driver |
6945 | * issuing the PULSE message code. The firmware monitors this periodic | 6964 | * issuing the PULSE message code. The firmware monitors this periodic |
6946 | * pulse to determine when to switch to an OS-absent mode. */ | 6965 | * pulse to determine when to switch to an OS-absent mode. */ |
6947 | #define DRV_PULSE_PERIOD_MS 250 | 6966 | #define BNX2_DRV_PULSE_PERIOD_MS 250 |
6948 | 6967 | ||
6949 | /* This value (in milliseconds) determines how long the driver should | 6968 | /* This value (in milliseconds) determines how long the driver should |
6950 | * wait for an acknowledgement from the firmware before timing out. Once | 6969 | * wait for an acknowledgement from the firmware before timing out. Once |
6951 | * the firmware has timed out, the driver will assume there is no firmware | 6970 | * the firmware has timed out, the driver will assume there is no firmware |
6952 | * running and there won't be any firmware-driver synchronization during a | 6971 | * running and there won't be any firmware-driver synchronization during a |
6953 | * driver reset. */ | 6972 | * driver reset. */ |
6954 | #define FW_ACK_TIME_OUT_MS 1000 | 6973 | #define BNX2_FW_ACK_TIME_OUT_MS 1000 |
6955 | 6974 | ||
6956 | 6975 | ||
6957 | #define BNX2_DRV_RESET_SIGNATURE 0x00000000 | 6976 | #define BNX2_DRV_RESET_SIGNATURE 0x00000000 |